基于注意力机制的LSTM多因子股指预测研究
A Study of LSTM Multi-Factor Stock Index Prediction Based on Attention Mechanism
DOI: 10.12677/aam.2024.1311465, PDF,    科研立项经费支持
作者: 李福镇, 陈 鑫*, 黄贤鑫, 张泽宇, 张一嘉:南京林业大学理学院,江苏 南京
关键词: 股票价格指数LSTM注意力机制时间序列预测Stock Price Index LSTM Attention Mechanism Time Series Forecasting
摘要: 股票价格指数是根据选定的股票样本,通过加权计算得出反映股市整体走势的指标。本文使用结合注意力机制的LSTM模型对股票价格指数进行建模和预测。LSTM是循环神经网络的一种变体,能够有效地处理长期依赖关系。注意力机制模仿了人类视觉注意力的功能,处理信息时能够动态地聚焦于最为重要的部分。首先,将原始数据归一化处理,划分为训练集和测试集。再将训练集数据转换为监督型数据并用来训练模型。最后,利用训练好的模型进行预测并与测试集数据进行对比,以评估模型的效果。研究结果表明,基于注意力机制的LSTM多因子预测模型的MAE为35.3749,RMSE为43.4630。相对于LSTM单因子模型和基于注意力机制的LSTM单因子预测模型,MAE分别降低了18.49%和61.47%,RMSE分别降低了10.55%和55.19%。
Abstract: A stock price index is an indicator that reflects the overall trend of the stock market based on a weighted calculation of a selected sample of stocks. In this paper, the stock price index is modelled and predicted using an LSTM model incorporating an attention mechanism, a variant of recurrent neural networks that can effectively handle long-term dependencies. The attention mechanism mimics the function of human visual attention and is able to dynamically focus on the most important parts when processing information. Firstly, the raw data is normalised and divided into a training set and a test set. The training set data is then converted to supervised data and used to pair train the model. Finally, the trained model is used to make predictions and compared with the test set data to evaluate the effectiveness of the model. The results of the study show that the MAE of the LSTM multifactor prediction model based on the attention mechanism is 35.3749 and the RMSE is 43.4630. The MAE is reduced by 18.49% and 61.47%, and the RMSE is reduced by 10.55% and 55.19%, respectively, with respect to the LSTM one-factor model and the LSTM one-factor prediction model based on the attention mechanism.
文章引用:李福镇, 陈鑫, 黄贤鑫, 张泽宇, 张一嘉. 基于注意力机制的LSTM多因子股指预测研究[J]. 应用数学进展, 2024, 13(11): 4831-4844. https://doi.org/10.12677/aam.2024.1311465

参考文献

