计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (9): 334-342.DOI: 10.3778/j.issn.1002-8331.2404-0151

• 工程与应用 • 上一篇    下一篇

NS-FEDformer模型对股票收益率的预测研究

王婧,李云霞   

  1. 浙江财经大学 数据科学学院,杭州 310018
  • 出版日期:2025-05-01 发布日期:2025-04-30

Research on Stock Return Forecast by NS-FEDformer Model

WANG Jing, LI Yunxia   

  1. School of Data Science, Zhejiang University of Finance and Economics, Hangzhou 310018, China
  • Online:2025-05-01 Published:2025-04-30

摘要: 股票收益率预测作为金融市场中一项较为困难的预测任务,是研究者们重点关注的热门话题。近年来,Transformer类模型以其强大的特征表征能力和高效的并行计算能力,在序列建模中大放光彩。为了将深度学习技术更好地应用于股票预测领域,提出了基于NS-FEDformer模型的股票收益率预测方法,以在时间序列预测任务中表现优越的FEDformer模型为基础,引入non-stationary Transformer(NS-Transformer)框架中的de-stationary attention机制还原原始股票序列的注意力权重,提升了模型对于序列特征的提取能力。实验结果表明,NS-FEDformer模型在包括浙商证券、中国银河等十只股票数据集上的平均预测表现均优于深度学习股票预测的主流模型,且较经典的Transformer模型在不同预测步长下的MSE和MAE最大降低了30.35%和23.35%,RMSE和MAPE最大降低了16.65%和39.80%,验证了该模型的优越性。

关键词: 股票预测, 注意力机制, 深度学习, FEDformer模型

Abstract: As a difficult forecasting task in the financial market, stock return forecast is a hot topic that researchers focus on. In recent years, Transformer class model has gained prominence in sequence modeling with its powerful feature characterization capability and efficient parallel computing capability. In order to better apply deep learning technology to the field of stock prediction, a stock return prediction method based on NS-FEDformer model is proposed, which is based on FEDformer model with superior performance in time series prediction tasks. The de-stationary attention mechanism in the non-stationary Transformer (NS-Transformer) framework is introduced to restore the attention weight of the original stock series, which improves the ability of the model to extract sequence features. Experimental results show that the average prediction performance of NS-FEDformer model on ten stock datasets, including Zheshang Securities and China Galaxy, is better than that of mainstream deep learning stock prediction models, and compared with classic Transformer model, MSE and MAE decrease by 30.35% and 23.35%, RMSE and MAPE decrease by 16.65% and 39.80%, respectively, at the maximum under different prediction steps. The superiority of this model is verified.

Key words: stock forecast, attention mechanism, deep learning, FEDformer model