Nowcasting Madagascar's real GDP using machine learning algorithms
Franck Ramaharo, Gerzhino Rasolofomanana
TL;DR
This study evaluates multiple machine learning algorithms to nowcast Madagascar's real GDP using 10 quarterly leading indicators from 2007Q1 to 2022Q4, benchmarked against simple econometric models. By applying robust data preprocessing and a forward chaining time-series cross-validation framework, the authors demonstrate that an ensemble of models delivers more accurate nowcasts than traditional methods, particularly during volatile periods such as the COVID-19 shock. XGBoost and the ensemble approach often achieve the best predictive performance across scenarios, with robust scaling enhancing accuracy. The findings support the practical use of ML-based ensemble nowcasting for real-time policymaking in Madagascar and highlight the value of combining diverse models and updating forecasts with newer data.
Abstract
We investigate the predictive power of different machine learning algorithms to nowcast Madagascar's gross domestic product (GDP). We trained popular regression models, including linear regularized regression (Ridge, Lasso, Elastic-net), dimensionality reduction model (principal component regression), k-nearest neighbors algorithm (k-NN regression), support vector regression (linear SVR), and tree-based ensemble models (Random forest and XGBoost regressions), on 10 Malagasy quarterly macroeconomic leading indicators over the period 2007Q1--2022Q4, and we used simple econometric models as a benchmark. We measured the nowcast accuracy of each model by calculating the root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). Our findings reveal that the Ensemble Model, formed by aggregating individual predictions, consistently outperforms traditional econometric models. We conclude that machine learning models can deliver more accurate and timely nowcasts of Malagasy economic performance and provide policymakers with additional guidance for data-driven decision making.
