Skip to main content

Macroeconomic Forecasting Based on LSTM-Conditioned Normalizing Flows

  • Chapter
  • First Online:
Prediction and Causality in Econometrics and Related Topics (ECONVN 2021)

Abstract

Macroeconomic forecasting is a key task of developing the outlook for economy of a country and supporting decision making. In this paper we present a novel approach to macroeconomic forecasting based on LSTM-based encoder-decoder and conditional normalizing flows. First, we employ LSTM-based encoder-decoder to learn vector representations of the input data. The obtained representations are then transformed by using conditional normalizing flows. In such a way, the distribution of the data encoded in the representations is transformed into a more complex distribution. We evaluate the proposed approach on 215 macroeconomic variables of FRED-QD dataset. In experiments, we use two kinds of normalizing flows: Real-valued Non-Volume Preserving and Masked Autoregressive Flow. Experimental results show that proposed approach outperforms VAR in several orders of magnitude and also outperforms DeepVAR on the benchmark dataset. To the best of our knowledge, this is the first time LSTM-based encoder-decoder in combination with conditional normalizing flows has been successfully adopted to forecast hundreds of macroeconomic variables simultaneously.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Image taken from https://colah.github.io/posts/2015-08-Understanding-LSTMs/.

  2. 2.

    Source: https://dfdazac.github.io/02-flows.html.

  3. 3.

    Source: https://lilianweng.github.io/lil-log/2018/10/13/flow-based-deep-generative-models.html.

  4. 4.

    We employ VAR and LASSO using sciKit-learn at https://scikit-learn.org.

  5. 5.

    We use DeepVAR, LSTM-RealNVP, and LSTM-MAF implemented at https://github.com/zalandoresearch/pytorch-ts in experiments.

