Forecasting inflation with the hedged random forest

June 4, 2025
Issue 2025-07

Summary

Accurately forecasting inflation is critical for economic policy, financial markets, and broader societal stability. In recent years, machine learning methods have shown great potential for improving the accuracy of inflation forecasts; specifically, the random forest stands out as a particularly effective approach that consistently outperforms traditional benchmark models in empirical studies. Building on this foundation, this paper adapts the hedged random forest (HRF) framework of Beck et al. (2024) for the task of forecasting inflation. Unlike the standard random forest, the HRF employs non-equal (and even negative) weights of the individual trees, which are designed to improve forecasting accuracy. We develop estimators of the HRF's two inputs, the mean and the covariance matrix of the errors corresponding to the individual trees, that are customized for the task at hand. An extensive empirical analysis demonstrates that the proposed approach consistently outperforms the standard random forest.

Download file now

The file can be downloaded with the button below.

Issue:
07
Pages:
46
JEL classification:
C21, C53, C31, C37, E47
Keywords:
Exponentially weighted moving average, Linear shrinkage, Machine learning
Year:
2025

Author(s)

  • Elliot Beck

  • Michael Wolf

Your settings

Required: These cookies (e.g. for storing your IP address) cannot be rejected as they are necessary to ensure the operation of the website. These data are not evaluated further.
Analytics: If you consent to this category, data such as IP address, location, device information, browser version and site visitor behaviour will be collected. These data are evaluated for the SNB's internal purposes and are kept for two years.
Third-party: If you consent to this category, third-party services (used, for example, to add social multimedia content to the SNB's website) will be activated which collect personal data, process these data, disclose them abroad - worldwide - and place cookies. The relevant data protection regulations are linked in the 'Privacy statement for the website of the Swiss National Bank'.

Choose your preferred settings:

This website uses cookies, analytics tools and other technologies to provide requested features, content and services, to personalise the content shown, to provide links to social media, and to analyse the use of the website in anonymised form for the purposes of improving usability. Personal data are also disclosed abroad - worldwide - to video service providers and the analytics tools of these providers are used. More information is available under 'Manage settings'.