IDEAS home Printed from https://ideas.repec.org/a/ibn/ijbmjn/v19y2024i4p80.html

Deep Learning Applied to Stock Prices: Epoch Adjustment in Training an LSTM Neural Network

Author

Listed:
  • Napoleão Verardi Galegale
  • Camilo Ilzo Shimabukuro

Abstract

Research on recurrent neural networks applied to financial time series is still underexplored, even more so for series on Brazilian stock prices. The research gap was identified in studies on regularization with early stopping to improve predictive capacity and reduce overfitting for the type of neural network used. This study aims to analyze the effect of the number of epochs on the prediction error dispersion of a recurrent neural network using the Long Short-Term Memory – LSTM approach on the stock prices of a Brazilian company, aiming to minimize prediction error and reduce the risk of overfitting. The method is of an applied nature with a quantitative approach and uses an experimental procedure to analyze the behavior of the prediction error of a recurrent neural network as a function of the number of epochs. As a result, a range of the number of epochs was identified that extracts the best trade-off relation between predictive capacity and overfitting risk for a given network configuration. It was also identified how the dispersion of prediction error initially declines sharply and then stabilizes asymptotically. The study offers a greater understanding of the behavior of the prediction error, seeking greater efficiency in predictive techniques on financial time series in order to add value and reduce uncertainties in the decision-making process for asset managers and investors.

