基于Transformer模型的多尺度股票预测
Multi-Scale Stock Prediction Based on
DOI: 10.12677/AAM.2022.116408, PDF,    科研立项经费支持
作者: 李文琦, 高乐*:五邑大学智能制造学部,广东江门
关键词: 深度学习股票预测多尺度Transformer深度学习股票预测多尺度Transformer
摘要: 随着经济全球化所带来的股票交易市场扩大,股票交易数据日渐激增,如何使用更有效的方法在众多股票数据中选取优质股成为股民愈发关注的问题。而采用人工智能技术来分析和处理交易数据可以有效地辅助股民进行合理的股票选择。近些年,不同学者尝试使用人工智能技术的深度学习方法来解决股票预测问题,虽然取得了不错的效果,但是缺少对不同预测周期的股票价格预测能力的稳定性。本文为解决以上存在的问题,采用深度学习技术中的变换神经网络(transformer)作为网络基本架构对股票价格的开盘价进行预测,将不同时间尺度的股票价格输入到网络模型中,能够处理更全局的时间序列特征信息,然后通过CNN技术将不同尺度的特征进行融合,使得模型能够满足不同周期数据的预测变化。本研究选取乐普医疗(300003)、亿纬锂能(300014)、浦发银行(600000)和东风汽车(600006)四组股票作为实验数据。实验结果表明,在5个基本交易指标(开盘价、最高价、最低价、收盘价、成交量)的影响因素下,本研究的多尺度股票价格预测模型具有更好的性能及泛化能力。
Abstract: With the expansion of the stock trading market brought about by economic globalization, the stock trading data is increasing day by day. How to use a more effective method to select high-quality stocks from a large number of stock data has become a more and more concerning issue for inves-tors. The use of artificial intelligence technology to analyze and process transaction data can effec-tively assist investors in making reasonable stock selections. In recent years, different scholars have tried to use the deep learning method of artificial intelligence technology to solve the problem of stock prediction. Although they have achieved good results, they lack the stability of stock price forecasting ability in different forecasting periods. In order to solve the above problems, this paper uses the transform neural network (transformer) in the deep learning technology as the basic net-work structure to predict the opening price of the stock price, and input the stock price of different time scales into the network model, which can deal with more global. Then, the features of different scales are fused by CNN technology, so that the model can meet the prediction changes of different periodic data. This study selects four groups of stocks of Lepu Medical (300003), Yiwei Lithium En-ergy (300014), Shanghai Pudong Development Bank (600000) and Dongfeng Motor (600006) as experimental data. The experimental results show that under the influence of five basic trading in-dicators (opening price, high price, low price, closing price, and trading volume), the multi-scale stock price prediction model of this study has better performance and generalization ability.
文章引用:李文琦, 高乐. 基于Transformer模型的多尺度股票预测[J]. 应用数学进展, 2022, 11(6): 3806-3815. https://doi.org/10.12677/AAM.2022.116408

参考文献

