We developed an ab initio formalism based on Time-Dependent Density-Functional Theory for the calculation of the second-order susceptibility Χ
(2) (Luppi et al. J. Chem. Phys. 132, 241104(2010)). We apply this formalism to the calculation of second-harmonic generation spectra of hexagonal SiC polytypes, ZnGeP2 (ZGP) and GaP. Starting from the independent-particle approximation, we include manybody effects, such as quasiparticle via the scissors operator, crystal local fields and excitons. We consider two different types of kernels: the ALDA and the “long-range” kernel. We analyze the effects of the different electron-electron descriptions in the spectra, finding good agreement with experiments.