|
基于RNN与LSTM的股价预测模型比较研究——以中石油股份为例
|
Abstract:
本文以中石油股份为例,聚焦于股票价格预测,运用RNN模型与LSTM模型展开深入研究。使用RNN模型进行预测时,由于模型本身存在梯度消失或梯度爆炸的问题,其在处理长序列股价数据时存在显著缺陷,致使其难以捕捉股票价格序列中的长期依赖关系,在面对包含长期趋势、季节性变化的股价数据时表现欠佳。鉴于此,引入LSTM模型,该模型凭借独特的输入门、遗忘门和输出门机制,有效解决了长期依赖难题,能够选择性地记忆或遗忘信息,从而有效处理长序列数据。实验结果有力证实了LSTM模型不仅能精准模拟股价的真实走向,而且在模型评价指标上全面优于RNN模型。综上,LSTM模型在中石油股价预测领域展现出卓越的效果,相较于RNN模型更适用于股票预测任务。
This study takes PetroChina Company Limited as an example, focuses on stock price prediction, and conducts an in-depth study using the RNN model and the LSTM model. When using the RNN model for prediction, due to the problems of gradient vanishing or gradient explosion in the model itself, it has significant defects in processing long-sequence stock price data. This makes it difficult for the RNN model to capture the long-term dependencies in the stock price sequence, and it performs poorly when dealing with stock price data containing long-term trends and seasonal changes. In view of this, the LSTM model is introduced. With its unique mechanisms of input gate, forget gate and output gate, the LSTM model effectively solves the problem of long-term dependencies. It can selectively remember or forget information, thus effectively handling long-sequence data. The experimental results strongly confirm that the LSTM model can not only accurately simulate the real trend of stock prices, but also comprehensively outperforms the RNN model in terms of model evaluation indicators. In conclusion, the LSTM model shows excellent results in the field of predicting PetroChina’s stock price and is more suitable for stock prediction tasks compared with the RNN model.
[1] | 翁紫霞. 基于ARIMA模型的股价分析与预测——以建设银行为例[J]. 现代信息科技, 2023, 7(14): 137-141. |
[2] | 曹沥方, 张若麟. 基于ARIMA模型的股价预测——以牧原股份为例[J]. 财富时代, 2024(2): 54-56. |
[3] | 杨光远. 基于决策树股票价格预测算法的研究及应用[D]: [硕士学位论文]. 福州: 福州大学, 2021. |
[4] | 孙若愚. 基于支持向量机的股票价格预测[D]: [硕士学位论文]. 大连: 大连理工大学, 2019. |
[5] | 曹玉贵, 谢梦醒. 基于WD-CNN-LSTM模型的股票价格预测分析[J]. 华北水利水电大学学报(社会科学版), 2023, 39(5): 15-22. |
[6] | Zhu, Q., Zhou, X., Tan, J. and Guo, L. (2019) Knowledge Base Reasoning with Convolutional-Based Recurrent Neural Networks. IEEE Transactions on Knowledge and Data Engineering, 33, 2015-2028. https://doi.org/10.1109/tkde.2019.2951103 |
[7] | Sang, S. and Li, L. (2024) A Novel Variant of LSTM Stock Prediction Method Incorporating Attention Mechanism. Mathematics, 12, Article No. 945. https://doi.org/10.3390/math12070945 |
[8] | Zaheer, S., Anjum, N., Hussain, S., Algarni, A.D., Iqbal, J., Bourouis, S., et al. (2023) A Multi Parameter Forecasting for Stock Time Series Data Using LSTM and Deep Learning Model. Mathematics, 11, Article No. 590. https://doi.org/10.3390/math11030590 |
[9] | Hurtado-Mora, H.A., García-Ruiz, A.H., Pichardo-Ramírez, R., González-del-Ángel, L.J. and Herrera-Barajas, L.A. (2024) Sales Forecasting with LSTM, Custom Loss Function, and Hyperparameter Optimization: A Case Study. Applied Sciences, 14, Article No. 9957. https://doi.org/10.3390/app14219957 |
[10] | Sherstinsky, A. (2020) Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) Network. Physica D: Nonlinear Phenomena, 404, Article ID: 132306. https://doi.org/10.1016/j.physd.2019.132306 |