References

  1. Alexandrov, A., et al.: GluonTS: probabilistic and neural time series modeling in python. J. Mach. Learn. Res. 21(116), 1–6 (2020)

    MATH  Google Scholar 

  2. Bengio, Y., Courville, A., Vincent, P.: Representation learning: a review and new perspectives. IEEE Trans. Pattern Anal. Mach. Intell. 35(8), 1798–1828 (2013)

    Article  Google Scholar 

  3. Benidis, K., et al.: Neural forecasting: Introduction and literature overview. arXiv preprint arXiv:2004.10240 (2020)

  4. Bolhuis, M., Rayner, B.: Deus ex machina? A framework for macro forecasting with machine learning. In: IMF Working Papers, vol. 2020(45). International Monetary Fund (2020). https://doi.org/10.5089/9781513531724.001

  5. Chakraborty, C., Joseph, A., et al.: Machine learning at central banks. Technical report, Bank of England (2017)

    Google Scholar 

  6. Cho, K., et al.: Learning phrase representations using RNN encoder–decoder for statistical machine translation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1724–1734 (2014)

    Google Scholar 

  7. Chung, J., Gulcehre, C., Cho, K., Bengio, Y.: Empirical evaluation of gated recurrent neural networks on sequence modeling. In: NIPS 2014 Workshop on Deep Learning (2014)

    Google Scholar 

  8. Cook, T.R., Smalter Hall, A.: Macroeconomic indicator forecasting with deep neural networks. In: Proceedings of 2nd International Conference on Advanced Research Methods and Analytics (CARMA 2018), pp. 261–261 (2018)

    Google Scholar 

  9. Dinh, L., Sohl-Dickstein, J., Bengio, S.: Density estimation using real NVP. arXiv preprint arXiv:1605.08803 (2016)

  10. Fawaz, H.I., Forestier, G., Weber, J., Idoumghar, L., Muller, P.A.: Deep learning for time series classification: a review. Data Mining Knowl. Discov. 33(4), 917–963 (2019)

    Google Scholar 

  11. Gneiting, T., Raftery, A.E.: Strictly proper scoring rules, prediction, and estimation. J. Am. Stat. Assoc. 102(477), 359–378 (2007)

    Article  MathSciNet  Google Scholar 

  12. Hall, A.S.: Machine learning approaches to macroeconomic forecasting. Econ. Rev. 103(4), 63 (2018)

    Google Scholar 

  13. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)

    Article  Google Scholar 

  14. Ioffe, S., Szegedy, C.: Batch normalization: accelerating deep network training by reducing internal covariate shift. In: Proceedings of International Conference on Machine Learning, pp. 448–456 (2015)

    Google Scholar 

  15. Jordan, M.I., Mitchell, T.M.: Machine learning: trends, perspectives, and prospects. Science 349(6245), 255–260 (2015)

    Article  MathSciNet  Google Scholar 

  16. Jung, J.K., Patnam, M., Ter-Martirosyan, A.: An algorithmic crystal ball: forecasts-based on machine learning. International Monetary Fund (2018)

    Google Scholar 

  17. LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521(7553), 436–444 (2015)

    Article  Google Scholar 

  18. Lim, B., Zohren, S.: Time series forecasting with deep learning: a survey. arXiv preprint arXiv:2004.13408 (2020)

  19. Makridakis, S., Spiliotis, E., Assimakopoulos, V.: The m4 competition: 100,000 time series and 61 forecasting methods. Int. J. Forecast. 36(1), 54–74 (2020)

    Article  Google Scholar 

  20. McCracken, M., Ng, S.: FRED-QD: a quarterly database for macroeconomic research. Technical report, National Bureau of Economic Research (2020)

    Google Scholar 

  21. McCracken, M.W., Ng, S.: FRED-MD: a monthly database for macroeconomic research. J. Bus. Econ. Stat. 34(4), 574–589 (2016)

    Article  MathSciNet  Google Scholar 

  22. Medeiros, M.C., Vasconcelos, G.F., Veiga, A., Zilberman, E.: Forecasting inflation in a data-rich environment: the benefits of machine learning methods. J. Bus. Econ. Stat. 39, 98–119 (2019)

    Article  MathSciNet  Google Scholar 

  23. Papamakarios, G., Pavlakou, T., Murray, I.: Masked autoregressive flow for density estimation. In: Proceedings of Advances in Neural Information Processing Systems, pp. 2338–2347 (2017)

    Google Scholar 

  24. Pouyanfar, S., et al.: A survey on deep learning: algorithms, techniques, and applications. ACM Comput. Surv. (CSUR) 51(5), 1–36 (2018)

    Article  Google Scholar 

  25. Rasul, K., Sheikh, A.S., Schuster, I., Bergmann, U., Vollgraf, R.: Multi-variate probabilistic time series forecasting via conditioned normalizing flows. arXiv preprint arXiv:2002.06103 (2020)

  26. Sagheer, A., Kotb, M.: Unsupervised pre-training of a deep LSTM-based stacked autoencoder for multivariate time series forecasting problems. Sci. Rep. 9(1), 1–16 (2019)

    Article  Google Scholar 

  27. Salinas, D., Flunkert, V., Gasthaus, J., Januschowski, T.: DeepAR: probabilistic forecasting with autoregressive recurrent networks. Int. J. Forecast. 36(3), 1181–1191 (2020)

    Article  Google Scholar 

  28. Shih, S.Y., Sun, F.K., Lee, H.y.: Temporal pattern attention for multivariate time series forecasting. Mach. Learn. 108(8-9), 1421–1441 (2019)

    Google Scholar 

  29. Smyl, S.: A hybrid method of exponential smoothing and recurrent neural networks for time series forecasting. Int. J. Forecast. 36(1), 75–85 (2020)

    Article  Google Scholar 

  30. Zhang, C., Patras, P., Haddadi, H.: Deep learning in mobile and wireless networking: a survey. IEEE Commun. Surv. Tutorials 21(3), 2224–2287 (2019)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hien T. Nguyen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Nguyen, H.T. et al. (2022). Macroeconomic Forecasting Based on LSTM-Conditioned Normalizing Flows. In: Ngoc Thach, N., Ha, D.T., Trung, N.D., Kreinovich, V. (eds) Prediction and Causality in Econometrics and Related Topics. ECONVN 2021. Studies in Computational Intelligence, vol 983. Springer, Cham. https://doi.org/10.1007/978-3-030-77094-5_48

Download citation

Publish with us

Policies and ethics