Weighted random forests for inflation forecasting
Elliot Beck and Michael Wolf, in this paper, adapt the Hedged Random Forest (HRF) framework for inflation forecasting. The authors employ the hedged random forest because standard random forests use equal weighting of individual trees, which may not be optimal for time-series data like inflation where economic conditions change over time and recent observations may be more informative than distant past observations. The hedged random forest differs from standard random forests by:
- Using non-equal and potentially negative weights for individual trees instead of simple averaging
- Optimizing weights to minimize mean-squared error based on estimated mean vector and covariance matrix of forecast errors
- Implementing exponentially weighted moving average (EWMA) estimation combined with linear shrinkage, specifically designed for time-series data
- Employing a path-average forecasting approach that forecasts monthly price changes and aggregates them into year-over-year inflation predictions
The study uses 464 features from the FRED-MD database covering January 1960 through March 2025, analyzing six inflation measures across US and Swiss data with forecast horizons from 1 to 12 months.
Findings
The hedged random forest demonstrates consistent and statistically significant outperformance over the standard random forest:
- Root Mean-Squared Error (RMSE) improvements: 3.2% to 8.2% reduction across all inflation measures, with core inflation showing the largest gains (over 9% for some horizons)
- Mean Absolute Error (MAE) improvements: 4.2% to 8.6% reduction, with improvements of nearly 6% for headline inflation and over 6% for some measures
- Statistical significance: 85% of p-values below 0.1 for squared error loss and 97% for absolute error loss using modified Diebold-Mariano tests
- Temporal stability: Cumulative error difference analysis shows consistent outperformance over time, with particularly pronounced improvements during post-recession periods
Forecasting inflation with the hedged random forest
Authors: Elliot Beck, Michael Wolf
From: Swiss National Bank, University of Zurich
Machine learning meets Phillips Curve: interpreting non-linear inflation dynamics
This paper, by Marcus Buckmann, Galina Potjagailo, and Philip Schnattinger, addresses a fundamental challenge: understanding what drives inflation when economic relationships are non-linear. The authors introduce the Blockwise Boosted Inflation Model (BBIM), which combines machine learning’s predictive power with economic theory’s interpretability. Rather than treating machine learning as a “black box,” they structure their model around the familiar open-economy Phillips curve framework, organizing economic indicators into meaningful blocks representing different inflation drivers: trend, global/domestic demand, and global/domestic supply.
Methodology
- Applied monotonicity constraints to separate demand and supply effects: demand indicators constrained to positive (or negative for slack) contributions, supply indicators constrained oppositely, ensuring theory-consistent directional effects.
- Included over 50 monthly UK indicators (1989–2024) at up to three lags per series, plus externally identified global shocks (oil supply, demand) placed in relevant blocks.
- Trained with up to 200 boosting rounds, random block ordering each round, small learning rate, early stopping via cross-validation, and subsampling of observations and features to mitigate overfitting.
- Employed Shapley values to extract and visualize non-linear functional relationships between indicators and inflation predictions within each block.
Findings
- Supply shocks dominated the recent UK inflation surge, driven mainly by global supply chain pressures and commodity price spikes, transmitted through domestic food and energy prices.
- Non-linear Phillips curve: inflation responds sharply to tight labor markets (high vacancy-to-unemployment and low unemployment gaps), generating L-shaped demand effects in high-inflation episodes.
- Inflation expectations non-linearities: short-term household expectations exert minimal impact until exceeding ~4%, after which they substantially raise trend inflation; long-term expectations remained anchored.
- Model interpretability and performance: BBIM outperformed linear benchmarks and matched or exceeded unstructured machine learning in out-of-sample forecasts, especially at short horizons, while providing transparent decompositions of inflation drivers.
- Robustness checks: results on block contributions and non-linear relationships held across alternative block orderings, trend specifications, lag lengths, and hyperparameter settings.


Blockwise Boosted Inflation: Non‑linear determinants of inflation using machine learning
Authors: Marcus Buckmann, Galina Potjagailo, Philip Schnattinger
From: Bank of England