IDEAS home Printed from https://ideas.repec.org/a/kap/compec/v64y2024i4d10.1007_s10614-023-10529-6.html
   My bibliography  Save this article

Machine Learning-Based Time Series Prediction at Brazilian Stocks Exchange

Author

Listed:
  • Ana Paula Santos Gularte

    (Aeronautics Institute of Technology (ITA)
    Federal University of São Paulo (UNIFESP))

  • Danusio Gadelha Guimarães Filho

    (Aeronautics Institute of Technology (ITA)
    Federal University of São Paulo (UNIFESP))

  • Gabriel Oliveira Torres

    (Aeronautics Institute of Technology (ITA))

  • Thiago Carvalho Nunes Silva

    (Aeronautics Institute of Technology (ITA))

  • Vitor Venceslau Curtis

    (Aeronautics Institute of Technology (ITA)
    Federal University of São Paulo (UNIFESP))

Abstract

This study proposes a novel method for forecasting the returns of assets comprising the Ibovespa from January 1, 2016, to December 30, 2020, by integrating machine learning algorithms-Gradient Boosting Machine, k-Nearest Neighbor, and Bayesian Regularized Neural Networks. Employing an ensemble strategy with diverse data modeling approaches, the method includes a pre-processing stage for variable selection, ranking their importance using statistical techniques such as OneR, Information Gain, and Chi-Square. This approach aims to overcome common challenges such as overfitting, high dimensionality, and computational efficiency, thus enhancing the robustness of the machine learning model and reducing susceptibility to biases and fluctuations. Empirical results demonstrate that, compared to the ARIMA model, the machine learning algorithm shows superior performance in forecast error and forecast hit rate and precision (R2, Willmott, and Kurtosis). Furthermore, the results suggest that the proposed algorithm can significantly improve predictive precision when applied to the ARIMA model and generalized to various datasets that include various markets and assets.

