IDEAS home Printed from https://ideas.repec.org/p/fgv/eesptd/498.html
   My bibliography  Save this paper

Cross-validation based forecasting method: a machine learning approach

Author

Listed:
  • Pinto, Jeronymo Marcondes
  • Marçal, Emerson Fernandes

Abstract

Our paper aims to evaluate two novel methods on selecting the best forecasting model or its combination based on a Machine Learning approach. The methods are based on the selection of the ”best” model, or combination of models, by crossvalidation technique, from a set of possible models. The first one is based on the seminal paper of Granger-Bates (1969) but weights are estimated by a process of cross-validation applied on the training set. The second one selects the model with the best forecasting performance in the process described above, which we called CvML (Cross-Validation Machine Learning Method). The following models are used: exponential smoothing, SARIMA, artificial neural networks and Threshold autoregression (TAR). Model specification is chosen by R packages: forecast and TSA. Both methods – CvML and MGB - are applied to these models to generate forecasts from one up to twelve periods ahead. Frequency of data is monthly. We run the forecasts exercise to the following to monthly series of Industrial Product Indices for seven countries: Canada, Brazil, Belgium, Germany, Portugal, UK and USA. The data was collected at OECD data, with 504 observations. We choose Average Forecast Combination, Granger Bates Method, MCS model, Naive and Seasonal Naive Model as benchmarks.Our results suggest that MGB did not performed well. However, CvML had a lower mean absolute error for most of countries and forecast horizons, particularly at longer horizons, surpassing all the proposed benchmarks. Similar results hold for absolute mean forecast error.

