|
基于LSTM算法与股票历史数据的股票价格预测
|
Abstract:
股票价格的准确预测一直是金融领域关注的焦点之一。传统的股票预测方法通常依赖于k线图、十字线等方法,然而仅依靠传统方法分析前一天的价格来预测股票走向存在较大的局限性。为了进一步提升股票价格预测的精度和可靠性,本文提出了一种基于长短时记忆神经网络(Long Short-Term Memory Networks, LSTM)的股票价格预测模型。通过LSTM算法处理时序数据的优势捕捉价格数据中的复杂模式和非线性关系,挖掘股票历史价格数据中隐藏的波动信息,为股票价格预测领域的研究和实践提供了新的思路和方法。此外,为进一步获取最优的模型参数量,本文以平安银行2019年1月至12月的开盘价和收盘价数据为样本进行实验。实验结果表明,基于LSTM算法的股票价格预测准确率可达78.2%;历史股票价格序列数为5时,模型的预测精度最高。
Accurate prediction of stock prices has always been a focal point in the financial sector. Traditional stock prediction methods often rely on techniques such as k-line charts and crosshairs. However, relying solely on these traditional methods to analyze the previous day’s price for predicting the direction of a stock is subject to significant limitations. To enhance the accuracy and reliability of stock price prediction, this study puts forth a model based on Long Short-Term Memory Networks (LSTM). By leveraging the capabilities of the LSTM algorithm for processing time-series data and capturing complex patterns and nonlinear relationships in price data, this study uncovers hidden fluctuation information in historical stock price data, offering novel insights and methodologies for research and practice in the field of stock price prediction. Additionally, to determine the optimal number of model parameters, this study utilizes the opening and closing price data of Ping An Bank for the period between January and December 2019 as experimental samples. The experimental results demonstrate that the LSTM algorithm achieves a stock price prediction accuracy of 78.2%. Moreover, the model exhibits the highest precision when utilizing 5 historical stock price sequences.
[1] | Harel, A. and Harpaz, G. (2021) Forecasting Stock Prices. International Review of Economics & Finance, 73, 249-256.
https://doi.org/10.1016/j.iref.2020.12.033 |
[2] | Mondal, P., Shit, L. and Goswami, S. (2014) Study of Effectiveness of Time Series Modeling (ARIMA) in Forecasting Stock Prices. International Journal of Computer Science, Engineering and Applications, 4, 13-29.
https://doi.org/10.5121/ijcsea.2014.4202 |
[3] | Rao, T.S. and Gabr, M.M. (2012) An Introduction to Bispectral Analysis and Bilinear Time Series Models. Springer, New York. |
[4] | Zheng, T.S., Farrish, J. and kitterlin, M. (2016) Performance Trends of Hotels and Casino Hotels through the Recession: An ARIMA with Intervention Analysis of Stock Indices. Journal of Hospitality Marketing & Management, 25, 49-68. https://doi.org/10.1080/19368623.2015.970725 |
[5] | Rangel-Gonzalez, J.A., Frausto-Solis, J., González-Barbosa, J.J., Pazos-Rangel, R.A. and Fraire-Huacuja, H.J. (2018) Comparative Study of ARIMA Methods for Forecasting Time Series of the Mexican Stock Exchange. In: Castillo, O., Melin, P. and Kacprzyk, J., Eds., Fuzzy Logic Augmentation of Neural and Optimization Algorithms: Theoretical Aspects and Real Applications, Springer, Cham, 475-485. https://doi.org/10.1007/978-3-319-71008-2_34 |
[6] | 宋刚, 张云峰, 包芳勋, 等. 基于粒子群优化LSTM的股票预测模型[J]. 北京航空航天大学学报, 2019, 45(12): 2533-2542. |
[7] | 丁文绢. 基于股票预测的ARIMA模型、LSTM模型比较[J]. 工业控制计算机, 2021, 34(7): 109-112, 116. |
[8] | 熊政, 车文刚. ARIMA-GARCH-M模型在短期股票预测中的应用[J]. 陕西理工大学学报(自然科学版), 2022, 38(4): 69-74. |
[9] | 徐幼恩, 罗扬. 基于组合模型的股票预测研究综述[J]. 科技和产业, 2022, 22(11): 214-220. |
[10] | 陈登建, 杜飞霞, 夏换. 基于ARIMA与SVR滚动残差模型组合的股票预测[J]. 计算机时代, 2022(5): 76-81.
https://doi.org/10.16644/j.cnki.cn33-1094/tp.2022.05.019 |
[11] | 黄明星, 姚晨. PSO-BP神经网络模型在股票预测中的应用[J]. 福建电脑, 2023, 39(3): 36-40.
https://doi.org/10.16707/j.cnki.fjpc.2023.03.007 |
[12] | 张如梦, 张华美. BP神经网络与ARMA-GARCH模型在股票预测中的对比分析[J]. 高师理科学刊, 2021, 41(5): 14-20. |
[13] | Bao, Y., Lu, Y. and Zhang, J. (2004) Forecast-ing Stock Price by SVMs Regression. In: Bussler, C. and Fensel, D., Eds., Artificial Intelligence: Methodology, Systems, and Applications, Springer, Berlin, 295-303.
https://doi.org/10.1007/978-3-540-30106-6_30 |
[14] | 徐浩然, 许波, 徐可文. 机器学习在股票预测中的应用综述[J]. 计算机工程与应用, 2020, 56(12): 19-24. |
[15] | 孔宇萍. 基于时间序列与机器算法的工商银行股票预测分析[J]. 中国管理信息化, 2023, 26(6): 146-148. |
[16] | Chen, K., Zhou, Y. and Dai, F. (2015) A LSTM-Based Method for Stock Returns Prediction: A Case Study of China Stock Market. 2015 IEEE International Conference on Big Data (Big Data), Santa Clara, 29 October-1 November 2015, 2823-2824. https://doi.org/10.1109/BigData.2015.7364089 |
[17] | Fischer, T. and Krauss, C. (2017) Deep learning with Long Short Term Memory Networks for Financial Market Predictions. European Journal of Operational Research, 270, 654-669. https://doi.org/10.1016/j.ejor.2017.11.054 |