IDEAS home Printed from https://ideas.repec.org/p/car/carecp/21-05.html
   My bibliography  Save this paper

Forecasting Canadian GDP Growth with Machine Learning

Author

Abstract

This paper applies state-of-the-art machine learning (ML) algorithms to forecast monthly real GDP growth in Canada by using both Google Trends (GT) data and official macroeconomic data (which are available ahead of the release of GDP data by Statistics Canada). We show that we can forecast real GDP growth accurately ahead of the release of GDP figures by using GT and official data (such as employment) as predictors. We first pre-select features by applying up-to-date techniques, namely XGBoost's variable importance score, and a recent variable-screening procedure for time series data, namely, PDC-SIS+. These pre-selected features are then used to build advanced ML models for forecasting real GDP growth, by employing tree-based ensemble algorithms, such as XGBoost, LightGBM, Random Forest, and GBM. We provide empirical evidence that the variables pre-selected by either PDC-SIS+ or the XGBoost's variable importance score can have a superior forecasting ability. We find that the pre-selected GT data features perform as well as the pre-selected official data features with respect to short-term forecasting ability, while the pre-selected official data features are superior with respect to long-term forecasting ability. We also find that (1) the ML algorithms we employ often perform better with a large smaple than with a small sample, even when the small sample has a larger set of predictors; and (2) the Random Forest (that often produces nonlinear models to capture nonlinear patterns in the data) tends to under-perform a standard autoregressive model in several cases while there is no clear evidence that the XGBoost and the LightGBM can always outperform each other.

