Dynamic Windowing in Transformers via Regime Incorporation for Financial Time Series
Praveen, Prince Chouhan, Keshav Maheshwari, Aman Verma
Abstract
Financial time series exhibit non-stationary behavior, where the strength and extent of temporal dependencies vary across market regimes. Trending, low-volatility phases typically require long-range contextual information, whereas mean-reverting, high-volatility periods rely more heavily on short-term dynamics. Standard Transformer architectures, with fixed attention windows and static positional encodings, are therefore unable to adapt to such variations. In this work, we propose a regime-aware dynamic windowing framework that incorporates market regime information directly into the Transformer. We construct four generic regime signals from price series: volatility ratio, trend strength, local predictability ratio (LPR), and rolling autocorrelation. We incorporate these signals into the model through two mechanisms: (i) regime-augmented inputs to a standard Transformer architecture, and (ii) a modified attention layer that modulates attention weights using regime embeddings. Experiments on five S&P 500 stocks show consistent improvements across five evaluation metrics, demonstrating that regime-aware dynamic windowing enhances both interpretability and predictive performance in financial forecasting tasks.
Create a lesson
Related papers
From powder to part: influence of virgin and recovered Inconel 625 powders on the DED-LP processability, microstructure and mechanical properties
Romain Deloffre, Lorène Héraud, Julie Lartigau
Piezoelectric Energy Harvesting from a Pitch-Plunge Aerofoil in Compressible Flow, the Euler Full-Order Model, Strip Theory and the Reduced Models Compared
Nikolaos D. Tantaroudas, Ilias Karachalios, Andrew J. McCracken
A Bayesian Model Updating Framework for Systems Under Hybrid Uncertainties via Probability Integral Transform and Maximum Mean Discrepancy
Shijie Zhong, Jiangfeng Fu
The Exact Approximation Ratio of Uniformly Rotated Coordinate-wise Median in the Euclidean Plane
Song Zichen
Research on the Price Prediction Algorithms of Major Cryptocurrencies and a Basic Transaction Framework
Shengjian Chen
Quantum Block Encodings for Periodic Two-Phase Finite Element Operators: 2D Poisson and 2D Elasticity
Krishnan Suresh