Impact of historical data horizon on the predictive and financial performance of LSTM neural networks
a case study with brazilian banking stocks
DOI:
https://doi.org/10.47236/2594-7036.2026.v10.2228Keywords:
Algorithmic trading, Backtesting, Financial forecasting, LSTM, Time seriesAbstract
This study investigated the impact of the historical data horizon on the performance of predictive models based on Long Short-Term Memory (LSTM) neural networks applied to the financial market. Five assets from the Brazilian banking sector were analyzed using daily data obtained through the Yahoo Finance library. The study compared two experimental configurations, using five and ten years of historical data, evaluated through chronological train-test splits. Predictive performance was assessed using regression metrics, including RMSE, MAE, MAPE, and R², while financial performance was evaluated through backtesting with different trading strategies and comparison against the Buy & Hold benchmark strategy. The results indicated that, for assets with complete historical records, the ten-year horizon was associated with better predictive performance in most of the evaluated metrics. However, the financial impact varied according to the asset and the trading strategy, indicating that better predictive adherence does not, by itself, guarantee higher operational returns. The study concludes that extending the historical data horizon may improve the generalization capability of LSTM models in the analyzed scenario, although the adopted experimental design does not allow isolating whether this effect is due only to the larger number of observations or also to the greater diversity of market regimes contained in the longer period.Downloads
Metrics
References
AROUSSI, Ran. yfinance: Yahoo! finance market data downloader. Version 0.1.54, 2019. Disponível em: https://pypi.org/project/yfinance/. Acesso em: 10 abr. 2026.
BALAMOHAN, S. et al. Advancement of stock market forecasting with adamW and LSTM: a scalable deep learning system leveraging technical indicators. In: International Conference on Artificial Intelligence and Knowledge Discovery in Concurrent Engineering. IEEE, 2025. DOI: 10.1109/ICECONF65644.2025.11379417.
BOUSBAA, Z.; SANCHEZ-MEDINA, J.; BENCHAREF, O. Financial time series forecasting: a data stream mining-based system. Electronics, v. 12, n. 9, p. 2039, 2023. DOI: 10.3390/electronics12092039.
DIOUBI, F. et al. Enhancing stock market predictions via hybrid external trend and internal components analysis and long short term memory model. Journal of King Saud University - Computer and Information Sciences, v. 36, 2024. DOI: 10.1016/j.jksuci.2024.102252.
FISCHER, Thomas; KRAUSS, Christopher. Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, Amsterdam, v. 270, n. 2, p. 654-669, 2018. DOI: 10.1016/j.ejor.2017.11.054.
HOCHREITER, Sepp; SCHMIDHUBER, Jürgen. Long short-term memory. Neural
Computation, Cambridge, v. 9, n. 8, p. 1735-1780, 1997. DOI:
10.1162/neco.1997.9.8.1735.
KAHRA, D.; KAHRA, V. VSF-Net: A variational encoder and Sharpness-Aware attention framework for robust forecasting of non-stationary financial time series. International Journal of Information Technology, 2025. DOI: 10.1007/s41870-025-02933-y.
LAHBABI, H. et al. Stock price forecasting using ito-ADAM optimized long Short-Term memory neural networks. Statistics, Optimization and Information Computing, v. 14, p. 3282–3298, 2025. DOI: 10.19139/soic-2310-5070-2876.
LÓPEZ DE PRADO, Marcos. Advances in financial machine learning. Hoboken:
Wiley, 2018.
SHABE, R.; ENGELBRECHT, A.; ANDERSON, K. Incremental reinforcement learning for portfolio optimisation. Computers, v. 14, n. 242, 2025. DOI: 10.3390/computers14070242.
TSAY, Ruey S. Analysis of financial time series. 2. ed. Hoboken: Wiley-Interscience, 2005.
ZANOTTO, Eduardo Luiz; HÖLBIG, Carlos Amaral. Previsão de preços de ações e ETF na bolsa de valores B3 aplicando técnicas de machine learning. Revista Sítio Novo, Palmas, v. 10, p. e1879, 2026. DOI: 10.47236/2594-7036.2026.v10.1879.
ZHANG, Cheng; SJARIF, Nilam Nur Amir; IBRAHIM, Roslina. Deep learning models for price forecasting of financial time series: a review of recent advancements: 2020–2022. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, v. 14, n. 1, e1519, 2024. DOI: 10.1002/widm.1519.
ZHANG, Guoqiang; PATUWO, B. Eddy; HU, Michael Y. Forecasting with artificial neural networks: the state of the art. International Journal of Forecasting, Amsterdam, v. 14, n. 1, p. 35-62, 1998. DOI: 10.1016/S0169-2070(97)00044-7.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Caio Santos Silva, Rafael Lima de Carvalho

This work is licensed under a Creative Commons Attribution 4.0 International License.
It allows sharing, adaptation, and use for any purpose, including commercial use, provided proper attribution is given to the authors and to Revista Sítio Novo.
The authors declare that the work is original and has not been previously published, in whole or in part, except on recognized preprint servers, if declared, and that no other similar manuscript authored by them is published or under review by another journal, whether printed or electronic.
They declare that they have not violated or infringed upon any proprietary rights of others, and that all citations in the text are factual or based on research with scientifically significant accuracy.
The authors retain the copyright of the manuscripts published in this journal, allowing unrestricted use of their content, provided that the original authorship and the publication source are properly cited.















