← Research logOn-Chain & Macro
KILLED · overfit
#

A 3-state Gaussian HMM on returns recovers latent bull / chop / bear regimes; conditioning exposure on the most-likely state improves return.

Emissions are state-conditional Gaussians; states evolve by a transition matrix $A$:

$$ P(r_t\mid s_t=i)=\mathcal{N}(\mu_i,\sigma_i^2),\qquad A_{ij}=P(s_t=j\mid s_{t-1}=i) $$

Fit by Baum–Welch (EM); decode the state path by Viterbi.

Fit 3-state HMM on rolling returns, go long only in the inferred high-mean state. Walk-forward, costs applied.

In-sample regime separationclean
Out-of-sample state stabilityflickers
Walk-forward Sharpe0.1
State relabeling across refitsfrequent
KILLED
In-sample the states look beautiful; out-of-sample they flicker and relabel on every refit, so the "regime" you trade is mostly fitting noise. The HMM finds structure in any series, including random walks. Killed.
Latent-state models will always find states. The test is whether the decoded states are stable out-of-sample under refitting — usually they are not.

We publish the failures too.

This is one of 100+ documented hypotheses. Browse the full lab notebook, or see the strategies that survived into production.