Navigating a Forest of Recessions – Machine Learning Evidence for Market Efficiency - Mäkinen, Joel (My University, 2025)
This thesis examines whether machine learning models, particularly random forest classifiers, can leverage macroeconomic indicators to anticipate U.S. recessions and yield abnormal returns, thereby probing the semi-strong version of market efficiency. Drawing on previous studies highlighting the predictive power of variables such as yield curve slopes and stock exchange signals, the central research question is whether recession forecasts can substantially influence a tactical asset allocation strategy, and its implications for semi-strong market efficiency – can investors utilize publicly available economic time series data to obtain positive returns without exposing themselves standard risk factors? The implications for market efficiency are considered the three-stage efficiency framework derived by Fama (1970). If such a method generates abnormal returns not explained by widely accepted asset pricing models, the result could imply incomplete information integration into asset prices. The theoretical foundation is grounded primarily in Fama's (1970) efficient markets hypothesis and the multi-factor asset pricing frameworks established by Fama and French (2015), with challenges inspired by Grossman and Stiglitz's (1980) argument for partial inefficiency due to information costs. The dataset encompasses monthly U.S. economic and financial data spanning from 1976 to 2024, matched with NBER-defined recession dates. The methodology involves training dozens of random forest specifications using data from the training period (1976-1998). Each specification is evaluated based on its F1 score during the validation period (1998-2004), and the model with the highest F1 score is employed to make forecasts in the test period (2004-2024). The selected model exhibited an F1 score of 1 during training, 0.7 during validation, and 0.77 during the test period, raising concerns about overfitting while also demonstrating satisfactory forecasting performance. Subsequently, these forecasts are utilized in a tactical strategy that alternates between the market portfolio and the risk-free asset (represented by the S&P 500 index and 1-month U.S. Treasury bill, respectively) based on the model's recession probability predictions. In the test period, the switching approach yielded a limited yet positive alpha of approximately 0.0018% per month (approximately 0.0216% p.a.) when regressing the strategy's returns against the Fama-French five factors, suggesting that some profits remained unexplained by known risk sources or by other factors correlated with them. In conclusion, the results indicate that while the random forest approach arguably extracted valuable information from macroeconomic data to enhance returns, most of the performance can still be attributed to exposure to standard risk factors, particularly the market and value factors. However, the positive, yet statistically non-significant, alpha observed during the out-of-sample test period suggests a minor but measurable degree of market inefficiency in the pricing of recession risk. This finding aligns with Grossman and Stiglitz’s (1980) perspective that markets are nearly efficient but allow for minor profits to incentivize information-processing efforts. Overall, the study supports a nuanced interpretation of market efficiency: machine learning models can uncover useful signals and guide profitable strategies, yet returns tend to be modest and are often absorbed by expanded asset pricing models, thereby upholding the essence of semi-strong efficiency.
Keywords: recession, forecast, prediction, random forest, machine learning, asset pricing, regression, alpha