-
摘要:
为了提高股票时间序列预测精度,增强预测模型结构参数可解释性,提出一种基于自适应粒子群优化(PSO)的长短期记忆(LSTM)股票价格预测模型(PSO-LSTM),该模型在LSTM模型的基础上进行改进和优化,因此擅长处理具有长期依赖关系的、复杂的非线性问题。通过自适应学习策略的PSO算法对LSTM模型的关键参数进行寻优,使股票数据特征与网络拓扑结构相匹配,提高股票价格预测精度。实验分别以沪市、深市、港股股票数据构建了PSO-LSTM模型,并对该模型的预测结果与其他预测模型进行比较分析。结果表明,基于自适应PSO的LSTM股票价格预测模型不但提高了预测准确度,而且具有普遍适用性。
-
关键词:
- 粒子群优化(PSO) /
- LSTM神经网络 /
- 自适应 /
- 股票价格预测 /
- 预测精度
Abstract:This paper proposes a stock price prediction model based on particle swarm optimization long short-term memory (PSO-LSTM). This model improves and optimizes the LSTM model, which makes it more appropriate for analyzing relationships such as long-term dependency and for solving complex nonlinear problems. Through finding the key parameters in LSTM model by the PSO algorithm with adaptive learning strategy, the stock data feature matches the network topology structure, and the model's prediction accuracy of stock price is improved. In the experiment, PSO-LSTM models are constructed respectively based on the stock datasets from Shanghai, Shenzhen and Hong Kong, and then they are compared to other prediction models. The comparison results show that the PSO-LSTM stock price prediction model achieves higher prediction accuracy and has general applicability.
-
表 1 上海浦发银行各模型评价指标比较
Table 1. Comparison of various models' evaluation indicators for Shanghai Pudong Development Bank
模型 RMSE MAPE/% MAE MSE R2 ARIMA 0.1609 3.6176 0.3809 0.0259 0.9833 SVM 0.1847 1.4149 0.1482 0.0341 0.9666 MLP 0.1924 1.4665 0.1551 0.0374 0.9832 RNN 0.2082 1.5145 0.1598 0.0433 1.3423 LSTM 0.1799 1.3792 0.1451 0.0323 1.1518 PSO-LSTM 0.1420 1.0369 0.1068 0.0202 1.0120 表 2 LSTM与PSO-LSTM评价指标比较
Table 2. Comparison of evaluation indicators between LSTM and PSO-LSTM
模型 RMSE 第1组 第2组 第3组 第4组 第5组 LSTM 0.1072 0.1061 0.1442 0.1629 1.1534 PSO-LSTM 0.1174 0.0913 0.1361 0.1240 0.1149 表 3 五粮液各模型评价指标比较
Table 3. Comparison of various models' evaluation indicators for Wuliangye
模型 RMSE MAPE/% MAE MSE R2 ARIMA 1.7814 11.1753 6.2734 3.2851 1.0178 SVM 1.6896 2.4872 1.3764 2.8548 0.7726 MLP 1.8892 2.6822 1.3879 3.4882 1.0605 RNN 1.6549 2.3478 1.3247 2.7203 1.0344 LSTM 1.6013 2.1247 1.1918 2.5734 1.0571 PSO-LSTM 1.3427 1.7808 1.0342 1.8028 1.0124 表 4 恒隆集团各模型评价指标比较
Table 4. Comparison of various models' evaluation indicators for Hang Lung Group
模型 RMSE MAPE/% MAE MSE R2 ARIMA 0.3582 4.3628 0.8921 0.1282 1.2391 SVM 0.5216 2.1204 0.4247 0.2721 0.5797 MLP 0.3439 1.2296 0.2529 0.1183 0.9695 RNN 0.3844 1.5902 0.3242 0.1478 0.9568 LSTM 0.3649 1.4834 0.3026 0.1332 0.9567 PSO-LSTM 0.2845 1.0472 0.2366 0.0812 1.0041 -
[1] SI Y W, YIN J.OBST-based segmentation approach to financial time series[J]. Engineering Applications of Artificial Intelligence, 2013, 26(10):2581-2596. doi: 10.1016/j.engappai.2013.08.015 [2] COSTA-JUSSÀ, MARTA R, ALLAUZEN A, et al.Introduction to the special issue on deep learning approaches for machine translation[J]. Computer Speech & Language, 2017, 46(11):367-373. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=fda55bcc89ecd0a7b03110f018df42b7 [3] FAYEK H M, LECH M, CAVEDON L.Evaluating deep learning architectures for speech emotion recognition[J]. Neural Network, 2017, 92(2):60-68. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=8888b33e167101c6f2565c44aafcf9b1 [4] XING J L, LI K, HU W M, et al.Diagnosing deep learning mod- els for high accuracy age estimation from a single image[J]. Pattern Recognition 2017, 66(1):106-116. [5] HOCHREITER S, SCHMIDHUBER J.Long short-term memory[J]. Neural Computation, 1997, 9(8):1735-1780. doi: 10.1162/neco.1997.9.8.1735 [6] DEIHIMI A, ORANG O, SHOWKATI H.Short-term electric load and temperature forecasting using wavelet echo state networks with neural reconstruction[J]. Energy, 2013, 57(3):382-401. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=3dc28149fa954940d688884f9c8a59eb [7] CAI M, LIU J.Maxout neurons for deep convolutional and LSTM neural networks in speech recognition[J]. Speech Communication, 2016, 77(3):53-64. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=400b43137b9aaf4b333d27dbeae6100f [8] ZHOU C, SUN C, LIU Z, et al.A C-LSTM neural network for text classification[J]. Computer Science, 2015, 1(4):39-44. [9] CHEN K, ZHOU Y, DAI F.A LSTM-based method for stock returns prediction: A case study of China stock market[C]//IEEE International Conference on Big Data.Piscataway, NJ: IEEE Press, 2015: 2823-2824. [10] JIA H J.Investigation into the effectiveness of long short term memory networks for stock price prediction[EB/OL]. (2016-03-25)[2019-07-10]. https://arxu-org/abs/1603.07893v1. [11] NELSON D M Q, PEREIRA A C M, DEOLIVEIRA R A, et al.Stock market's price movement prediction with LSTM neural networks[C]//International Joint Conference on Neural Networks.Piscataway, NJ: IEEE Press, 2017: 1419-1426. [12] FISCHER T, KRAUSS C.Deep learning with long short-term memory networks for financial market predictions[J]. European Journal of Operational Research, 2018, 270(2):654-669. doi: 10.1016/j.ejor.2017.11.054 [13] RODRIGUEZ A, LAIO A.Clustering by fast search and find of density peaks[J]. Science, 2014, 344(6191):1492-1496. doi: 10.1126/science.1242072 [14] 胡旺, 李志蜀.一种更简化而高效的粒子群优化算法[J].软件学报, 2007, 18(4):861-868. http://d.old.wanfangdata.com.cn/Periodical/rjxb200704008HU W, LI Z S.A simpler and more effective particle swarm optimization algorithm[J]. Journal of Software, 2007, 18(4):861-868(in Chinese). http://d.old.wanfangdata.com.cn/Periodical/rjxb200704008 [15] ADEBIYI A A, ADEWUMI A O, AYO C K.Stock price prediction using the ARIMA model[C]//UKSIM-AMSS International Conference on Computer Modelling & Simulation.Piscataway, NJ: IEEE Press, 2015: 106-112. [16] LIN Y, GUO H, HU J.An SVM-based approach for stock market trend prediction[C]//International Joint Conference on Neural Networks.Piscataway, NJ: IEEE Press, 2013: 1-7. [17] USMANI M, ADIL S H, RAZA K, et al.Stock market prediction using machine learning techniques[C]//International Conference on Computer & Information Sciences.Piscataway, NJ: IEEE Press, 2016: 322-327. [18] RATHER A M, AGARWAL A, SASTRY V.Recurrent neural network and a hybrid model for prediction of stock returns[J]. Expert Systems with Applications, 2015, 42(6):3234-3241. doi: 10.1016/j.eswa.2014.12.003 [19] MCNALLY S, ROCHE J, CATON S.Predicting the price of Bitcoin using Machine Learning[C]//26th Euromicro International Conference on Parallel Distributed and Network-based Processing.Piscataway, NJ: IEEE Press, 2018: 339-343.