计算机科学与探索 ›› 2024, Vol. 18 ›› Issue (7): 1889-1899.DOI: 10.3778/j.issn.1673-9418.2401037

• 人工智能·模式识别 • 上一篇    下一篇

融合增量学习与Transformer模型的股价预测研究

陈东洋,毛力   

  1. 江南大学 人工智能与计算机学院 江苏省模式识别与计算智能工程实验室,江苏 无锡 214122
  • 出版日期:2024-07-01 发布日期:2024-06-28

Research on Stock Price Prediction Integrating Incremental Learning and Transformer Model

CHEN Dongyang, MAO Li   

  1. Jiangsu Engineering Laboratory of Pattern Recognition and Computational Intelligence, School of Artificial Intelligence and Computer Science, Jiangnan University, Wuxi, Jiangsu 214122, China
  • Online:2024-07-01 Published:2024-06-28

摘要: 股票价格预测一直是金融研究和量化投资共同关注的重点话题。当前股价预测的深度学习模型多数基于批处理学习设置,这要求训练数据集是先验的,这些模型面对实时的数据流预测是不可扩展的,当数据分布动态变化时模型的预测效果将会下降。针对现有研究对非平稳股票价格数据预测精度不佳的问题,提出一种基于增量学习和持续注意力机制的在线股价预测模型(Increformer),通过持续自注意力机制挖掘特征变量之间的时序依赖关系,采用持续归一化机制处理数据非平稳问题,基于弹性权重巩固的增量训练策略获取数据流中的新知识,提高预测精度。在股票市场的股指与个股价格序列中选取五个公开数据集进行实验。实验结果表明,Increformer模型能够有效挖掘数据的时序信息以及特征维度的关联信息从而提高股票价格的预测性能。通过消融实验评估了Increformer模型的持续归一化机制、持续注意力机制以及增量训练策略的效果及必要性,验证了所提模型的准确性与普适性,Increformer模型能够有效捕捉股票价格序列的趋势与波动。

关键词: 时间序列预测, Transformer模型, 增量学习, 持续注意力机制

Abstract: Stock price prediction has always been a focal topic in financial research and quantitative investment. Currently, most deep learning models for stock price prediction are based on batch learning settings, which require prior knowledge of the training dataset. These models are not scalable for real-time data stream prediction, and their performance decreases when the data distribution dynamically changes. To address the issue of poor prediction accuracy for non-stationary stock price data in existing research, this paper proposes an online stock price prediction model (Increformer) based on incremental learning and continuous attention mechanism. By leveraging continuous self-attention mechanism to capture the temporal dependencies among feature variables and employing continuous normalization mechanism to handle non-stationary data, the model enhances prediction accuracy through the incremental training strategy based on elastic weighting consolidation to acquire new knowledge from the data stream. Five public datasets are selected from the stock index and individual stock price sequences in the stock market for experiments. Experimental results demonstrate that Increformer effectively extracts temporal information and feature dimension correlation from the data, thus improving the prediction performance of stock prices. Additionally, ablation experiments are conducted to evaluate the effects and necessity of the continuous normalization mechanism, continuous attention mechanism, and incremental training strategy, thereby verifying the accuracy and generalizability of the proposed model. Increformer can effectively capture the trends and fluctuations of stock price series.

Key words: time series prediction, Transformer, incremental learning, continuous attention