Understanding Markov Chains
States, transitions, and why the market's next move depends mostly on where it is now.
A Markov chain is one of the most useful ideas in all of quantitative finance, and the core of it fits in a single sentence: what happens next depends only on where you are right now, not on the whole history of how you got here. That "memoryless" assumption sounds limiting, but it's a remarkably good model for how markets move between states.
States and Transitions
A Markov chain has two pieces:
- States: the distinct situations the system can be in.
- Transition probabilities: the odds of moving from one state to another next step.
For markets, the states might be regimes: a Bull market, a Bear market, or a Flat/choppy market. Each period, the market either stays put or transitions to another regime with some probability.
The Transition Matrix
The whole model is a grid of probabilities: each row says "given I'm in this state today, here's where I go tomorrow." Rows must add to 100%.
| From ↓ / To → | Bull | Flat | Bear |
|---|---|---|---|
| Bull | 85% | 10% | 5% |
| Flat | 30% | 50% | 20% |
| Bear | 15% | 25% | 60% |
Read the top row: if the market is in a Bull regime today, there's an 85% chance it's still Bull tomorrow, 10% it goes Flat, 5% it flips to Bear. Notice the persistence on the diagonal: regimes tend to stick around. That clustering ("volatility comes in clusters") is exactly what real markets show.
Working an Example
Suppose today is Flat. What's the chance we're in a Bull market two steps from now? You follow every path and add up the probabilities:
Flat→Flat→Bull: 0.50 × 0.30 = 0.150
Flat→Bear→Bull: 0.20 × 0.15 = 0.030
Total ≈ 0.435 (43.5%)
That's the power of the model: from one simple grid you can forecast the probability of any future state, any number of steps out. (In practice you multiply the matrix by itself, but the logic is just "sum over all the paths.")
The Long Run: Steady State
Run the chain forward long enough and the starting point stops mattering: the probabilities settle into a steady-state distribution. For the matrix above it works out to roughly 60% Bull, 24% Flat, 16% Bear. That's the model's view of how much time the market spends in each regime over the long haul, a useful sanity check on your own assumptions.
Where Markov Chains Show Up
- Regime-switching models: quant funds model Bull/Bear/crisis states exactly this way.
- Credit ratings: the odds a bond moves from AA to A to default are a transition matrix.
- Algorithmic trading: hidden Markov models infer the unseen regime driving prices.
- Even our own game: the Invisible Hand spreads influence sector-to-sector by transition-like rules.