Two-Stage Architecture
V2 is a stacked model: an unsupervised regime detector feeds a supervised classifier.
Stage 1 — HMM (Hidden Markov Model)
Identifies today's directional regime from market data: Bull / Sideways / Stress.
Outputs posterior probabilities P(Bull), P(Sideways), P(Stress) given features through today's close.
Unsupervised — learned regime structure from historical SPY/VIX/yield dynamics.
Stage 2 — LightGBM (Gradient-Boosted Decision Trees)
Predicts tomorrow's regime class given today's HMM posteriors PLUS 22 engineered features
(VIX level/change, RSI series rsi_2/rsi_5/rsi_14, momentum, yield-curve indicators, etc.).
Supervised — trained on labeled historical next-day regime outcomes.
Stage 2 — Output Classes
Four-class softmax over tomorrow's predicted regime
Bull
Tomorrow expected to be a directional up day; standard long bias
Extreme_Bull
Tomorrow expected to be a strong up day; high-conviction long
Sideways
Tomorrow expected to be range-bound or low-conviction; defensive bias
Stress
Tomorrow expected to be a down day; reduce or invert exposure
Why Two Stages
HMM extracts the latent regime structure that raw features alone don't expose cleanly. Feeding HMM posteriors into LightGBM combines regime context with feature-level nuance, producing better next-day predictions than either stage alone.
Phase 4 validation: V2_WF (V2 standalone, walk-forward 2025Apr) = +1.146 Sharpe.
V3_def baseline (no V2) underperforms on the same 15 gold windows.
V2's HMM-conditioned features are what enable the supervised stage's edge.
How V2 Feeds Into P3 Routing
V2's class becomes the allocation when K3 doesn't override
V2 = Bull / Extreme_Bull → SSO (2x long)
V2 = Sideways → SPY (1x defensive)
V2 = Stress → SDS (2x inverse)
BUT: K3 overrides V2 when K3 ∈ {Sideways, Stress, Extreme_Stress}.
See K3 popup → "P3 Routing After K3" section for full hierarchy.