A quantum Monte Carlo method for obtaining multideterminant Jastrow–Slater wave functions for which the energy is stationary with respect to variations of CI coefficients is presented. It is a generalization of a recently developed approach to the optimization of single particle functions [C. Filippi and S. Fahy, J. Chem. Phys. 112, 3523 (2000)]. Using ground state calculations of the atoms Be, C, and Ne and the dimer Si2 as illustrative examples, the method is shown to converge rapidly and to significantly lower the energy in most cases.