基于LSTM神经网络的股票价格预测
Stock Price Prediction Based on LSTM Neural Network
DOI: 10.12677/ecl.2025.1461781, PDF,   
作者: 戴慧茹:贵州大学数学与统计学院,贵州 贵阳
关键词: LSTM神经网络股票预测时间序列LSTM Neural Network Stock Prediction Time Series Analysis
摘要: 股票价格预测是金融时间序列分析的重要研究方向,传统方法如ARIMA、SVM等存在难以捕捉非线性特征和对时序依赖性建模能力有限的问题。随着深度学习发展,LSTM逐步应用于该领域,但深层LSTM架构的训练稳定性与预测不确定性量化仍是挑战。本文提出改进的双层LSTM网络,引入双层LSTM结构、双向Dropout正则化、Xavier正态分布权重初始化、梯度裁剪和动态学习率调度等优化策略。实验采用Netflix公司2016~2025年股票历史数据,经数据清洗、归一化处理后,构建以收盘价为因变量的数据集。以MAE、MAPE和RMSE为评价指标,将双层LSTM模型与RNN、ARIMA模型对比。结果表明,双层LSTM模型训练损失曲线符合指数衰减规律,预测效果良好,测试集MAE为0.303、MAPE为3.21%、RMSE为0.539,优于对比模型。消融实验验证了各改进策略的有效性,如双层结构使MSE降低20.9%、Dropout使测试集MSE降低25.1%等。本研究在方法学上取得进展,提出层次化特征提取机制、构建动态正则化体系、开发概率化预测框架,为量化投资提供了可操作风险指标和分级投资策略。然而,研究存在对突发事件适应性有限、未考虑外部变量、长期预测可靠性可能降低等局限,未来可通过融合多模态输入提升模型性能。
Abstract: Stock price prediction is a crucial research direction in financial time series analysis. Traditional methods such as ARIMA and SVM struggle to capture nonlinear features and exhibit limited capability in modeling temporal dependencies. With the advancement of deep learning, LSTM has been increasingly applied to this field, yet challenges remain in training stability for deep LSTM architectures and uncertainty quantification in predictions. This study proposes an improved dual-layer LSTM network incorporating optimization strategies including a hierarchical LSTM structure, bidirectional Dropout regularization, Xavier normal distribution weight initialization, gradient clipping, and dynamic learning rate scheduling. Experiments utilize Netflix’s historical stock data from 2016 to 2025, constructing a dataset with closing prices as the dependent variable after data cleaning and normalization. Evaluated by MAE, MAPE, and RMSE, the dual-layer LSTM model outperforms RNN and ARIMA baselines, achieving test set metrics of MAE = 0.303, MAPE = 3.21%, and RMSE = 0.539. Ablation experiments validate the efficacy of the proposed enhancements: the dual-layer structure reduces MSE by 20.9%, while Dropout decreases test set MSE by 25.1%. Methodologically, this work advances hierarchical feature extraction, dynamic regularization frameworks, and probabilistic prediction systems, providing actionable risk indicators and tiered investment strategies for quantitative finance. Limitations include limited adaptability to sudden events, exclusion of external variables, and potential reliability degradation in long-term forecasting. Future work could integrate multimodal inputs to enhance model robustness.
文章引用:戴慧茹. 基于LSTM神经网络的股票价格预测[J]. 电子商务评论, 2025, 14(6): 600-611. https://doi.org/10.12677/ecl.2025.1461781

参考文献

[1] Box, G.E.P. and Jenkins, G.M. (1970) Time Series Analysis: Forecasting and Control. Holden-Day.
[2] Bollerslev, T. (1986) Generalized Autoregressive Conditional Heteroskedasticity. Journal of Econometrics, 31, 307-327. [Google Scholar] [CrossRef
[3] Tay, F.E.H. and Cao, L. (2001) Application of Support Vector Machines in Financial Time Series Forecasting. Omega, 29, 309-317. [Google Scholar] [CrossRef
[4] Breiman, L. (2001) Random Forests. Machine Learning, 45, 5-32. [Google Scholar] [CrossRef
[5] Zhang, G.P., Patuwo, B.E. and Hu, M.Y. (2018) Time-Series Forecasting with Neural Networks: A Comparative Study. European Journal of Operational Research, 265, 40-55.
[6] Nelson, D.M., Pereira, A.C. and de Oliveira, R.A. (2017) Predicting Stock Market Movements Using Recurrent Neural Networks. 2017 19th International Conference on Enterprise Information Systems, Porto, 26-29 April 2017, 410-417.
[7] Selvin, S., Vinayakumar, R., Gopalakrishnan, E.A., Menon, V.K. and Soman, K.P. (2017) Stock Price Prediction Using LSTM, RNN and CNN-Sliding Window Model. 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Udupi, 13-16 September 2017, 1643-1647. [Google Scholar] [CrossRef
[8] Shumway, R.H. (2000) Applied Statistical Time Series Analysis. China Machine Press.
[9] Ljung, L. (2006) System Identification: Theory for the User. 2nd Edition, Prentice Hall.
[10] Durbin, J. and Koopman, S.J. (2012) Time Series Analysis by State Space Methods. Oxford University Press. [Google Scholar] [CrossRef
[11] Chen, T. and Guestrin, C. (2016) XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, 13-17 August 2016, 785-794. [Google Scholar] [CrossRef
[12] Greff, K., Srivastava, R.K., Koutnik, J., Steunebrink, B.R. and Schmidhuber, J. (2017) LSTM: A Search Space Odyssey. IEEE Transactions on Neural Networks and Learning Systems, 28, 2222-2232. [Google Scholar] [CrossRef] [PubMed]
[13] Li, X., Zhang, Y., Wang, L., et al. (2023) Residual Attention LSTM for Financial Time Series Prediction. Expert Systems with Applications, 213, Article ID: 119284.
[14] Rumelhart, D.E., Hinton, G.E. and Williams, R.J. (1986) Learning Representations by Back-Propagating Errors. Nature, 323, 533-536. [Google Scholar] [CrossRef
[15] Bengio, Y., Simard, P. and Frasconi, P. (1994) Learning Long-Term Dependencies with Gradient Descent Is Difficult. IEEE Transactions on Neural Networks, 5, 157-166. [Google Scholar] [CrossRef] [PubMed]
[16] Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. Neural Computation, 9, 1735-1780. [Google Scholar] [CrossRef] [PubMed]
[17] 张喜凤. 基于深度学习的LSTM模型股价预测应用研究[J]. 科技与创新, 2024(23): 23-26.