Suggested Citation

  • Shafiullah Qureshi & Ba Chu & Fanny S. Demers, 2021. "Forecasting Canadian GDP Growth with Machine Learning," Carleton Economic Papers 21-05, Carleton University, Department of Economics.
  • Handle: RePEc:car:carecp:21-05
    as

    Download full text from publisher

    File URL: https://carleton.ca/economics/wp-content/uploads/cewp21-05.pdf
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Mr. Andrew J Tiffin, 2016. "Seeing in the Dark: A Machine-Learning Approach to Nowcasting in Lebanon," IMF Working Papers 2016/056, International Monetary Fund.
    2. Christian M. Dahl & Emil N. S{o}rensen, 2021. "Time Series (re)sampling using Generative Adversarial Networks," Papers 2102.00208, arXiv.org.
    3. Peter R. Hansen & Asger Lunde & James M. Nason, 2011. "The Model Confidence Set," Econometrica, Econometric Society, vol. 79(2), pages 453-497, March.
    4. Hyunyoung Choi & Hal Varian, 2012. "Predicting the Present with Google Trends," The Economic Record, The Economic Society of Australia, vol. 88(s1), pages 2-9, June.
    5. Jin-Kyu Jung & Manasa Patnam & Anna Ter-Martirosyan, 2018. "An Algorithmic Crystal Ball: Forecasts-based on Machine Learning," IMF Working Papers 2018/230, International Monetary Fund.
    6. Pincheira, Pablo & Hardy, Nicolas, 2021. "The Mean Squared Prediction Error Paradox," MPRA Paper 107403, University Library of Munich, Germany.
    7. Greg Tkacz, 2013. "Predicting Recessions in Real-Time: Mining Google Trends and Electronic Payments Data for Clues," C.D. Howe Institute Commentary, C.D. Howe Institute, issue 387, September.
    8. Chernis, Tony & Cheung, Calista & Velasco, Gabriella, 2020. "A three-frequency dynamic factor model for nowcasting Canadian provincial GDP growth," International Journal of Forecasting, Elsevier, vol. 36(3), pages 851-872.
    9. Susan Athey & Mohsen Bayati & Guido Imbens & Zhaonan Qu, 2019. "Ensemble Methods for Causal Effects in Panel Data Settings," AEA Papers and Proceedings, American Economic Association, vol. 109, pages 65-70, May.
    10. Foroni, Claudia & Marcellino, Massimiliano & Stevanovic, Dalibor, 2022. "Forecasting the Covid-19 recession and recovery: Lessons from the financial crisis," International Journal of Forecasting, Elsevier, vol. 38(2), pages 596-612.
    11. Götz, Thomas B. & Knetsch, Thomas A., 2019. "Google data in bridge equation models for German GDP," International Journal of Forecasting, Elsevier, vol. 35(1), pages 45-66.
    12. Tony Chernis & Rodrigo Sekkel, 2017. "A dynamic factor model for nowcasting Canadian GDP growth," Empirical Economics, Springer, vol. 53(1), pages 217-234, August.
    13. Marcelo C. Medeiros & Gabriel F. R. Vasconcelos & Álvaro Veiga & Eduardo Zilberman, 2021. "Forecasting Inflation in a Data-Rich Environment: The Benefits of Machine Learning Methods," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 39(1), pages 98-119, January.
    14. Jianqing Fan & Jinchi Lv, 2008. "Sure independence screening for ultrahigh dimensional feature space," Journal of the Royal Statistical Society Series B, Royal Statistical Society, vol. 70(5), pages 849-911, November.
    15. Tkacz, Greg, 2001. "Neural network forecasting of Canadian GDP growth," International Journal of Forecasting, Elsevier, vol. 17(1), pages 57-69.
    Full references (including those not matched with items on IDEAS)

    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. Caperna, Giulio & Colagrossi, Marco & Geraci, Andrea & Mazzarella, Gianluca, 2022. "A babel of web-searches: Googling unemployment during the pandemic," Labour Economics, Elsevier, vol. 74(C).
    2. Ricardo P. Masini & Marcelo C. Medeiros & Eduardo F. Mendes, 2023. "Machine learning advances for time series forecasting," Journal of Economic Surveys, Wiley Blackwell, vol. 37(1), pages 76-111, February.
    3. James T. E. Chapman & Ajit Desai, 2023. "Macroeconomic Predictions Using Payments Data and Machine Learning," Forecasting, MDPI, vol. 5(4), pages 1-32, November.
    4. Baumeister, Christiane & Guérin, Pierre, 2021. "A comparison of monthly global indicators for forecasting growth," International Journal of Forecasting, Elsevier, vol. 37(3), pages 1276-1295.
    5. James Chapman & Ajit Desai, 2021. "Using Payments Data to Nowcast Macroeconomic Variables During the Onset of COVID-19," Staff Working Papers 21-2, Bank of Canada.
    6. Laurent Ferrara & Anna Simoni, 2023. "When are Google Data Useful to Nowcast GDP? An Approach via Preselection and Shrinkage," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 41(4), pages 1188-1202, October.
    7. Chien-jung Ting & Yi-Long Hsiao, 2022. "Nowcasting the GDP in Taiwan and the Real-Time Tourism Data," Advances in Management and Applied Economics, SCIENPRESS Ltd, vol. 12(3), pages 1-2.
    8. Marijn A. Bolhuis & Brett Rayner, 2020. "The More the Merrier? A Machine Learning Algorithm for Optimal Pooling of Panel Data," IMF Working Papers 2020/044, International Monetary Fund.
    9. Stavros Degiannakis, 2023. "The D-model for GDP nowcasting," Swiss Journal of Economics and Statistics, Springer;Swiss Society of Economics and Statistics, vol. 159(1), pages 1-33, December.
    10. Chien-jung Ting & Yi-Long Hsiao & Rui-jun Su, 2022. "Application of the Real-Time Tourism Data in Nowcasting the Service Consumption in Taiwan," Journal of Applied Finance & Banking, SCIENPRESS Ltd, vol. 12(4), pages 1-4.
    11. Stankevich, Ivan, 2020. "Comparison of macroeconomic indicators nowcasting methods: Russian GDP case," Applied Econometrics, Russian Presidential Academy of National Economy and Public Administration (RANEPA), vol. 59, pages 113-127.
    12. Hamdy Ahmad Aly Alhendawy & Mohammed Galal Abdallah Mostafa & Mohamed Ibrahim Elgohari & Ibrahim Abdalla Abdelraouf Mohamed & Nabil Medhat Arafat Mahmoud & Mohamed Ahmed Mohamed Mater, 2023. "Determinants of Renewable Energy Production in Egypt New Approach: Machine Learning Algorithms," International Journal of Energy Economics and Policy, Econjournals, vol. 13(6), pages 679-689, November.
    13. Jaehyun Yoon, 2021. "Forecasting of Real GDP Growth Using Machine Learning Models: Gradient Boosting and Random Forest Approach," Computational Economics, Springer;Society for Computational Economics, vol. 57(1), pages 247-265, January.
    14. Daniel Hopp, 2022. "Benchmarking Econometric and Machine Learning Methodologies in Nowcasting," Papers 2205.03318, arXiv.org.
    15. Krist'of N'emeth & D'aniel Hadh'azi, 2023. "GDP nowcasting with artificial neural networks: How much does long-term memory matter?," Papers 2304.05805, arXiv.org, revised Feb 2024.
    16. Ashton de Silva & Maria Yanotti & Sarah Sinclair & Sveta Angelopoulos, 2023. "Place‐Based Policies and Nowcasting," Australian Economic Review, The University of Melbourne, Melbourne Institute of Applied Economic and Social Research, vol. 56(3), pages 363-370, September.
    17. Araujo, Gustavo Silva & Gaglianone, Wagner Piazza, 2023. "Machine learning methods for inflation forecasting in Brazil: New contenders versus classical models," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 4(2).
    18. Caperna, Giulio & Colagrossi, Marco & Geraci, Andrea & Mazzarella, Gianluca, 2020. "Googling Unemployment During the Pandemic: Inference and Nowcast Using Search Data," Working Papers 2020-04, Joint Research Centre, European Commission.
    19. Zhang, Qin & Ni, He & Xu, Hao, 2023. "Nowcasting Chinese GDP in a data-rich environment: Lessons from machine learning algorithms," Economic Modelling, Elsevier, vol. 122(C).
    20. Sabyasachi Kar & Amaani Bashir & Mayank Jain, 2021. "New Approaches to Forecasting Growth and Inflation: Big Data and Machine Learning," IEG Working Papers 446, Institute of Economic Growth.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:car:carecp:21-05. 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: Court Lindsay (email available below). General contact details of provider: .

    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.