Hidden Markov regimes
Inferring unobserved market states from what can be observed.
Overview
A hidden Markov model assumes the market switches between a few unobserved states, each with its own behaviour, and infers from returns which state is most likely now and how often states change.
How it is built
- 1
Choose the number of states and what each emits (return, volatility).
- 2
Fit transition probabilities and state behaviour on history.
- 3
Compute the probability of each state at every bar.
How to read it
- State probabilities change gradually; a flip in the most likely state is a slow signal.