Suggested Citation

  • Napoleão Verardi Galegale & Camilo Ilzo Shimabukuro, 2024. "Deep Learning Applied to Stock Prices: Epoch Adjustment in Training an LSTM Neural Network," International Journal of Business and Management, Canadian Center of Science and Education, vol. 19(4), pages 1-80, July.
  • Handle: RePEc:ibn:ijbmjn:v:19:y:2024:i:4:p:80
    as

    Download full text from publisher

    File URL: https://ccsenet.org/journal/index.php/ijbm/article/download/0/0/50304/54461
    Download Restriction: no

    File URL: https://ccsenet.org/journal/index.php/ijbm/article/view/0/50304
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Shiller, Robert J, 1995. "Conversation, Information, and Herd Behavior," American Economic Review, American Economic Association, vol. 85(2), pages 181-185, May.
    2. Fischer, Thomas & Krauss, Christopher, 2018. "Deep learning with long short-term memory networks for financial market predictions," European Journal of Operational Research, Elsevier, vol. 270(2), pages 654-669.
    3. Justin A. Sirignano, 2019. "Deep learning for limit order books," Quantitative Finance, Taylor & Francis Journals, vol. 19(4), pages 549-570, April.
    4. Fama, Eugene F, 1970. "Efficient Capital Markets: A Review of Theory and Empirical Work," Journal of Finance, American Finance Association, vol. 25(2), pages 383-417, May.
    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. Kentaro Imajo & Kentaro Minami & Katsuya Ito & Kei Nakagawa, 2020. "Deep Portfolio Optimization via Distributional Prediction of Residual Factors," Papers 2012.07245, arXiv.org.
    2. Bartosz Bieganowski & Robert Ślepaczuk, 2024. "Supervised Autoencoder MLP for Financial Time Series Forecasting," Working Papers 2024-03, Faculty of Economic Sciences, University of Warsaw.
    3. 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.
    4. Yoontae Hwang & Stefan Zohren, 2025. "Signature-Informed Transformer for Asset Allocation," Papers 2510.03129, arXiv.org, revised Jan 2026.
    5. Merve Mert Sarıtaş, 2025. "Forecasting the XBANK Index in Türkiye Using Macroeconomic Indicators: A Model Comparison with Ensemble Learning Methods," International Econometric Review (IER), Economic Research Association, vol. 17(1), pages 44-58, June.
    6. Ehsan Hoseinzade & Saman Haratizadeh & Arash Khoeini, 2019. "U-CNNpred: A Universal CNN-based Predictor for Stock Markets," Papers 1911.12540, arXiv.org.
    7. Saâdaoui, Foued & Rabbouch, Hana, 2024. "Financial forecasting improvement with LSTM-ARFIMA hybrid models and non-Gaussian distributions," Technological Forecasting and Social Change, Elsevier, vol. 206(C).
    8. Jing Hao & Feng He & Feng Ma & Shibo Zhang & Xiaotao Zhang, 2025. "Machine learning vs deep learning in stock market investment: an international evidence," Annals of Operations Research, Springer, vol. 348(1), pages 93-115, May.
    9. 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.
    10. Liu Jieni, 2026. "A Search-Then-Forecast Transformer Framework for Mid-Term Stock Price Prediction: An Empirical Case Study on the Chinese A-Share Market," Discussion Papers in Economics and Business 26-06, Osaka University, Graduate School of Economics.
    11. Shi, Leilei & Wang, Binghong & Guo, Xinshuai & Li, Honggang, 2021. "A price dynamic equilibrium model with trading volume weights based on a price-volume probability wave differential equation," International Review of Financial Analysis, Elsevier, vol. 74(C).
    12. Hairong Cui & Xurui Wang & Xiaojun Chu, 2025. "Stock Returns Prediction Based on Implied Volatility Spread Under Network Perspective," Computational Economics, Springer;Society for Computational Economics, vol. 65(5), pages 2829-2852, May.
    13. Romain Bocher, 2023. "Causal Entropic Forces, Narratives and Self-organisation of Capital Markets," Journal of Interdisciplinary Economics, , vol. 35(2), pages 172-190, July.
    14. Meet Satishbhai Sonani & Atta Badii & Armin Moin, 2025. "Stock Price Prediction Using a Hybrid LSTM-GNN Model: Integrating Time-Series and Graph-Based Analysis," Papers 2502.15813, arXiv.org.
    15. Erdinc Akyildirim & Oguzhan Cepni & Shaen Corbet & Gazi Salah Uddin, 2023. "Forecasting mid-price movement of Bitcoin futures using machine learning," Annals of Operations Research, Springer, vol. 330(1), pages 553-584, November.
    16. Green, Lawrence & Sung, Ming-Chien & Ma, Tiejun & Johnson, Johnnie E. V., 2019. "To what extent can new web-based technology improve forecasts? Assessing the economic value of information derived from Virtual Globes and its rate of diffusion in a financial market," European Journal of Operational Research, Elsevier, vol. 278(1), pages 226-239.
    17. Keer Yang & Guanqun Zhang & Chuan Bi & Qiang Guan & Hailu Xu & Shuai Xu, 2023. "Improving CNN-base Stock Trading By Considering Data Heterogeneity and Burst," Papers 2303.09407, arXiv.org.
    18. Guangxi Cao & Meijun Ling & Jingwen Wei & Chen Chen, 2025. "Dynamic Market Behavior and Price Prediction in Cryptocurrency: An Analysis Based on Asymmetric Herding Effects and LSTM," Computational Economics, Springer;Society for Computational Economics, vol. 65(6), pages 3325-3360, June.
    19. Jia-Ping Huang & Yang Zhang & Juanxi Wang, 2023. "Dynamic effects of social influence on asset prices," Journal of Economic Interaction and Coordination, Springer;Society for Economic Science with Heterogeneous Interacting Agents, vol. 18(3), pages 671-699, July.
    20. Matthew Oldham, 2019. "Understanding How Short-Termism and a Dynamic Investor Network Affects Investor Returns: An Agent-Based Perspective," Complexity, Hindawi, vol. 2019, pages 1-21, July.

    More about this item

    JEL classification:

    • R00 - Urban, Rural, Regional, Real Estate, and Transportation Economics - - General - - - General
    • Z0 - Other Special Topics - - General

    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:ibn:ijbmjn:v:19:y:2024:i:4:p:80. 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: Canadian Center of Science and Education (email available below). General contact details of provider: https://edirc.repec.org/data/cepflch.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.