IDEAS home Printed from https://ideas.repec.org/a/eee/lajcba/v1y2020i1s2666143820300120.html
   My bibliography  Save this article

Forecasting Costa Rican inflation with machine learning methods

Author

Listed:
  • Rodríguez-Vargas, Adolfo

Abstract

We present a first assessment of the predictive ability of machine learning methods for inflation forecasting in Costa Rica. We compute forecasts using two variants of k-nearest neighbors, random forests, extreme gradient boosting and a long short-term memory (LSTM) network. We evaluate their properties according to criteria from the optimal forecast literature, and we compare their performance with that of an average of univariate inflation forecasts currently used by the Central Bank of Costa Rica. We find that the best-performing forecasts are those of LSTM, univariate KNN and, to a lesser extent, random forests. Furthermore, a combination performs better than the individual forecasts included in it and the average of the univariate forecasts. This combination not biased; its forecast errors show appropriate properties, and it improves the forecast accuracy at all horizons, both for the level of inflation and for the direction of its changes.

Suggested Citation

  • Rodríguez-Vargas, Adolfo, 2020. "Forecasting Costa Rican inflation with machine learning methods," Latin American Journal of Central Banking (previously Monetaria), Elsevier, vol. 1(1).
  • Handle: RePEc:eee:lajcba:v:1:y:2020:i:1:s2666143820300120
    DOI: 10.1016/j.latcb.2020.100012
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S2666143820300120
    Download Restriction: Gold Open Access

    File URL: https://libkey.io/10.1016/j.latcb.2020.100012?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Lisi, Francesco & Schiavo, Rosa A., 1999. "A comparison between neural networks and chaotic models for exchange rate prediction," Computational Statistics & Data Analysis, Elsevier, vol. 30(1), pages 87-102, March.
    2. Klaus Wohlrabe & Teresa Buchen, 2014. "Assessing the Macroeconomic Forecasting Performance of Boosting: Evidence for the United States, the Euro Area and Germany," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 33(4), pages 231-242, July.
    3. West, Kenneth D., 2006. "Forecast Evaluation," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 1, chapter 3, pages 99-134, Elsevier.
    4. Cumby, Robert E & Huizinga, John, 1992. "Testing the Autocorrelation Structure of Disturbances in Ordinary Least Squares and Instrumental Variables Regressions," Econometrica, Econometric Society, vol. 60(1), pages 185-195, January.
    5. Yock Y. Chong & David F. Hendry, 1986. "Econometric Evaluation of Linear Macro-Economic Models," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 53(4), pages 671-690.
    6. Jean‐Marie Dufour, 1981. "Rank Tests For Serial Dependence," Journal of Time Series Analysis, Wiley Blackwell, vol. 2(3), pages 117-128, May.
    7. Thomas R. Cook & Aaron Smalter Hall, 2017. "Macroeconomic Indicator Forecasting with Deep Neural Networks," Research Working Paper RWP 17-11, Federal Reserve Bank of Kansas City.
    8. Greg Tkacz & Sarah Hu, 1999. "Forecasting GDP Growth Using Artificial Neural Networks," Staff Working Papers 99-3, Bank of Canada.
    9. Timmermann, Allan, 2006. "Forecast Combinations," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 1, chapter 4, pages 135-196, Elsevier.
    10. Capistrán, Carlos & Timmermann, Allan, 2009. "Forecast Combination With Entry and Exit of Experts," Journal of Business & Economic Statistics, American Statistical Association, vol. 27(4), pages 428-440.
    11. Nowman, K. Ben & Saltoglu, Burak, 2003. "Continuous time and nonparametric modelling of U.S. interest rate models," International Review of Financial Analysis, Elsevier, vol. 12(1), pages 25-34.
    12. Norman R. Swanson & Halbert White, 1997. "A Model Selection Approach To Real-Time Macroeconomic Forecasting Using Linear Models And Artificial Neural Networks," The Review of Economics and Statistics, MIT Press, vol. 79(4), pages 540-550, November.
    13. Mizrach, B, 1992. "Multivariate Nearest-Neighbor Forecasts of EMS Exchange Rates," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 7(S), pages 151-163, Suppl. De.
    14. R. Lehmann & K. Wohlrabe, 2016. "Looking into the black box of boosting: the case of Germany," Applied Economics Letters, Taylor & Francis Journals, vol. 23(17), pages 1229-1233, November.
    15. Fernandez-Rodriguez, Fernando & Gonzalez-Martel, Christian & Sosvilla-Rivero, Simon, 2000. "On the profitability of technical trading rules based on artificial neural networks:: Evidence from the Madrid stock market," Economics Letters, Elsevier, vol. 69(1), pages 89-94, October.
    16. Diebold, Francis X. & Nason, James A., 1990. "Nonparametric exchange rate prediction?," Journal of International Economics, Elsevier, vol. 28(3-4), pages 315-332, May.
    17. Patton, Andrew J. & Timmermann, Allan, 2007. "Properties of optimal forecasts under asymmetric loss and nonlinearity," Journal of Econometrics, Elsevier, vol. 140(2), pages 884-918, October.
    18. Francis X. Diebold & Jose A. Lopez, 1995. "Forecast evaluation and combination," Research Paper 9525, Federal Reserve Bank of New York.
    19. Athey, Susan & Imbens, Guido W., 2019. "Machine Learning Methods Economists Should Know About," Research Papers 3776, Stanford University, Graduate School of Business.
    20. Fernandez-Rodriguez, Fernando & Sosvilla-Rivero, Simon & Andrada-Felix, Julian, 1999. "Exchange-rate forecasts with simultaneous nearest-neighbour methods: evidence from the EMS," International Journal of Forecasting, Elsevier, vol. 15(4), pages 383-392, October.
    21. Lisi, Francesco & Medio, Alfredo, 1997. "Is a random walk the best exchange rate predictor?," International Journal of Forecasting, Elsevier, vol. 13(2), pages 255-267, June.
    22. Jacob A. Mincer & Victor Zarnowitz, 1969. "The Evaluation of Economic Forecasts," NBER Chapters, in: Economic Forecasts and Expectations: Analysis of Forecasting Behavior and Performance, pages 3-46, National Bureau of Economic Research, Inc.
    23. Stekler, H. O., 1991. "Macroeconomic forecast evaluation techniques," International Journal of Forecasting, Elsevier, vol. 7(3), pages 375-384, November.
    24. Kenneth Wallis, 2011. "Combining forecasts - forty years later," Applied Financial Economics, Taylor & Francis Journals, vol. 21(1-2), pages 33-41.
    25. Meade, Nigel, 2002. "A comparison of the accuracy of short term foreign exchange forecasting methods," International Journal of Forecasting, Elsevier, vol. 18(1), pages 67-83.
    26. 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.
    27. Jing Zeng, 2017. "Forecasting Aggregates with Disaggregate Variables: Does Boosting Help to Select the Most Relevant Predictors?," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 36(1), pages 74-90, January.
    28. Susan Athey & Guido W. Imbens, 2019. "Machine Learning Methods That Economists Should Know About," Annual Review of Economics, Annual Reviews, vol. 11(1), pages 685-725, August.
    29. Patrick Bajari & Denis Nekipelov & Stephen P. Ryan & Miaoyu Yang, 2015. "Machine Learning Methods for Demand Estimation," American Economic Review, American Economic Association, vol. 105(5), pages 481-485, May.
    30. James H. Stock & Mark W. Watson, 1998. "A Comparison of Linear and Nonlinear Univariate Models for Forecasting Macroeconomic Time Series," NBER Working Papers 6607, National Bureau of Economic Research, Inc.
    31. Dufour, J.M., 1979. "Rank Tests for Serial Dependence," Cahiers de recherche 7815, Universite de Montreal, Departement de sciences economiques.
    32. S. Yakowitz, 1987. "Nearest‐Neighbour Methods For Time Series Analysis," Journal of Time Series Analysis, Wiley Blackwell, vol. 8(2), pages 235-247, March.
    33. Nikolopoulos, Konstantinos I. & Babai, M. Zied & Bozos, Konstantinos, 2016. "Forecasting supply chain sporadic demand with nearest neighbor approaches," International Journal of Production Economics, Elsevier, vol. 177(C), pages 139-148.
    34. Harvey, David & Leybourne, Stephen & Newbold, Paul, 1997. "Testing the equality of prediction mean squared errors," International Journal of Forecasting, Elsevier, vol. 13(2), pages 281-291, June.
    35. Agnon, Yehuda & Golan, Amos & Shearer, Matthew, 1999. "Nonparametric, nonlinear, short-term forecasting: theory and evidence for nonlinearities in the commodity markets," Economics Letters, Elsevier, vol. 65(3), pages 293-299, December.
    36. Swanson, Norman R & White, Halbert, 1995. "A Model-Selection Approach to Assessing the Information in the Term Structure Using Linear Models and Artificial Neural Networks," Journal of Business & Economic Statistics, American Statistical Association, vol. 13(3), pages 265-275, July.
    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. Rossi, Barbara, 2013. "Advances in Forecasting under Instability," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 2, chapter 0, pages 1203-1324, Elsevier.
    2. Kück, Mirko & Freitag, Michael, 2021. "Forecasting of customer demands for production planning by local k-nearest neighbor models," International Journal of Production Economics, Elsevier, vol. 231(C).
    3. Petropoulos, Fotios & Apiletti, Daniele & Assimakopoulos, Vassilios & Babai, Mohamed Zied & Barrow, Devon K. & Ben Taieb, Souhaib & Bergmeir, Christoph & Bessa, Ricardo J. & Bijak, Jakub & Boylan, Joh, 2022. "Forecasting: theory and practice," International Journal of Forecasting, Elsevier, vol. 38(3), pages 705-871.
      • Fotios Petropoulos & Daniele Apiletti & Vassilios Assimakopoulos & Mohamed Zied Babai & Devon K. Barrow & Souhaib Ben Taieb & Christoph Bergmeir & Ricardo J. Bessa & Jakub Bijak & John E. Boylan & Jet, 2020. "Forecasting: theory and practice," Papers 2012.03854, arXiv.org, revised Jan 2022.
    4. Dbouk, Wassim & Jamali, Ibrahim, 2018. "Predicting daily oil prices: Linear and non-linear models," Research in International Business and Finance, Elsevier, vol. 46(C), pages 149-165.
    5. Lahiri, Kajal & Yang, Liu, 2013. "Forecasting Binary Outcomes," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 2, chapter 0, pages 1025-1106, Elsevier.
    6. Terasvirta, Timo, 2006. "Forecasting economic variables with nonlinear models," Handbook of Economic Forecasting, in: G. Elliott & C. Granger & A. Timmermann (ed.), Handbook of Economic Forecasting, edition 1, volume 1, chapter 8, pages 413-457, Elsevier.
    7. Clements, Michael P. & Harvey, David I., 2011. "Combining probability forecasts," International Journal of Forecasting, Elsevier, vol. 27(2), pages 208-223.
    8. Pablo Guerróon‐Quintana & Molin Zhong, 2023. "Macroeconomic forecasting in times of crises," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 38(3), pages 295-320, April.
    9. Barbara Rossi & Atsushi Inoue, 2012. "Out-of-Sample Forecast Tests Robust to the Choice of Window Size," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 30(3), pages 432-453, April.
    10. Wang, Xiaoqian & Hyndman, Rob J. & Li, Feng & Kang, Yanfei, 2023. "Forecast combinations: An over 50-year review," International Journal of Forecasting, Elsevier, vol. 39(4), pages 1518-1547.
    11. Francis X. Diebold & Jose A. Lopez, 1995. "Forecast evaluation and combination," Research Paper 9525, Federal Reserve Bank of New York.
    12. Clements, Michael P. & Franses, Philip Hans & Swanson, Norman R., 2004. "Forecasting economic and financial time-series with non-linear models," International Journal of Forecasting, Elsevier, vol. 20(2), pages 169-183.
    13. Raval, Devesh & Rosenbaum, Ted & Wilson, Nathan E., 2021. "How do machine learning algorithms perform in predicting hospital choices? evidence from changing environments," Journal of Health Economics, Elsevier, vol. 78(C).
    14. Ullrich Heilemann & Herman Stekler, 2010. "Perspectives on Evaluating Macroeconomic Forecasts," Working Papers 2010-002, The George Washington University, Department of Economics, H. O. Stekler Research Program on Forecasting.
    15. Ulrich Fritsche & Artur Tarassow, 2017. "Vergleichende Evaluation der Konjunkturprognosen des Instituts für Makroökonomie und Konjunkturforschung an der Hans-Böckler-Stiftung für den Zeitraum 2005-2014," IMK Studies 54-2017, IMK at the Hans Boeckler Foundation, Macroeconomic Policy Institute.
    16. Dimitriadis, Timo & Schnaitmann, Julie, 2021. "Forecast encompassing tests for the expected shortfall," International Journal of Forecasting, Elsevier, vol. 37(2), pages 604-621.
    17. McCracken,M.W. & West,K.D., 2001. "Inference about predictive ability," Working papers 14, Wisconsin Madison - Social Systems.
    18. repec:lan:wpaper:470 is not listed on IDEAS
    19. Cao, Liangyue & Soofi, Abdol S., 1999. "Nonlinear deterministic forecasting of daily dollar exchange rates," International Journal of Forecasting, Elsevier, vol. 15(4), pages 421-430, October.
    20. McCracken, Michael W., 2007. "Asymptotics for out of sample tests of Granger causality," Journal of Econometrics, Elsevier, vol. 140(2), pages 719-752, October.
    21. Yang, Dazhi & van der Meer, Dennis, 2021. "Post-processing in solar forecasting: Ten overarching thinking tools," Renewable and Sustainable Energy Reviews, Elsevier, vol. 140(C).

    More about this item

    Keywords

    Inflation; Forecasting; Machine learning; Forecast evaluation;
    All these keywords.

    JEL classification:

    • E31 - Macroeconomics and Monetary Economics - - Prices, Business Fluctuations, and Cycles - - - Price Level; Inflation; Deflation
    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C49 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Other
    • C53 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Forecasting and Prediction Models; Simulation Methods

    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:eee:lajcba:v:1:y:2020:i:1:s2666143820300120. 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: Catherine Liu (email available below). General contact details of provider: https://www.journals.elsevier.com/latin-american-journal-of-central-banking .

    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.