IDEAS home Printed from https://ideas.repec.org/a/eee/econom/v249y2025ipcs030440762400188x.html
   My bibliography  Save this article

Bayesian neural networks for macroeconomic analysis

Author

Listed:
  • Hauzenberger, Niko
  • Huber, Florian
  • Klieber, Karin
  • Marcellino, Massimiliano

Abstract

Macroeconomic data is characterized by a limited number of observations (small T), many time series (big K) but also by featuring temporal dependence. Neural networks, by contrast, are designed for datasets with millions of observations and covariates. In this paper, we develop Bayesian neural networks (BNNs) that are well-suited for handling datasets commonly used for macroeconomic analysis in policy institutions. Our approach avoids extensive specification searches through a novel mixture specification for the activation function that appropriately selects the form of nonlinearities. Shrinkage priors are used to prune the network and force irrelevant neurons to zero. To cope with heteroskedasticity, the BNN is augmented with a stochastic volatility model for the error term. We illustrate how the model can be used in a policy institution through simulations and by showing that BNNs produce more accurate point and density forecasts compared to other machine learning methods.

Suggested Citation

  • Hauzenberger, Niko & Huber, Florian & Klieber, Karin & Marcellino, Massimiliano, 2025. "Bayesian neural networks for macroeconomic analysis," Journal of Econometrics, Elsevier, vol. 249(PC).
  • Handle: RePEc:eee:econom:v:249:y:2025:i:pc:s030440762400188x
    DOI: 10.1016/j.jeconom.2024.105843
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S030440762400188X
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.jeconom.2024.105843?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to look for a different version below or search for a different version of it.

    Other versions of this item:

    References listed on IDEAS

    as
    1. Ramsey James B. & Lampart Camille, 1998. "The Decomposition of Economic Relationships by Time Scale Using Wavelets: Expenditure and Income," Studies in Nonlinear Dynamics & Econometrics, De Gruyter, vol. 3(1), pages 1-22, April.
    2. Ivo Welch & Amit Goyal, 2008. "A Comprehensive Look at The Empirical Performance of Equity Premium Prediction," The Review of Financial Studies, Society for Financial Studies, vol. 21(4), pages 1455-1508, July.
    3. Carlos M. Carvalho & Nicholas G. Polson & James G. Scott, 2010. "The horseshoe estimator for sparse signals," Biometrika, Biometrika Trust, vol. 97(2), pages 465-480.
    4. Michael W. McCracken & Serena Ng, 2016. "FRED-MD: A Monthly Database for Macroeconomic Research," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 34(4), pages 574-589, October.
    5. Barbara Rossi, 2013. "Exchange Rate Predictability," Journal of Economic Literature, American Economic Association, vol. 51(4), pages 1063-1119, December.
    6. Vasicek, Oldrich A & Fong, H Gifford, 1982. "Term Structure Modeling Using Exponential Splines," Journal of Finance, American Finance Association, vol. 37(2), pages 339-348, May.
    7. Daniel R. Kowal & David S. Matteson & David Ruppert, 2019. "Dynamic shrinkage processes," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 81(4), pages 781-804, September.
    8. Marcellino, Massimiliano & Stock, James H. & Watson, Mark W., 2006. "A comparison of direct and iterated multistep AR methods for forecasting macroeconomic time series," Journal of Econometrics, Elsevier, vol. 135(1-2), pages 499-526.
    9. Stock, James H. & Watson, Mark W., 1999. "Forecasting inflation," Journal of Monetary Economics, Elsevier, vol. 44(2), pages 293-335, October.
    10. John Y. Campbell & Tuomo Vuolteenaho, 2004. "Inflation Illusion and Stock Prices," American Economic Review, American Economic Association, vol. 94(2), pages 19-23, May.
    11. Huber, Florian & Koop, Gary & Onorante, Luca & Pfarrhofer, Michael & Schreiner, Josef, 2023. "Nowcasting in a pandemic using non-parametric mixed frequency VARs," Journal of Econometrics, Elsevier, vol. 232(1), pages 52-69.
    12. Miguel A.G. Belmonte & Gary Koop & Dimitris Korobilis, 2014. "Hierarchical Shrinkage in Time‐Varying Parameter Models," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 33(1), pages 80-94, January.
    13. Barro, Robert J. & Lee, Jong-Wha, 1994. "Sources of economic growth," Carnegie-Rochester Conference Series on Public Policy, Elsevier, vol. 40(1), pages 1-46, June.
    14. Campbell, John Y., 1987. "Stock returns and the term structure," Journal of Financial Economics, Elsevier, vol. 18(2), pages 373-399, June.
    15. Joscha Beckmann & Gary Koop & Dimitris Korobilis & Rainer Alexander Schüssler, 2020. "Exchange rate predictability and dynamic Bayesian learning," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 35(4), pages 410-421, June.
    16. John Y. Campbell, Robert J. Shiller, 1988. "The Dividend-Price Ratio and Expectations of Future Dividends and Discount Factors," The Review of Financial Studies, Society for Financial Studies, vol. 1(3), pages 195-228.
    17. Amisano, Gianni & Fagan, Gabriel, 2013. "Money growth and inflation: A regime switching approach," Journal of International Money and Finance, Elsevier, vol. 33(C), pages 118-145.
    18. Florian Huber & Michael Pfarrhofer, 2021. "Dynamic shrinkage in time‐varying parameter stochastic volatility in mean models," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 36(2), pages 262-270, March.
    19. Hamilton, James D, 1989. "A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle," Econometrica, Econometric Society, vol. 57(2), pages 357-384, March.
    20. Fama, Eugene F. & French, Kenneth R., 1988. "Dividend yields and expected stock returns," Journal of Financial Economics, Elsevier, vol. 22(1), pages 3-25, October.
    21. Florian Huber & Gary Koop & Luca Onorante, 2021. "Inducing Sparsity and Shrinkage in Time-Varying Parameter Models," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 39(3), pages 669-683, July.
    22. Gallegati, Marco, 2008. "Wavelet analysis of stock returns and aggregate economic activity," Computational Statistics & Data Analysis, Elsevier, vol. 52(6), pages 3061-3074, February.
    23. Hodrick, Robert J, 1992. "Dividend Yields and Expected Stock Returns: Alternative Procedures for Inference and Measurement," The Review of Financial Studies, Society for Financial Studies, vol. 5(3), pages 357-386.
    24. Ai, Chunrong & Norton, Edward C., 2003. "Interaction terms in logit and probit models," Economics Letters, Elsevier, vol. 80(1), pages 123-129, July.
    25. Guido W. Imbens & Jeffrey M. Wooldridge, 2009. "Recent Developments in the Econometrics of Program Evaluation," Journal of Economic Literature, American Economic Association, vol. 47(1), pages 5-86, March.
    26. A. Bhattacharya & D. B. Dunson, 2011. "Sparse Bayesian infinite factor models," Biometrika, Biometrika Trust, vol. 98(2), pages 291-306.
    27. Yu Bai & Andrea Carriero & Todd E. Clark & Massimiliano Marcellino, 2022. "Macroeconomic forecasting in a multi‐country context," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 37(6), pages 1230-1255, September.
    28. Kastner, Gregor & Frühwirth-Schnatter, Sylvia, 2014. "Ancillarity-sufficiency interweaving strategy (ASIS) for boosting MCMC estimation of stochastic volatility models," Computational Statistics & Data Analysis, Elsevier, vol. 76(C), pages 408-423.
    29. Blix, Mårten, 1999. "Forecasting Swedish Inflation With a Markov Switching VAR," Working Paper Series 76, Sveriges Riksbank (Central Bank of Sweden).
    30. David S. Lee & Thomas Lemieux, 2010. "Regression Discontinuity Designs in Economics," Journal of Economic Literature, American Economic Association, vol. 48(2), pages 281-355, June.
    31. Diebold, Francis X & Mariano, Roberto S, 2002. "Comparing Predictive Accuracy," Journal of Business & Economic Statistics, American Statistical Association, vol. 20(1), pages 134-144, January.
    32. Fama, Eugene F. & Schwert, G. William, 1977. "Asset returns and inflation," Journal of Financial Economics, Elsevier, vol. 5(2), pages 115-146, November.
    33. Greene, William, 2010. "Testing hypotheses about interaction terms in nonlinear models," Economics Letters, Elsevier, vol. 107(2), pages 291-296, May.
    34. Lewellen, Jonathan, 2004. "Predicting returns with financial ratios," Journal of Financial Economics, Elsevier, vol. 74(2), pages 209-235, November.
    35. Raffaella Giacomini & Barbara Rossi, 2010. "Forecast comparisons in unstable environments," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 25(4), pages 595-620.
    36. Spyros Makridakis & Evangelos Spiliotis & Vassilios Assimakopoulos, 2018. "Statistical and Machine Learning forecasting methods: Concerns and ways forward," PLOS ONE, Public Library of Science, vol. 13(3), pages 1-26, March.
    37. McCrary, Justin, 2008. "Manipulation of the running variable in the regression discontinuity design: A density test," Journal of Econometrics, Elsevier, vol. 142(2), pages 698-714, February.
    38. Anirban Bhattacharya & Debdeep Pati & Natesh S. Pillai & David B. Dunson, 2015. "Dirichlet--Laplace Priors for Optimal Shrinkage," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 110(512), pages 1479-1490, December.
    39. George, Edward I. & Sun, Dongchu & Ni, Shawn, 2008. "Bayesian stochastic search for VAR model restrictions," Journal of Econometrics, Elsevier, vol. 142(1), pages 553-580, January.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Hauzenberger, Niko & Huber, Florian & Klieber, Karin & Marcellino, Massimiliano, 2025. "Machine learning the macroeconomic effects of financial shocks," Economics Letters, Elsevier, vol. 250(C).
    2. Bobeica, Elena & Holton, Sarah & Huber, Florian & Martínez Hernández, Catalina, 2025. "Beware of large shocks! A non-parametric structural inflation model," Working Paper Series 3052, European Central Bank.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Hauzenberger, Niko & Huber, Florian & Klieber, Karin, 2023. "Real-time inflation forecasting using non-linear dimension reduction techniques," International Journal of Forecasting, Elsevier, vol. 39(2), pages 901-921.
    2. Rapach, David & Zhou, Guofu, 2013. "Forecasting Stock Returns," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 2, chapter 0, pages 328-383, Elsevier.
    3. Jiang, Fuwei & Lee, Joshua & Martin, Xiumin & Zhou, Guofu, 2019. "Manager sentiment and stock returns," Journal of Financial Economics, Elsevier, vol. 132(1), pages 126-149.
    4. Sung Won Seo & Suk Joon Byun & Jun Sik Kim, 2020. "Index options open interest and stock market returns," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 40(6), pages 989-1010, June.
    5. Kothari, Pratik & O’Doherty, Michael S., 2023. "Job postings and aggregate stock returns," Journal of Financial Markets, Elsevier, vol. 64(C).
    6. Mykola Babiak & Jozef Barunik, 2020. "Deep Learning, Predictability, and Optimal Portfolio Returns," CERGE-EI Working Papers wp677, The Center for Economic Research and Graduate Education - Economics Institute, Prague.
    7. Schrimpf, Andreas, 2010. "International stock return predictability under model uncertainty," Journal of International Money and Finance, Elsevier, vol. 29(7), pages 1256-1282, November.
    8. Ferreira, Miguel A. & Santa-Clara, Pedro, 2011. "Forecasting stock market returns: The sum of the parts is more than the whole," Journal of Financial Economics, Elsevier, vol. 100(3), pages 514-537, June.
    9. Park, Dojoon & Hahn, Jaehoon & Eom, Young Ho, 2024. "Predicting the equity premium with financial ratios: A comprehensive look over a long period in Korea," Pacific-Basin Finance Journal, Elsevier, vol. 84(C).
    10. Pierre Giot & Mikael Petitjean, 2009. "Short-term market timing using the bond-equity yield ratio," The European Journal of Finance, Taylor & Francis Journals, vol. 15(4), pages 365-384.
    11. Maio, Paulo & Santa-Clara, Pedro, 2012. "Multifactor models and their consistency with the ICAPM," Journal of Financial Economics, Elsevier, vol. 106(3), pages 586-613.
    12. Li, Yan & Ng, David T. & Swaminathan, Bhaskaran, 2013. "Predicting market returns using aggregate implied cost of capital," Journal of Financial Economics, Elsevier, vol. 110(2), pages 419-436.
    13. Ekaterini Panopoulou & Sotiria Plastira, 2014. "Fama French factors and US stock return predictability," Journal of Asset Management, Palgrave Macmillan, vol. 15(2), pages 110-128, April.
    14. Faias, José Afonso, 2023. "Predicting the equity risk premium using the smooth cross-sectional tail risk: The importance of correlation," Journal of Financial Markets, Elsevier, vol. 63(C).
    15. Yu, Jialin, 2011. "Disagreement and return predictability of stock portfolios," Journal of Financial Economics, Elsevier, vol. 99(1), pages 162-183, January.
    16. John Y. Campbell & Samuel B. Thompson, 2005. "Predicting the Equity Premium Out of Sample: Can Anything Beat the Historical Average?," Harvard Institute of Economic Research Working Papers 2084, Harvard - Institute of Economic Research.
    17. Jurdi, Doureige & Kim, Jae, 2019. "Predicting the U.S. Stock Market Return: Evidence from the Improved Augmented Regression Method," MPRA Paper 94028, University Library of Munich, Germany.
    18. Bandi, F.M. & Perron, B. & Tamoni, A. & Tebaldi, C., 2019. "The scale of predictability," Journal of Econometrics, Elsevier, vol. 208(1), pages 120-140.
    19. Nima Nonejad, 2021. "An Overview Of Dynamic Model Averaging Techniques In Time‐Series Econometrics," Journal of Economic Surveys, Wiley Blackwell, vol. 35(2), pages 566-614, April.
    20. Thomadakis, Apostolos, 2016. "Do Combination Forecasts Outperform the Historical Average? Economic and Statistical Evidence," MPRA Paper 71589, University Library of Munich, Germany.

    More about this item

    Keywords

    Bayesian neural networks; Model selection; Shrinkage priors; Macroeconomic forecasting;
    All these keywords.

    JEL classification:

    • C11 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Bayesian Analysis: General
    • C30 - Mathematical and Quantitative Methods - - Multiple or Simultaneous Equation Models; Multiple Variables - - - General
    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C53 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Forecasting and Prediction Models; Simulation Methods
    • E3 - Macroeconomics and Monetary Economics - - Prices, Business Fluctuations, and Cycles
    • E44 - Macroeconomics and Monetary Economics - - Money and Interest Rates - - - Financial Markets and the Macroeconomy

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:econom:v:249:y:2025:i:pc:s030440762400188x. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/locate/jeconom .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.