A Hybrid Model for Stock Index Forecasting Integrating Adaptive Frequency-Domain Decomposition and Enhanced Transformer Encoder
Hairong Zheng, Xiaozheng Zeng, Guoyu Hu, Tingting ZhangStock index price series are composed of superimposed multi-frequency components, including long-term trends, cyclical fluctuations, and stochastic noise. Effectively decoupling these heterogeneous components and modeling them separately is key to improving forecasting accuracy. Existing methods under the “decomposition–prediction” paradigm mostly employ fixed-scale decomposition, and the forecasting models are not specifically adapted to the non-stationary and high-noise characteristics of financial data, resulting in limitations in adaptivity and local dynamic capture. This paper proposes a frequency-aware adaptive multi-scale decomposition Transformer hybrid model (FAMS-Transformer). At the decomposition level, the fast Fourier transform is used to dynamically identify dominant cycles, thereby adaptively decoupling trends and fluctuations, overcoming the limitations of fixed-scale decomposition. At the forecasting level, a lightweight depthwise separable convolution is embedded between the self-attention and feedforward network of the Transformer encoder, enhancing the model’s ability to capture local temporal dynamics and achieving collaborative modeling of global dependencies and local information. Comparative experiments with 15 baseline models including LSTM, Transformer, TimesNet, and FreTS on three representative Chinese market indices—Shanghai Composite Index, Shenzhen Component Index, and Small and Medium Enterprises 100 Index—across four prediction horizons from one step to 15 steps demonstrate that FAMS-Transformer achieves the best forecasting accuracy in all scenarios. The coefficient of determination for 15-step prediction remains stably between 0.730 and 0.928. Moreover, the model still performs well on the S & P 500 dataset. Ablation studies and significance tests further validate the effectiveness of each core module and the statistical significance of the performance improvements.