Economics at your fingertips  

Forecasting Canadian GDP growth using XGBoost

Shafiullah Qureshi (), Ba M Chu () and Fanny S. Demers ()
Additional contact information
Shafiullah Qureshi: Department of Economics, Carleton University,
Ba M Chu: Department of Economics, Carleton University,
Fanny S. Demers: Department of Economics, Carleton University,

No 20-14, Carleton Economic Papers from Carleton University, Department of Economics

Abstract: The objective of this paper is to apply state-of-the-art machine-learning (ML) algorithms to predict the monthly and quarterly real GDP growth of Canada using both Google Trends (GT) and Official data that are available ahead of the release of GDP data by Statistics Canada. This paper applies a novel approach for selecting features with Extreme Gradient Boosting (XGBoost) using the AutoML function of H2O. For this purpose, 5000 to 15000 XGBoost models are trained using this function. We use a very rigorous variable selection procedure, where only the best features are selected into the next stage to build a final learning model. Then pertinent features are introduced into XGBoost for forecasting real GDP growth rate. The forecasts are further improved by using Principal Component Analysis (PCA) to choose the best factors out of the predictors selected by XGBoost. The results indicate that there are gains in nowcasting accuracy from using XGBoost with this two-step strategy. We first find that XGBoost is a superior algorithm for forecasting relative to our baseline methods, such as autoregression and other standard boosting algorithms. We also find that Google Trends data provides a very viable source of information for predicting Canadian real GDP growth with XGBoost when Official data are not yet available due to publication lags. Therefore, we can forecast real GDP growth rate accurately ahead of the release of Official data. Moreover, we apply various techniques to make the machine learning model more interpretable.

Pages: 36 pages
Date: 2020-08, Revised 2020-08-24
New Economics Papers: this item is included in nep-big and nep-for
References: View references in EconPapers View complete reference list from CitEc
Citations: Track citations by RSS feed

Published: Carleton Economics Papers

Downloads: (external link)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link:

Ordering information: This working paper can be ordered from

Access Statistics for this paper

More papers in Carleton Economic Papers from Carleton University, Department of Economics C870 Loeb Building, 1125 Colonel By Drive, Ottawa Ontario, K1S 5B6 Canada.
Bibliographic data for series maintained by Sabrina Robineau ( this e-mail address is bad, please contact ).

Page updated 2023-01-24
Handle: RePEc:car:carecp:20-14