Forecasting Earnings Using k-Nearest Neighbors
48 Pages Posted: 19 Feb 2021 Last revised: 1 Dec 2023
Date Written: July 26, 2021
Abstract
We use a simple k-nearest-neighbors algorithm (hereafter, k-NN*) to forecast earnings. k-NN* forecasts of one-, two-, and three-year ahead earnings are more accurate than those generated by popular extant forecasting approaches. k-NN* forecasts of two- and three-year (one-year) ahead EPS and aggregate three-year EPS are more (less) accurate than those generated by analysts. The association between the unexpected earnings implied by k-NN* and the contemporaneous market-adjusted return (i.e., the earnings association coefficient, EAC) is positive and exceeds the EAC on unexpected earnings implied by alternate approaches. A trading strategy that is long (short) firms for which k-NN* predicts positive (negative) earnings growth earns positive risk-adjusted returns that exceed those earned by similar trading strategies that are based on alternate forecasts. The k-NN* algorithm generates an empirically reliable ex ante indicator of forecast accuracy that identifies situations when the k-NN* EAC is larger and the k-NN* trading strategy is more profitable.
Keywords: earnings, forecasting, machine learning
JEL Classification: C21, C53, G17, M41
Suggested Citation: Suggested Citation