RC-Mamba: regime-conditioned selective state-space models for probabilistic time-series forecasting
TL;DR
RC-Mamba is introduced, a probabilistic forecaster whose selective-SSM backbone is dynamically conditioned on the posterior over a latent regime variable and achieves a mean Continuous Ranked Probability Score of 0.00532, improving on the Vanilla Temporal Fusion Transformer.
Abstract
Selective state-space models (SSMs) such as Mamba achieve linear-time sequence modeling through input-dependent recurrence, yet they apply the same dynamics regardless of the latent regime generating the data—a structural mismatch for non-stationary signals whose statistics shift abruptly between regimes. We introduce RC-Mamba, a probabilistic forecaster whose selective-SSM backbone is dynamically conditioned on the posterior over a latent regime variable. Regime posteriors from a Student-t emission Hidden Markov Model with a sticky Dirichlet prior modulate the SSM discretisation step Δt together with the input and readout matrices Bt and Ct, so the recurrence adapts its memory decay, input sensitivity, and output emphasis to the prevailing market state. An entropy-based scale-modulation component, the Regime Uncertainty Gate, is evaluated as a route from posterior sharpness to interval width, but matched controls do not identify a performance gain for it over posterior-independent scaling. A hierarchical Feature-wise Linear Modulation (FiLM) embedding captures asset-specific and sector-level structure without an explicit asset-class prediction objective. Evaluated on 18 US-listed ETFs spanning five asset classes under five calendar-aligned expanding-window walk-forward folds (test years 2021–2025), RC-Mamba achieves a mean Continuous Ranked Probability Score (CRPS) of 0.00532, improving on the Vanilla Temporal Fusion Transformer by 4.7 %, DeepAR by 8.9 %, S-Mamba by 15.2 %, and an HMM-conditioned DeepAR by 18.5 %. All models share robust-MAD preprocessing, a common ceiling of 11,450 optimizer updates with validation-based early stopping, and a 30-business-day origin embargo equal to the maximum forecast horizon, so neither preprocessing nor training budget confounds the architectural comparison. Significance is assessed on 1,110 synchronized forecast origins using a moving-block bootstrap that respects serial and cross-sectional dependence rather than treating overlapping horizons as independent; every comparison remains significant after Holm correction (pHolm = 0.006). RC-Mamba also attains the best Winkler80 score (0.0364) with PICP80 = 0.781 and PINAW80 = 0.024, and recovers three interpretable regimes (Calm, Transition, Stress) that assign every one of the 25 observed April 2025 trading days to the Stress state. Matched single-fold ablations show that removing regime conditioning degrades CRPS by 2.05 % in the most volatile test year, although several component contrasts change sign across folds and are therefore reported as design trade-offs rather than identified causal effects. A one-day-lagged long-only backtest over 1,255 out-of-sample trading days returns 8.89 % annualized against 6.56 % for an equal-weight benchmark, but its annualized alpha of 1.18 % is not statistically significant (p = 0.506) and remains insignificant under 1–10 basis-point costs; the economic evidence is therefore suggestive rather than conclusive. Transfer to non-financial domains is left to future work.