Dynamic-Flooding Transformer Ensembles for Reinforcement-Learning-Based Equity Market Timing
Abstract
Accurate directional forecasting of equity time series is challenging due to small-sample bottlenecks, regime-dependent non-stationarity, and dominant idiosyncratic noise. This paper presents a coordinated quantitative framework addressing these difficulties. First, causal Transformer classifiers operate over 78 features grouped into five feature groups to mitigate dimensionality constraints. Second, a novel Dynamic Flooding regularizer adaptively calibrates the training–validation/test generalization gap to remain robust under regime drift. Third, binary classifiers integrated with a Dynamic Ensemble Selection (DES) scheme minimize idiosyncratic noise. Finally, a signal-conditioned Double Deep Q-Network (DDQN) execution layer translates forecasts into trading actions. The integrated system is termed the Dynamic Ensemble Selection Q-network (DESQ). Over a strictly out-of-sample window (2024-01-02 to 2026-03-31), the framework delivers after-cost cumulative returns of 202.5% for Taiwan Semiconductor Manufacturing Company (TSMC, 2330.TT) and 101.2% for MediaTek (2454.TT), versus 201.82% and 62.69% under buy-and-hold, respectively. A capital-weighted Taiwan Top-50 portfolio outperforms the TAIEX benchmark by 40.93 percentage points (129.0% vs. 88.07%). Robustness is demonstrated via cross-market validation on the Dow 30, S&P 100, and NASDAQ 100, outperforming reference indices by 47.5, 43.8, and 44.8 percentage points of excess return while securing top ranks in cumulative return, Sharpe, and Calmar ratios. This framework offers a scalable and adaptive engineering blueprint for automated market timing across diverse equity markets.