Learn · The manual
Lesson 14 · 9 min read

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 Markov Property: tomorrow's regime depends only on today's regime. The chain has no memory of last month. Simplistic? Yes. Useful? Enormously, and often surprisingly accurate.

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 →BullFlatBear
Bull85%10%5%
Flat30%50%20%
Bear15%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→Bull→Bull: 0.30 × 0.85 = 0.255
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.

Why this matters for you: regime thinking changes how you size risk. If you can estimate the odds you're in (or heading toward) a Bear regime, you lean more defensive: lower beta, more diversification. The Markov view says: don't predict the exact future, just respect the transition probabilities from where you stand today.

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.
Know the limit: real markets aren't perfectly memoryless, and the "true" transition probabilities drift over time. A Markov chain is a lens, not a crystal ball, but it's one of the sharpest lenses for thinking clearly about uncertainty and regimes.