A Hybrid Model for Stock Index Forecasting Integrating Multi-Scale Local Attention and State-Space Modeling
Haorong Liao, Xiangzeng Kong, Yiming Mu, Jinghu Li, Junfeng Han, Guoyu Hu, Tingting ZhangStock index forecasting is essential for financial market analysis and risk monitoring, yet it remains challenging because index price series are nonlinear, non-stationary, and driven by heterogeneous market factors. Existing methods remain limited in preserving local price patterns, capturing multi-scale local dependencies, and integrating attention-derived structures with long-range state-space representations. To address these limitations, we propose AG-SSM, an attention-guided state-space model for multi-step stock index forecasting. The model first uses variable-wise patch embedding to construct local semantic units, which are then processed by the AG-SSM architecture for temporal representation learning. Its core block integrates dual-path local attention (DPLA), S4D-based state-space feature generation, attention-guided aggregation (AGA), and gated update (GU). Specifically, DPLA combines sliding and dilated local attention to capture contiguous and sparsely distributed dependencies, while AGA reuses local attention maps to refine state-space features, thereby coupling local market structures with long-range sequential dynamics. Experiments on six stock index datasets (SSE, SZSE, SMESE, SP500, DJIA, and NIKKEI225) under one-, five-, ten-, and fifteen-step forecasting horizons show that AG-SSM achieves the lowest horizon-averaged MAPE on all six datasets while maintaining competitive performance across other metrics and individual horizons. Averaged over five independent runs, the horizon-averaged MAPE values are 1.5466%, 2.2173%, 2.2293%, 1.4373%, 1.2995%, and 1.8738% on the six datasets, respectively. Ablation studies, state-space variant comparisons, sensitivity analyses, and statistical tests further support the effectiveness and robustness of the proposed framework.