We have implemented the sweep algorithm for the variational optimization of SU(2) x U(1) (spin and particle number) invariant matrix product states (MPS) for general spin and particle number invariant fermionic Hamiltonians. This class includes non-relativistic quantum chemical systems within the Born-Oppenheimer approximation. High-accuracy ab-initio finite field results of the longitudinal static polarizabilities and second hyperpolarizabilities of one-dimensional hydrogen chains are presented. This allows to assess the performance of other quantum chemical methods. For small basis sets, MPS calculations in the saturation regime of the optical response properties can be performed. These results are extrapolated to the thermodynamic limit.