Forecasting Earnings Using k-Nearest Neighbor Matching
69 Pages Posted: 19 Feb 2021
Date Written: November 30, 2020
We use the k-nearest neighbors (i.e., k-NN) algorithm to forecast a firm’s annual earnings by matching its recent trend in annual earnings to historical earnings sequences of “neighbor” firms. Our forecasts are more accurate than forecasts obtained from the random walk, the regression model developed by Hou, van Dijk and Zhang (2012), other regression models and the matching approach described in Blouin, Core and Guay (2010). The k-NN model is superior to these alternative models both when analysts’ forecasts are available and when they are not. Further, for firm-years with I/B/E/S earnings data available, the accuracy of k-NN forecasts of I/B/E/S earnings is similar to the accuracy of analysts’ forecasts. The k-NN model is also superior to a random forest classifier that we use to choose the best model ex-ante. Finally, we find that our forecasts of earnings changes have a positive association with future stock returns.
Keywords: earnings, forecasting, machine learning
JEL Classification: C21, C53, G17, M41
Suggested Citation: Suggested Citation