[1] Wen, M., Li, P., Zhang, L., et al. (2019) Stock Market Trend Prediction Using High-Order Information of Time Series. IEEE Access, 7, 28299-28308. [Google Scholar] [CrossRef
[2] Zhou, F., Zhou, H.-M., Yang, Z., et al. (2019) EMD2FNN: A Strategy Combining Empirical Mode Decomposition and Factorization Machine Based Neural Network for Stock Market Trend Pre-diction. Expert Systems with Applications, 115, 136-151. [Google Scholar] [CrossRef
[3] Moghar, A. and Hamiche, M. (2020) Stock Market Prediction Using LSTM Recurrent Neural Network. Procedia Computer Science, 170, 1168-1173. [Google Scholar] [CrossRef
[4] Zhang, J., Cui, S., Xu, Y., et al. (2018) A Novel Data-Driven Stock Price Trend Prediction System. Expert Systems with Applications, 97, 60-69. [Google Scholar] [CrossRef
[5] Thakkar, A. and Chaudhari, K. (2020) CREST: Cross-Reference to Exchange-Based Stock Trend Prediction Using Long Short-Term Memory. Procedia Computer Science, 167, 616-625. [Google Scholar] [CrossRef
[6] 刘翀, 杜军平. 一种基于深度 LSTM 和注意力机制的金融数据预测方法[J]. 计算机科学, 2020, 47(12): 125-130.
[7] Sun, W., Zhang, P., Wang, Z., et al. (2021) Prediction of Cardiovascular Diseases Based on Machine Learning. ASP Transactions on Internet of Things, 1, 30-35. [Google Scholar] [CrossRef
[8] Nabipour, M., Nayyeri, P., Jabani, H., et al. (2020) Predicting Stock Market Trends Using Machine Learning and Deep Learning Algorithms via Continuous and Binary Data; A Comparative Analysis. IEEE Ac-cess, 8, 150199-150212. [Google Scholar] [CrossRef
[9] Vijh, M., Chandola, D., Tikkiwal, V.A., et al. (2020) Stock Closing Price Prediction Using Machine Learning Techniques. Procedia Computer Science, 167, 599-606. [Google Scholar] [CrossRef
[10] Paul, S. and Vishnoi, S. (2020) Real-Time Stock Trend Prediction via Sentiment Analysis of News Article. Proceedings of the e-Journal-First Pan IIT International Management Conference—2018. [Google Scholar] [CrossRef
[11] Chen, Y., Lin, W. and Wang, J.Z. (2019) A Dual-Attention-Based Stock Price Trend Prediction Model with Dual Features. IEEE Access, 7, 148047-148058. [Google Scholar] [CrossRef
[12] Selvin, S., Vinayakumar, R., Gopalakrishnan, E., et al. (2017) Stock Price Prediction Using LSTM, RNN and CNN-Sliding Window Model. Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Udupi, 13-16 September 2017, 1643-1647. [Google Scholar] [CrossRef
[13] Goodfellow, I., Bengio, Y. and Courville, A. (2017) Deep Learning (Adap-tive Computation and Machine Learning Series). The MIT Press, Cambridge, MA, 321-359.
[14] 刘甲, 孙德山. 基于注意力机制和 LSTM 网络的股价预测[J]. 应用数学进展, 2021, 10(12): 4379-4385. [Google Scholar] [CrossRef
[15] Huynh, H.D., Dang, L.M. and Duong, D. (2017) A New Model for Stock Price Movements Prediction Using Deep Neural Network. Proceedings of the 8th International Symposium on Information and Com-munication Technology, Nha Trang, 7-8 December 2017, 57-62. [Google Scholar] [CrossRef
[16] Minh, D.L., Sadeghi-Niaraki, A., Huy, H.D., et al. (2018) Deep Learning Approach for Short-Term Stock Trends Prediction Based on Two-Stream Gated Recurrent Unit Network. IEEE Access, 6, 55392-55404. [Google Scholar] [CrossRef
[17] Lu, R. and Lu, M. (2021) Stock Trend Prediction Algorithm Based on Deep Recurrent Neural Network. Wireless Communications and Mobile Computing, 2021, Article ID: 5694975. [Google Scholar] [CrossRef
[18] Yang, C., Zhai, J. and Tao, G. (2020) Deep Learning for Price Movement Prediction Using Convolutional Neural Network and Long Short-Term Memory. Mathematical Problems in Engineering, 2020, Article ID: 2746845. [Google Scholar] [CrossRef
[19] Park, Y., Eom, D., Seo, B., et al. (2020) Improved Predictive Deep Temporal Neural Networks with Trend Filtering. Proceedings of the First ACM International Conference on AI in Finance, New York, 15-16 October 2020, Article No. 8. [Google Scholar] [CrossRef
[20] Vaswani, A., Shazeer, N., Parmar, N., et al. (2017) Attention Is All You Need. Advances in Neural Information Processing Systems, 30, 5998-6008.