Regime Monitor

Hidden Markov Model (GaussianHMM) with 3 states and 4 emission features (log-return, realized volatility, volume ratio, ATR percentile). Retrained weekly on rolling 252-day window. Signal gate: only the correct signal type is allowed to fire in each regime.

BULL

▲ BULL

Positive drift, low-medium volatility, normal volume.

Only BUY signals allowed.

BEAR

▼ BEAR

Negative drift, high volatility, elevated volume (panic).

Only SELL signals allowed.

SIDEWAYS

— SIDEWAYS

Near-zero drift, low volatility, low volume.

Only STRONG signals pass. Position size halved.

Regime → Signal Filter Rules

BULL
✅ BUY — pass (any strength)
❌ SELL — blocked
📏 Position size: 100%
BEAR
❌ BUY — blocked
✅ SELL — pass (any strength)
📏 Position size: 100%
SIDEWAYS
✅ STRONG only — pass
❌ MODERATE / WEAK — blocked
📏 Position size: 50%

HMM Technical Details

Model: GaussianHMM — hmmlearn library, covariance_type='full'

States: 3 (labeled by mean log-return: lowest=BEAR, middle=SIDEWAYS, highest=BULL)

Emission features (4): daily log-return, realized volatility (20d), volume ratio, ATR percentile rank (90d)

Training: Rolling 252-day window of daily data, retrained weekly (Sundays)

Inference: Viterbi decoding — most likely hidden state sequence

Why 4 features? Bull and Sideways both have low volatility — adding volume ratio and ATR percentile allows the model to discriminate between them.

Note: Current regime data is displayed on the Live Signals page (regime tag on each signal card). Full state probability time-series will be available in Phase 2 with real-time charting.