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


  •  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.



This work is licensed under a Creative Commons Attribution 4.0 License.