Research Article

Research on Stock Price Prediction Based on LSTM Model

Han Lv*
北方工业大学伦敦布鲁内尔学院,北京 100144

* Corresponding author: [email protected]

Abstract

With the increasing complexity of financial markets and the rise of algorithmic trading, deep learning-based stock prediction methods have attracted widespread attention. This study focuses on the daily closing prices of Apple Inc. (AAPL) from 1980 to 2008. Time-series samples were constructed using Min–Max normalization and a sliding window approach. The predictive performance of single-layer and double-layer LSTM models (with or without Dropout) was systematically compared against support vector regression (SVR). Experiments were quantitatively evaluated using MSE, RMSE, and MAE metrics. Combined with loss curves and visualization of prediction results, the study found that the single-layer LSTM without Dropout achieved the best performance in terms of RMSE (2.020) and MAE (1.604), while SVR exhibited significantly higher errors. The results indicate that a moderate application of Dropout can effectively enhance model generalization, though it may slightly slow convergence. This study provides intuitive comparisons and optimization suggestions for applying LSTM in financial time-series prediction.

Keywords: LSTM; stock prediction; sliding window; Dropout
Published: November 5, 2025
DOI: 10.54254/2755-2721/2025.BJ28891
Volume: ACE Vol.183
pp. 194-200
Download PDF

References

  1. Hochreiter S, Schmidhuber J. Long short-term memory. Neural computation, 1997, 9(8): 1735-1780.
  2. Fischer T, Krauss C. Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 2018, 270(2): 654-669.
  3. Box G E P, Jenkins G M. Time series analysis: forecasting and control. Holden-Day, 1970.
  4. Bollerslev T. Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 1986, 31(3): 307-327.
  5. Cortes C, Vapnik V. Support-vector networks. Machine Learning, 1995, 20(3): 273-297.
  6. Breiman L. Random forests. Machine Learning, 2001, 45(1): 5-32.
  7. Huang G B, Zhu Q Y, Siew C K. Extreme learning machine: theory and applications. Neurocomputing, 2006, 70(1-3): 489-501.
  8. Rumelhart D E, Hinton G E, Williams R J. Learning representations by back-propagating errors. Nature, 1986, 323(6088): 533-536.
  9. Cho K, Van Merriënboer B, Gulcehre C, et al. Learning phrase representations using RNN encoder-decoder for statistical machine translation. EMNLP 2014.
  10. Sezer O B, Ozbayoglu A M. Algorithmic financial trading with deep convolutional neural networks: time series to image conversion approach. Applied Soft Computing, 2020, 93: 106275.
  11. Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need. NeurIPS 2017.
  12. Qiu X, Song D. Predicting the direction of stock market index movement using an optimized artificial neural network model. Expert Systems with Applications, 2016, 79: 206-213
  13. Zhang L, Aggarwal C C, Qi G J. Stock price prediction via stacked autoencoder and LSTM neural network. Expert Systems with Applications, 2018, 110: 20–30.
  14. Wang X, Li Y. Wavelet transform and LSTM-based neural network for stock prediction. Applied Soft Computing, 2021, 110: 107642.
  15. Nawaz K, Ghufran A. A hybrid CNN-LSTM model for time series forecasting. Neural Computing and Applications, 2019, 31(1): 123–135.
  16. Goodfellow I, Bengio Y, Courville A. Deep Learning. MIT Press, 2016.