IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2401.10255.html
   My bibliography  Save this paper

Nowcasting Madagascar's real GDP using machine learning algorithms

Author

Listed:
  • Franck Ramaharo
  • Gerzhino Rasolofomanana

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.

Suggested Citation

  • Franck Ramaharo & Gerzhino Rasolofomanana, 2023. "Nowcasting Madagascar's real GDP using machine learning algorithms," Papers 2401.10255, arXiv.org.
  • Handle: RePEc:arx:papers:2401.10255
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2401.10255
    File Function: Latest version
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. Shafiullah Qureshi & Ba M. Chu & Fanny S. Demers, 2020. "Forecasting Canadian GDP growth using XGBoost," Carleton Economic Papers 20-14, Carleton University, Department of Economics, revised 24 Aug 2020.
    2. Giannone, Domenico & Reichlin, Lucrezia & Small, David, 2008. "Nowcasting: The real-time informational content of macroeconomic data," Journal of Monetary Economics, Elsevier, vol. 55(4), pages 665-676, May.
    3. 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.
    4. 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).
    5. Kristian Jönsson, 2020. "Machine Learning and Nowcasts of Swedish GDP," Journal of Business Cycle Research, Springer;Centre for International Research on Economic Tendency Surveys (CIRET), vol. 16(2), pages 123-134, November.
    6. Richardson, Adam & van Florenstein Mulder, Thomas & Vehbi, Tuğrul, 2021. "Nowcasting GDP using machine-learning algorithms: A real-time assessment," International Journal of Forecasting, Elsevier, vol. 37(2), pages 941-948.
    7. Tashman, Leonard J., 2000. "Out-of-sample tests of forecasting accuracy: an analysis and review," International Journal of Forecasting, Elsevier, vol. 16(4), pages 437-450.
    8. Paolo Fornaro & Henri Luomaranta, 2020. "Nowcasting Finnish real economic activity: a machine learning approach," Empirical Economics, Springer, vol. 58(1), pages 55-71, January.
    9. 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.
    10. Karim Barhoumi & Seung Mo Choi & Tara Iyer & Jiakun Li & Franck Ouattara & Mr. Andrew J Tiffin & Jiaxiong Yao, 2022. "Overcoming Data Sparsity: A Machine Learning Approach to Track the Real-Time Impact of COVID-19 in Sub-Saharan Africa," IMF Working Papers 2022/088, International Monetary Fund.
    11. Jeremy Smith & Kenneth F. Wallis, 2009. "A Simple Explanation of the Forecast Combination Puzzle," Oxford Bulletin of Economics and Statistics, Department of Economics, University of Oxford, vol. 71(3), pages 331-355, June.
    12. Rickard Nyman & Paul Ormerod, 2017. "Predicting Economic Recessions Using Machine Learning Algorithms," Papers 1701.01428, arXiv.org.
    13. Giovanni Cicceri & Giuseppe Inserra & Michele Limosani, 2020. "A Machine Learning Approach to Forecast Economic Recessions—An Italian Case Study," Mathematics, MDPI, vol. 8(2), pages 1-20, February.
    14. Byron Botha & Tim Olds & Geordie Reid & Daan Steenkamp & Rossouw van Jaarsveld, 2021. "Nowcasting South African gross domestic product using a suite of statistical models," South African Journal of Economics, Economic Society of South Africa, vol. 89(4), pages 526-554, December.
    15. 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.
    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. repec:osf:africa:vpuac_v1 is not listed on IDEAS
    2. 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.
    3. Juan Laborda & Sonia Ruano & Ignacio Zamanillo, 2023. "Multi-Country and Multi-Horizon GDP Forecasting Using Temporal Fusion Transformers," Mathematics, MDPI, vol. 11(12), pages 1-26, June.
    4. Jairo Flores & Bruno Gonzaga & Walter Ruelas-Huanca & Juan Tang, 2025. "Nowcasting Peru's GDP with Machine Learning Methods," IHEID Working Papers 01-2025, Economics Section, The Graduate Institute of International Studies.
    5. Juan Tenorio & Wilder Perez, 2024. "Monthly GDP nowcasting with Machine Learning and Unstructured Data," Papers 2402.04165, arXiv.org.
    6. Dennis Kant & Andreas Pick & Jasper de Winter, 2025. "Nowcasting GDP using machine learning methods," AStA Advances in Statistical Analysis, Springer;German Statistical Society, vol. 109(1), pages 1-24, March.
    7. 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.
    8. 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.
    9. Daniel Hopp, 2022. "Benchmarking Econometric and Machine Learning Methodologies in Nowcasting," Papers 2205.03318, arXiv.org.
    10. Alexandra Bozhechkova & Urmat Dzhunkeev, 2024. "CLARA and CARLSON: Combination of Ensemble and Neural Network Machine Learning Methods for GDP Forecasting," Russian Journal of Money and Finance, Bank of Russia, vol. 83(3), pages 45-69, September.
    11. Kaustubh, Kaustubh & Ranjan, Abhishek, 2025. "A multi-factor GDP nowcast model for India," Economic Modelling, Elsevier, vol. 147(C).
    12. Danilo Cascaldi-Garcia & Matteo Luciani & Michele Modugno, 2024. "Lessons from nowcasting GDP across the world," Chapters, in: Michael P. Clements & Ana Beatriz Galvão (ed.), Handbook of Research Methods and Applications in Macroeconomic Forecasting, chapter 8, pages 187-217, Edward Elgar Publishing.
    13. Dalia Atif, 2025. "Enhancing Long-Term GDP Forecasting with Advanced Hybrid Models: A Comparative Study of ARIMA-LSTM and ARIMA-TCN with Dense Regression," Computational Economics, Springer;Society for Computational Economics, vol. 65(6), pages 3447-3473, June.
    14. Kristian Jönsson, 2024. "Neighbor Weighting and Distance Metrics in Nearest Neighbor Nowcasting of Swedish GDP," Journal of Quantitative Economics, Springer;The Indian Econometric Society (TIES), vol. 22(4), pages 1077-1089, December.
    15. 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.
    16. Alina Stundziene & Vaida Pilinkiene & Jurgita Bruneckiene & Andrius Grybauskas & Mantas Lukauskas & Irena Pekarskiene, 2024. "Future directions in nowcasting economic activity: A systematic literature review," Journal of Economic Surveys, Wiley Blackwell, vol. 38(4), pages 1199-1233, September.
    17. Marijn A. Bolhuis & Brett Rayner, 2020. "Deus ex Machina? A Framework for Macro Forecasting with Machine Learning," IMF Working Papers 2020/045, International Monetary Fund.
    18. Maas, Benedikt, 2019. "Nowcasting and forecasting US recessions: Evidence from the Super Learner," MPRA Paper 96408, University Library of Munich, Germany.
    19. Diakonova, Marina & Molina, Luis & Mueller, Hannes & Pérez, Javier J. & Rauh, Christopher, 2024. "The information content of conflict, social unrest and policy uncertainty measures for macroeconomic forecasting," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 5(4).
    20. James Chapman & Ajit Desai, . "Using payments data to nowcast macroeconomic variables during the onset of Covid-19," Journal of Financial Market Infrastructures, Journal of Financial Market Infrastructures.
    21. Richard Schnorrenberger & Aishameriane Schmidt & Guilherme Valle Moura, 2024. "Harnessing Machine Learning for Real-Time Inflation Nowcasting," Working Papers 806, DNB.

    More about this item

    JEL classification:

    • C02 - Mathematical and Quantitative Methods - - General - - - Mathematical Economics
    • C53 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Forecasting and Prediction Models; Simulation Methods
    • C63 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computational Techniques
    • E17 - Macroeconomics and Monetary Economics - - General Aggregative Models - - - Forecasting and Simulation: Models and Applications

    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:arx:papers:2401.10255. 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: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    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.