Suggested Citation

  • Ana Paula Santos Gularte & Danusio Gadelha Guimarães Filho & Gabriel Oliveira Torres & Thiago Carvalho Nunes Silva & Vitor Venceslau Curtis, 2024. "Machine Learning-Based Time Series Prediction at Brazilian Stocks Exchange," Computational Economics, Springer;Society for Computational Economics, vol. 64(4), pages 2477-2508, October.
  • Handle: RePEc:kap:compec:v:64:y:2024:i:4:d:10.1007_s10614-023-10529-6
    DOI: 10.1007/s10614-023-10529-6
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1007/s10614-023-10529-6
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1007/s10614-023-10529-6?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. Krauss, Christopher & Do, Xuan Anh & Huck, Nicolas, 2017. "Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500," European Journal of Operational Research, Elsevier, vol. 259(2), pages 689-702.
    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. Charles Engel & Nelson C. Mark & Kenneth D. West, 2008. "Exchange Rate Models Are Not as Bad as You Think," NBER Chapters, in: NBER Macroeconomics Annual 2007, Volume 22, pages 381-441, National Bureau of Economic Research, Inc.
    4. Andrew Ang & Geert Bekaert, 2007. "Stock Return Predictability: Is it There?," The Review of Financial Studies, Society for Financial Studies, vol. 20(3), pages 651-707.
    5. Lahmiri, Salim & Bekiros, Stelios, 2020. "Intelligent forecasting with machine learning trading systems in chaotic intraday Bitcoin market," Chaos, Solitons & Fractals, Elsevier, vol. 133(C).
    6. Francis X. Diebold, 1998. "The Past, Present, and Future of Macroeconomic Forecasting," Journal of Economic Perspectives, American Economic Association, vol. 12(2), pages 175-192, Spring.
    7. Nicola Uras & Lodovica Marchesi & Michele Marchesi & Roberto Tonelli, 2020. "Forecasting Bitcoin closing price series using linear regression and neural networks models," Papers 2001.01127, arXiv.org.
    8. Bernd Brandl & Christian Keber & Matthias Schuster, 2006. "An automated econometric decision support system: forecasts for foreign exchange trades," Central European Journal of Operations Research, Springer;Slovak Society for Operations Research;Hungarian Operational Research Society;Czech Society for Operations Research;Österr. Gesellschaft für Operations Research (ÖGOR);Slovenian Society Informatika - Section for Operational Research;Croatian Operational Research Society, vol. 14(4), pages 401-415, December.
    9. Yang Liu & Qingguo Zeng & Bobo Li & Lili Ma & Joaquín Ordieres‐Meré, 2022. "Anticipating financial distress of high‐tech startups in the European Union: A machine learning approach for imbalanced samples," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 41(6), pages 1131-1155, September.
    10. Meese, Richard A. & Rogoff, Kenneth, 1983. "Empirical exchange rate models of the seventies : Do they fit out of sample?," Journal of International Economics, Elsevier, vol. 14(1-2), pages 3-24, February.
    11. Chen, Rong & Xiao, Han & Yang, Dan, 2021. "Autoregressive models for matrix-valued time series," Journal of Econometrics, Elsevier, vol. 222(1), pages 539-560.
    12. Diego Silveira Pacheco de Oliveira & Gabriel Caldas Montes, 2021. "Forecasting sovereign risk perception of Brazilian bonds: an evaluation of machine learning prediction accuracy," International Journal of Emerging Markets, Emerald Group Publishing Limited, vol. 18(10), pages 3414-3436, October.
    13. Pincheira, Pablo M. & West, Kenneth D., 2016. "A comparison of some out-of-sample tests of predictability in iterated multi-step-ahead forecasts," Research in Economics, Elsevier, vol. 70(2), pages 304-319.
    14. Huck, Nicolas, 2019. "Large data sets and machine learning: Applications to statistical arbitrage," European Journal of Operational Research, Elsevier, vol. 278(1), pages 330-342.
    15. Lin, Chiun-Sin & Chiu, Sheng-Hsiung & Lin, Tzu-Yu, 2012. "Empirical mode decomposition–based least squares support vector regression for foreign exchange rate forecasting," Economic Modelling, Elsevier, vol. 29(6), pages 2583-2590.
    16. Nicolas Huck, 2019. "Large data sets and machine learning: Applications to statistical arbitrage," Post-Print hal-02143971, HAL.
    17. Engle, Robert F & Lilien, David M & Robins, Russell P, 1987. "Estimating Time Varying Risk Premia in the Term Structure: The Arch-M Model," Econometrica, Econometric Society, vol. 55(2), pages 391-407, March.
    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. Baoqiang Zhan & Shu Zhang & Helen S. Du & Xiaoguang Yang, 2022. "Exploring Statistical Arbitrage Opportunities Using Machine Learning Strategy," Computational Economics, Springer;Society for Computational Economics, vol. 60(3), pages 861-882, October.
    2. 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.
    3. Demetrescu, Matei & Rodrigues, Paulo M.M. & Taylor, A.M. Robert, 2023. "Transformed regression-based long-horizon predictability tests," Journal of Econometrics, Elsevier, vol. 237(2).
    4. Guillaume Coqueret & Tony Guida, 2020. "Training trees on tails with applications to portfolio choice," Post-Print hal-04144665, HAL.
    5. Alexander Jakob Dautel & Wolfgang Karl Härdle & Stefan Lessmann & Hsin-Vonn Seow, 2020. "Forex exchange rate forecasting using deep recurrent neural networks," Digital Finance, Springer, vol. 2(1), pages 69-96, September.
    6. Flori, Andrea & Regoli, Daniele, 2021. "Revealing Pairs-trading opportunities with long short-term memory networks," European Journal of Operational Research, Elsevier, vol. 295(2), pages 772-791.
    7. Kriebel, Johannes & Stitz, Lennart, 2022. "Credit default prediction from user-generated text in peer-to-peer lending using deep learning," European Journal of Operational Research, Elsevier, vol. 302(1), pages 309-323.
    8. Rubesam, Alexandre, 2022. "Machine learning portfolios with equal risk contributions: Evidence from the Brazilian market," Emerging Markets Review, Elsevier, vol. 51(PB).
    9. Kasper Johansson & Thomas Schmelzer & Stephen Boyd, 2024. "Finding Moving-Band Statistical Arbitrages via Convex-Concave Optimization," Papers 2402.08108, arXiv.org.
    10. Fabian Waldow & Matthias Schnaubelt & Christopher Krauss & Thomas Günter Fischer, 2021. "Machine Learning in Futures Markets," JRFM, MDPI, vol. 14(3), pages 1-14, March.
    11. Kim, A. & Yang, Y. & Lessmann, S. & Ma, T. & Sung, M.-C. & Johnson, J.E.V., 2020. "Can deep learning predict risky retail investors? A case study in financial risk behavior forecasting," European Journal of Operational Research, Elsevier, vol. 283(1), pages 217-234.
    12. Pedro M. Mirete-Ferrer & Alberto Garcia-Garcia & Juan Samuel Baixauli-Soler & Maria A. Prats, 2022. "A Review on Machine Learning for Asset Management," Risks, MDPI, vol. 10(4), pages 1-46, April.
    13. Engel, Charles & Wu, Steve Pak Yeung, 2023. "Forecasting the U.S. Dollar in the 21st Century," Journal of International Economics, Elsevier, vol. 141(C).
    14. Erdinc Akyildirim & Ahmet Goncu & Alper Hekimoglu & Duc Khuong Nguyen & Ahmet Sensoy, 2023. "Statistical arbitrage: factor investing approach," OR Spectrum: Quantitative Approaches in Management, Springer;Gesellschaft für Operations Research e.V., vol. 45(4), pages 1295-1331, December.
    15. John D. Levendis, 2018. "Time Series Econometrics," Springer Texts in Business and Economics, Springer, number 978-3-319-98282-3, April.
    16. Rama Cont & Mihai Cucuringu & Chao Zhang, 2021. "Cross-Impact of Order Flow Imbalance in Equity Markets," Papers 2112.13213, arXiv.org, revised Jun 2023.
    17. Guillaume Coqueret & Tony Guida, 2020. "Training trees on tails with applications to portfolio choice," Annals of Operations Research, Springer, vol. 288(1), pages 181-221, May.
    18. Shiu‐Sheng Chen & Yu‐Hsi Chou, 2010. "Exchange Rates and Fundamentals: Evidence from Long‐Horizon Regression Tests," Oxford Bulletin of Economics and Statistics, Department of Economics, University of Oxford, vol. 72(1), pages 63-88, February.
    19. Kolesnikova, A. & Yang, Y. & Lessmann, S. & Ma, T. & Sung, M.-C. & Johnson, J.E.V., 2019. "Can Deep Learning Predict Risky Retail Investors? A Case Study in Financial Risk Behavior Forecasting," IRTG 1792 Discussion Papers 2019-023, Humboldt University of Berlin, International Research Training Group 1792 "High Dimensional Nonstationary Time Series".
    20. Darvas, Zsolt & Schepp, Zoltán, 2024. "Exchange rates and fundamentals: Forecasting with long maturity forward rates," Journal of International Money and Finance, Elsevier, vol. 143(C).

    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:kap:compec:v:64:y:2024:i:4:d:10.1007_s10614-023-10529-6. 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: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    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.