What does machine learning say about the drivers of inflation?

(updated version December 2022)

BIS Working Papers  |  No 980  | 
24 November 2021



Which are the key drivers of inflation, and what role do expectations play in the inflation process have been long-standing questions in macroeconomics, particularly given their relevance to economic policymaking. This paper sheds some fresh light on these central questions using machine learning.


I examine inflation in 20 advanced economies since 2000 through the lens of a flexible data-driven method. Beyond comparing explanatory performance with more traditional econometric methods, as far as possible, I also interpret the predicted relations between explanatory variables and consumer price inflation.


The machine learning model predicts headline and core CPI inflation relatively well, even when only a small standard set of macroeconomic indicators is used. Inflation prediction errors are smaller than with standard OLS models using the same set of explanatory variables – which are firmly grounded on economic theory. Expectations emerge as the most important predictor of CPI inflation. That said, the relative importance of expectations has declined during the last 10 years.


This paper examines the drivers of CPI inflation through the lens of a simple, but computationally intensive machine learning technique. More specifically, it predicts inflation across 20 advanced countries between 2000 and 2021, relying on 1,000 regression trees that are constructed based on six key macroeconomic variables. This agnostic, purely data driven method delivers (relatively) good outcome prediction performance. Out of sample root mean square errors (RMSE) systematically beat even the in-sample benchmark econometric models, with a 28% RMSE reduction relative to a naïve AR(1) model and a 8% RMSE reduction relative to OLS. Overall, the results highlight the role of expectations for inflation outcomes in advanced economies, even though their importance appears to have declined somewhat during the last 10 years.

Keywords: expectations, forecast, inflation, machine learning, oil price, output gap, Phillips curve.

JEL classification: E27, E30, E31, E37, E52, F41.