Suggested Citation

  • Pinto, Jeronymo Marcondes & Marçal, Emerson Fernandes, 2019. "Cross-validation based forecasting method: a machine learning approach," Textos para discussão 498, FGV EESP - Escola de Economia de São Paulo, Fundação Getulio Vargas (Brazil).
  • Handle: RePEc:fgv:eesptd:498
    as

    Download full text from publisher

    File URL: https://repositorio.fgv.br/bitstreams/2688bba9-0f0d-4c9e-a9b2-86a8d5c29ddc/download
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Castle, Jennifer L. & Clements, Michael P. & Hendry, David F., 2015. "Robust approaches to forecasting," International Journal of Forecasting, Elsevier, vol. 31(1), pages 99-112.
    2. Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
    3. Barbara Rossi, 2013. "Exchange Rate Predictability," Journal of Economic Literature, American Economic Association, vol. 51(4), pages 1063-1119, December.
    4. Hsiao, Cheng & Wan, Shui Ki, 2014. "Is there an optimal forecast combination?," Journal of Econometrics, Elsevier, vol. 178(P2), pages 294-309.
    5. Diebold, Francis X & Mariano, Roberto S, 2002. "Comparing Predictive Accuracy," Journal of Business & Economic Statistics, American Statistical Association, vol. 20(1), pages 134-144, January.
    6. Graham Elliott & Allan Timmermann, 2016. "Economic Forecasting," Economics Books, Princeton University Press, edition 1, number 10740.
    7. Peter R. Hansen & Asger Lunde & James M. Nason, 2011. "The Model Confidence Set," Econometrica, Econometric Society, vol. 79(2), pages 453-497, March.
    8. Garcia, Márcio G.P. & Medeiros, Marcelo C. & Vasconcelos, Gabriel F.R., 2017. "Real-time inflation forecasting with high-dimensional models: The case of Brazil," International Journal of Forecasting, Elsevier, vol. 33(3), pages 679-693.
    9. Chan, Felix & Pauwels, Laurent L., 2018. "Some theoretical results on forecast combinations," International Journal of Forecasting, Elsevier, vol. 34(1), pages 64-74.
    10. Alzahrani, Naif & Neal, Peter & Spencer, Simon E.F. & McKinley, Trevelyan J. & Touloupou, Panayiota, 2018. "Model selection for time series of count data," Computational Statistics & Data Analysis, Elsevier, vol. 122(C), pages 33-44.
    11. Castle, Jennifer L. & Clements, Michael P. & Hendry, David F., 2013. "Forecasting by factors, by variables, by both or neither?," Journal of Econometrics, Elsevier, vol. 177(2), pages 305-319.
    12. Harding, Don & Pagan, Adrian, 2002. "Dissecting the cycle: a methodological investigation," Journal of Monetary Economics, Elsevier, vol. 49(2), pages 365-381, March.
    13. Bergmeir, Christoph & Costantini, Mauro & Benítez, José M., 2014. "On the usefulness of cross-validation for directional forecast evaluation," Computational Statistics & Data Analysis, Elsevier, vol. 76(C), pages 132-143.
    14. Christoph Bergmeir & Rob J Hyndman & Bonsoo Koo, 2015. "A Note on the Validity of Cross-Validation for Evaluating Time Series Prediction," Monash Econometrics and Business Statistics Working Papers 10/15, Monash University, Department of Econometrics and Business Statistics.
    15. Racine, Jeff, 2000. "Consistent cross-validatory model-selection for dependent data: hv-block cross-validation," Journal of Econometrics, Elsevier, vol. 99(1), pages 39-61, November.
    16. Gerhard Bry & Charlotte Boschan, 1971. "Programmed Selection of Cyclical Turning Points," NBER Chapters, in: Cyclical Analysis of Time Series: Selected Procedures and Computer Programs, pages 7-63, National Bureau of Economic Research, Inc.
    17. Michael P. Clements & David F. Hendry, 2001. "Forecasting Non-Stationary Economic Time Series," MIT Press Books, The MIT Press, edition 1, volume 1, number 0262531895, April.
    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. 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.
    2. Jeronymo Marcondes Pinto & Jennifer L. Castle, 2022. "Machine Learning Dynamic Switching Approach to Forecasting in the Presence of Structural Breaks," Journal of Business Cycle Research, Springer;Centre for International Research on Economic Tendency Surveys (CIRET), vol. 18(2), pages 129-157, July.
    3. Mei-Li Shen & Cheng-Feng Lee & Hsiou-Hsiang Liu & Po-Yin Chang & Cheng-Hong Yang, 2021. "An Effective Hybrid Approach for Forecasting Currency Exchange Rates," Sustainability, MDPI, vol. 13(5), pages 1-29, March.
    4. 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.
    5. Filip Stanek, 2021. "Optimal Out-of-Sample Forecast Evaluation under Stationarity," CERGE-EI Working Papers wp712, The Center for Economic Research and Graduate Education - Economics Institute, Prague.
    6. Gary S. Anderson & Alena Audzeyeva, 2019. "A Coherent Framework for Predicting Emerging Market Credit Spreads with Support Vector Regression," Finance and Economics Discussion Series 2019-074, Board of Governors of the Federal Reserve System (U.S.).
    7. Afanasyev, Dmitriy O. & Fedorova, Elena A., 2019. "On the impact of outlier filtering on the electricity price forecasting accuracy," Applied Energy, Elsevier, vol. 236(C), pages 196-210.
    8. Laurent, Sébastien & Rombouts, Jeroen V.K. & Violante, Francesco, 2013. "On loss functions and ranking forecasting performances of multivariate volatility models," Journal of Econometrics, Elsevier, vol. 173(1), pages 1-10.
    9. Adusei Jumah & Robert M. Kunst, 2016. "Optimizing time-series forecasts for inflation and interest rates using simulation and model averaging," Applied Economics, Taylor & Francis Journals, vol. 48(45), pages 4366-4378, September.
    10. Nowotarski, Jakub & Weron, Rafał, 2018. "Recent advances in electricity price forecasting: A review of probabilistic forecasting," Renewable and Sustainable Energy Reviews, Elsevier, vol. 81(P1), pages 1548-1568.
    11. Duncan, Roberto & Martínez-García, Enrique, 2019. "New perspectives on forecasting inflation in emerging market economies: An empirical assessment," International Journal of Forecasting, Elsevier, vol. 35(3), pages 1008-1031.
    12. Drachal, Krzysztof, 2021. "Forecasting crude oil real prices with averaging time-varying VAR models," Resources Policy, Elsevier, vol. 74(C).
    13. Mundt, Philipp & Alfarano, Simone & Milaković, Mishael, 2020. "Exploiting ergodicity in forecasts of corporate profitability," Journal of Economic Dynamics and Control, Elsevier, vol. 111(C).
    14. Diebold, Francis X. & Shin, Minchul, 2019. "Machine learning for regularized survey forecast combination: Partially-egalitarian LASSO and its derivatives," International Journal of Forecasting, Elsevier, vol. 35(4), pages 1679-1691.
    15. Pierre Guérin & Danilo Leiva-Leon & Massimiliano Marcellino, 2020. "Markov-Switching Three-Pass Regression Filter," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 38(2), pages 285-302, April.
    16. Hendry, David F. & Hubrich, Kirstin, 2006. "Forecasting economic aggregates by disaggregates," Working Paper Series 589, European Central Bank.
    17. Rafal Weron & Florian Ziel, 2018. "Electricity price forecasting," HSC Research Reports HSC/18/08, Hugo Steinhaus Center, Wroclaw University of Science and Technology.
    18. Vincent, BODART & Konstantin A., KHOLODILIN & Fati, SHADMAN-MEHTA, 2003. "Dating and Forecasting the Belgian Business Cycle," LIDAM Discussion Papers IRES 2003018, Université catholique de Louvain, Institut de Recherches Economiques et Sociales (IRES).
    19. 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.
    20. Ulrich Gunter, 2021. "Improving Hotel Room Demand Forecasts for Vienna across Hotel Classes and Forecast Horizons: Single Models and Combination Techniques Based on Encompassing Tests," Forecasting, MDPI, vol. 3(4), pages 1-36, November.

    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:fgv:eesptd:498. 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: Núcleo de Computação da FGV EPGE (email available below). General contact details of provider: https://edirc.repec.org/data/eegvfbr.html .

    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.