[1] 高源, 黄犚. 基于深度学习的股票价格指数预测[J]. 软件工程, 2024, 27(5): 7-13.
[2] 黄杏丹. 基于ARIMA-BiLSTM模型的沪深300指数预测[J]. 中阿科技论坛(中英文), 2023(4): 68-72.
[3] 曾丽芳, 李丽萍, 江绍萍. 基于BP神经网络的股票价格预测[J]. 云南民族大学学报(自然科学版), 2023, 32(5): 658-665.
[4] 吴峰, 谢聪, 谢春美. 基于差分变异GRU梯度的股票价格预测算法[J]. 现代计算机, 2022, 28(10): 18-24+71.
[5] Sulandari, W., Subanar, S., Suhartono, S. and Utami, H. (2016) Forecasting Electricity Load Demand Using Hybrid Exponential Smoothing-Artificial Neural Network Model. International Journal of Advances in Intelligent Informatics, 2, 131-139. [Google Scholar] [CrossRef
[6] Bhattacharjee, N.V. and Tollner, E.W. (2016) Improving Management of Windrow Composting Systems by Modeling Runoff Water Quality Dynamics Using Recurrent Neural Network. Ecological Modelling, 339, 68-76. [Google Scholar] [CrossRef
[7] Huang, B., Zheng, H., Guo, X., Yang, Y. and Liu, X. (2021) A Novel Model Based on DA-RNN Network and Skip Gated Recurrent Neural Network for Periodic Time Series Forecasting. Sustainability, 14, Article 326. [Google Scholar] [CrossRef
[8] Cantero-Chinchilla, S., Simpson, C.A., Ballisat, A., Croxford, A.J. and Wilcox, P.D. (2023) Convolutional Neural Networks for Ultrasound Corrosion Profile Time Series Regression. NDT & E International, 133, Article 102756. [Google Scholar] [CrossRef
[9] Lazcano, A., Herrera, P.J. and Monge, M. (2023) A Combined Model Based on Recurrent Neural Networks and Graph Convolutional Networks for Financial Time Series Forecasting. Mathematics, 11, Article 224. [Google Scholar] [CrossRef
[10] Jo, W. and Kim, D. (2023) Neural Additive Time-Series Models: Explainable Deep Learning for Multivariate Time-Series Prediction. Expert Systems with Applications, 228, Article 120307. [Google Scholar] [CrossRef
[11] Hadwan, M., M. Al-Maqaleh, B., N. Al-Badani, F., Ullah Khan, R. and A. Al-Hagery, M. (2022) A Hybrid Neural Network and Box-Jenkins Models for Time Series Forecasting. Computers, Materials & Continua, 70, 4829-4845. [Google Scholar] [CrossRef
[12] 文豪, 陈昊. 基于LSTM循环神经网络的税收预测[J]. 计算机科学, 2020, 47(S2): 437-443.
[13] 薛涛, 丘森辉, 陆豪, 等. 基于经验模态分解和多分支LSTM网络汇率预测[J]. 广西师范大学学报(自然科学版), 2021, 39(2): 41-50.
[14] 次必聪, 张品一. 基于ARIMA-LSTM模型的金融时间序列预测[J]. 统计与决策, 2022, 38(11): 145-149.
[15] 徐存东, 王鑫, 田俊姣, 等. 基于ARIMA-SVM方法的梯级泵站机组运行趋势预测[J]. 水电能源科学, 2023, 41(2): 133-136.
[16] 范京道, 黄玉鑫, 闫振国, 等. ARIMA-SVM组合模型驱动下的瓦斯浓度预测研究[J]. 工矿自动化, 2022, 48(9): 134-139.
[17] 廖雪超, 陈才圣, 伍杰平. 基于CNN-LSTM及深度学习的风电场时空组合预测模型[J]. 信息与控制, 2022, 51(4): 498-512.
[18] 谢学斌, 孔令燕. 基于ARIMA和XGBoost组合模型的交通事故预测[J]. 安全与环境学报, 2021, 21(1): 277-284.
[19] 石岩松, 杨博. RNN在线学习框架下CNN-LSTM模型对黄金期货价格的预测[J]. 现代信息科技, 2024, 8(11): 141-144+152.
[20] 甘如美江, 傅杰, 汪正, 等. 改进灰狼算法与机器学习混合模型的时间序列预测[J/OL]. 重庆工商大学学报(自然科学版), 2024: 1-13.
http://kns.cnki.net/kcms/detail/50.1155.N.20240628.1614.002.html, 2024-07-01.
[21] 钟袁丰, 马丽文. 基于Informer模型的海洋环境要素缺失数据时间序列预测[J]. 青岛大学学报(工程技术版), 2024, 39(2): 11-16.
[22] 吕海峰, 涂井先, 林泓全, 等. 基于CNN-LSTM-Attention和自回归的混合水位预测模型(英文) [J]. 水利水电技术(中英文), 2024, 55(6): 16-31.
[23] 任晟岐, 宋伟. 基于GGInformer模型的多维时间序列特征提取与预测研究[J]. 计算机工程与科学, 2024, 46(4): 590-598.
[24] 王飞, 荣统瑞, 侯恩科, 等. 基于VMD-BiLSTM组合模型的矿井涌水量时间序列预测方法研究[J]. 矿业研究与开发, 2024, 44(3): 143-151.
[25] 陈东洋, 毛力. 融合增量学习与Transformer模型的股价预测研究[J]. 计算机科学与探索, 2024, 18(7): 1889-1899.