This paper provides a model for valuing stocks that takes into account the stochastic processes for earnings and interest rates. Our analysis differs from past research of this type in being applicable to stocks that have a positive probability of zero or negative earnings. By avoiding the singularity at the zero point, our earnings-based pricing model achieves improved pricing performance. The out-of-sample pricing performance of the generalized earnings valuation model (GEVM) and the Bakshi and Chen pricing model are compared on four stocks and two indices. The generalized model has smaller pricing errors and greater parameter stability. Furthermore, deviations between market and model prices tend to be mean-reverting using the GEVM model, suggesting that the model may be able to identify stock market misvaluation.