Forecasting Earnings Using k-Nearest Neighbors
48 Pages Posted: 19 Feb 2021 Last revised: 21 Sep 2021
Date Written: July 26, 2021
Abstract
We use a simple k-nearest neighbors (k-NN) model to forecast a subject firm’s annual earnings by matching its recent earnings history to earnings histories of comparable firms, and then extrapolating the forecast from the comparable firms’ lead earnings. Out-of-sample forecasts generated by our model are more accurate than forecasts generated by the random walk; more complicated k-NN models; the matching approach developed by Blouin, Core, and Guay (2010); and popular regression models. These results are robust. Our model’s superiority holds for different error metrics, for firms that are followed by analysts and firms that are not, and for different forecast horizons. Our model also generates a novel ex ante indicator of forecast inaccuracy. This indicator, which equals the interquartile range of the comparable firms’ lead earnings, is reliable and useful. It predicts forecast accuracy and it identifies situations when our forecasts are strong (weak) predictors of future stock returns.
Keywords: earnings, forecasting, machine learning
JEL Classification: C21, C53, G17, M41
Suggested Citation: Suggested Citation