基于多种Transformer架构的股票价格预测模型研究
Research on Stock Price Prediction Models Based on Various Transformer Architectures
摘要: 时间序列预测是金融领域的重要研究课题,对提高决策效率和风险管理具有重要意义。本文提出并构建了多种基于Transformer架构的时间序列预测模型,包括Vanilla Transformer、Informer、FEDformer、Autoformer、PatchTST和TimesNet,并以浦发银行股票收盘价作为预测对象,探讨了单变量和多变量输入下这些模型的预测性能。实验结果表明,基于Transformer架构的模型在预测精度和稳定性方面显著优于传统模型(ARIMA和VAR)。其中Vanilla Transformer在单变量预测中表现最佳(MSE = 0.0455, MAE = 0.1480),而TimesNet在多变量预测中性能最优(MSE = 0.0463, MAE = 0.1513)。研究表明,基于Transformer的模型在处理复杂时间序列问题时具有显著优势,为金融时间序列预测提供了新的方法和参考。未来可进一步探索Transformer与其他深度学习技术的结合,以提升模型的泛化能力和实用性。
Abstract: Time series forecasting is an important research topic in the financial field, with significant implications for improving decision-making efficiency and risk management. This paper proposes and constructs several time series forecasting models based on the Transformer architecture, including Vanilla Transformer, Informer, FEDformer, Autoformer, PatchTST, and TimesNet. Using the closing price of Shanghai Pudong Development Bank stock as the forecasting target, the paper examines the predictive performance of these models under univariate and multivariate inputs. Experimental results show that Transformer-based models significantly outperform traditional models (ARIMA and VAR) in terms of prediction accuracy and stability. Among them, the Vanilla Transformer performs the best in univariate forecasting (MSE = 0.0455, MAE = 0.1480), while TimesNet has the best performance in multivariate forecasting (MSE = 0.0463, MAE = 0.1513). The study demonstrates that Transformer-based models have a significant advantage in handling complex time series problems, providing new methods and references for financial time series forecasting. Future research can further explore the combination of Transformer with other deep learning technologies to enhance the model’s generalization ability and practical utility.
文章引用:宁小珊, 杨燕. 基于多种Transformer架构的股票价格预测模型研究[J]. 人工智能与机器人研究, 2025, 14(3): 629-637. https://doi.org/10.12677/airr.2025.143062

参考文献

[1] 杨海民, 潘志松, 白玮. 时间序列预测方法综述[J]. 计算机科学, 2019, 46(1): 21-28.
[2] 周静雯. 基于ARIMA模型的股票预测——以中国银行为例[J]. 现代计算机, 2024, 30(14): 89-92.
[3] 张巨峰. 基于ARIMA模型的甘肃省碳排放预测分析[J]. 山西大同大学学报(自然科学版), 2024, 40(4): 31-36.
[4] 田行健. 基于ARIMA模型的碳期货产品设计[D]: [硕士学位论文]. 蚌埠: 安徽财经大学, 2023.
[5] 张一弛. 基于向量自回归模型的上证50ETF期权价格影响因素的实证研究[D]: [硕士学位论文]. 杭州: 浙江财经大学, 2018.
[6] 毛远宏, 孙琛琛, 徐鲁豫, 等. 基于深度学习的时间序列预测方法综述[J]. 微电子学与计算机, 2023, 40(4): 8-17.
[7] 王嘉增. 基于改进LSTM神经网络的股价预测与股票投资组合研究[D]: [硕士学位论文]. 西安: 西安建筑科技大学, 2023.
[8] Vaswani, A., Shazeer, N., Parmar, N., et al. (2017) Attention Is All You Need. Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, Long Beach, 4-9 December 2017, 5998-6008.
[9] 夏雪, 闫恩来, 李喜武. Transformer在时间序列预测中的应用综述[J]. 信息技术与信息化, 2024(3): 124-128.
[10] 钟袁丰, 马丽文. 基于Informer模型的海洋环境要素缺失数据时间序列预测[J]. 青岛大学学报(工程技术版), 2024, 39(2): 11-16.
[11] 王钰涵, 梁志勇. 基于iTransformer模型的金融时间序列预测[J]. 产业创新研究, 2024(15): 122-124.
[12] Lin, T., Wang, Y., Liu, X. and Qiu, X. (2022) A Survey of Transformers. AI Open, 3, 111-132. [Google Scholar] [CrossRef
[13] Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., et al. (2021) Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting. Proceedings of the AAAI Conference on Artificial Intelligence, 35, 11106-11115. [Google Scholar] [CrossRef
[14] Zhou, T., Ma, Z., Wen, Q., et al. (2022) FEDformer: Frequency Enhanced Decomposed Transformer for Long-Term Series Forecasting. arXiv: 2201.12740.
[15] Wu, H., Xu, J., Wang, J., et al. (2021) Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting. Advances in Neural Information Processing Systems, 34, 22419-22430.
[16] Nie, Y., Nguyen, N.H., Sinthong, P., et al. (2022) A Time Series Is Worth 64 Words: Long-Term Forecasting with Transformers. arXiv: 2211.14730.
[17] Wu, H., Hu, T., Liu, Y., et al. (2022) TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis. arXiv: 2210.02186.
[18] 黄柱兴, 杨燕, 刘宇婷. 基于财经新闻的多维情感特征融合交易特征的股票预测模型研究[J]. 南宁师范大学学报(自然科学版), 2023, 40(1): 64-71.