基于CNN-LSTM-Attention模型的股票预测及系统开发
Stock Prediction and System Development Based on the CNN-LSTM-Attention Model
DOI: 10.12677/sea.2025.144081, PDF,    科研立项经费支持
作者: 周晓娅*:重庆对外经贸学院数学与计算机科学学院,重庆;何松芝:重庆对外经贸学院大数据与智能工程学院,重庆
关键词: CNNLSTM深度学习股票预测CNN LSTM Deep Learning Stock Prediction
摘要: 近年来,中国A股市场呈现出“高噪声、厚尾分布、政策扰动”等复杂特征,传统计量模型难以刻画其特征。深度学习技术凭借其强大的非线性建模能力,为金融时间序列预测提供了新范式。而现有研究多聚焦于美股或指数层面,对A股个股的研究较少,且缺乏系统化的模型部署与交互式展示。本文以京粮控股(000505)为研究对象,构建CNN-LSTM-Attention混合模型,融合CNN的局部特征提取能力、LSTM的长期依赖建模能力与Attention的动态权重分配机制,提出一种适用于A股市场的次日收盘价预测框架。实验结果表明,该模型在测试集上R2高达0.92,显著优于传统的LSTM模型,并通过FastAPI与ECharts实现了可部署、可交互的预测系统。
Abstract: In recent years, China’s A-share market presents complex features such as “high noise, thick-tailed distribution, and policy perturbations”, which are difficult to be characterized by traditional econometric models. Deep learning technology provides a new paradigm for financial time series forecasting by virtue of its powerful nonlinear modeling capability. Existing research focuses on the U.S. stock or index level, with less research on A-share stocks and a lack of systematic model deployment and interactive display. In this paper, we take Beijing Food Holdings (000505) as the research object, construct a hybrid CNN-LSTM-Attention model, integrate the local feature extraction capability of CNN, the long-term dependence modeling capability of LSTM and the dynamic weight allocation mechanism of Attention, and propose a next-day closing price prediction framework for A-share market. The experimental results show that the model has a high R2 of 0.92 on the test set, which significantly outperforms the traditional LSTM models, and realizes a deployable and interactive prediction system through FastAPI and ECharts.
文章引用:周晓娅, 何松芝. 基于CNN-LSTM-Attention模型的股票预测及系统开发[J]. 软件工程与应用, 2025, 14(4): 919-927. https://doi.org/10.12677/sea.2025.144081

参考文献

[1] 管健. 基于RNN-CNN模型股票价格预测方法研究[D]: [硕士学位论文]. 南京: 南京信息工程大学, 2023.
[2] Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. Neural Computation, 9, 1735-1780. [Google Scholar] [CrossRef] [PubMed]
[3] 耿晶晶, 刘玉敏, 李洋, 等. 基于CNN-LSTM 的股票指数预测模型[J]. 统计与决策, 2021, 37(5): 134-138.
[4] 林杰, 康慧琳. 基于注意力机制的LSTM股价趋势预测研究[J]. 上海管理科学, 2020, 42(1): 109-115.
[5] Bukhari, A.H., Raja, M.A.Z., Sulaiman, M., Islam, S., Shoaib, M. and Kumam, P. (2020) Fractional Neuro-Sequential ARFIMA-LSTM for Financial Market Forecasting. IEEE Access, 8, 71326-71338. [Google Scholar] [CrossRef
[6] 汪定, 邹云开, 陶义, 等. 基于循环神经网络和生成式对抗网络的口令猜测模型研究[J]. 计算机学报, 2021, 44(8): 1519-1534.
[7] 周章元, 何小灵. 基于优化LSTM模型的股价预测方法[J]. 统计与决策, 2023, 39(6): 143-148.
[8] 曹超凡, 罗泽南, 谢佳鑫, 等. MDT-CNN-LSTM模型的股价预测研究[J]. 计算机工程与应用, 2022, 58(5): 280-286.