Why Price Action Alone Is Not Enough

Bitcoin does not behave the same way in every market environment. A 3% daily move means something completely different during a quiet accumulation phase than it does during a panic selloff. Technical indicators like RSI or MACD attempt to capture this nuance but are ultimately derived from the same price data they try to interpret — they tell you what has happened, not what statistical regime the market is currently operating in.

A Hidden Markov Model takes a fundamentally different approach. Rather than describing price movements, it asks: given the sequence of returns we have observed, what is the most probable underlying market state — and how confident are we? The model treats the market regime as a hidden variable that drives the observable returns, rather than the other way around.

What Is a Hidden Markov Model?

A Hidden Markov Model is a statistical framework originally developed for speech recognition and later applied across fields from genomics to finance. The core idea is that a system moves through a series of hidden states, and in each state it produces observable outputs according to a state-specific probability distribution. The states are hidden because you cannot observe them directly — you can only infer them from the outputs.

For Bitcoin, the hidden states are the four market regimes. The observable outputs are the hourly log-returns of the Bitcoin price. The model learns from historical data that different regimes produce different characteristic return distributions — a bull market looks statistically different from a crash, and the model quantifies exactly how different.

Key insight: The HMM does not classify a regime based on any single candle or any price threshold. It classifies based on the shape of the return distribution — the mean, the volatility, and how consistent those have been over the lookback window. This makes it far more robust to noise than indicator-based approaches.

The Four Market Regimes

BTCMonitors uses a 4-state Gaussian HMM. Each state has a Gaussian emission distribution with a learned mean (μ) and standard deviation (σ). The four states and their characteristic parameters:

  • Low Vol Bull — Positive mean hourly return, low σ. Trending upward with consistent, non-erratic movement. The most tradeable regime.
  • Low Vol Bear — Negative mean hourly return, low σ. Slow, consistent selling pressure. The "slow bleed" regime.
  • High Vol Bear — Negative mean hourly return, high σ. Crash conditions. Large negative returns with extreme intraday swings.
  • Transition — Near-zero mean, moderate σ. The market is genuinely uncertain — mixed bullish and bearish signals with no statistically dominant direction.

These parameters are not manually set — they are learned from Bitcoin's complete price history using the Baum-Welch algorithm, an iterative Expectation-Maximisation method that finds the parameters which best explain the observed return sequence.

How the Model Is Trained: Baum-Welch

The Baum-Welch algorithm trains the HMM by solving three interlinked problems simultaneously: what is the probability of transitioning between any two states, what is each state's emission distribution, and what is the starting probability of each state. The algorithm iterates through an Expectation step (computing the probability that each data point belongs to each state) and a Maximisation step (updating parameters to maximise those probabilities) until convergence.

The result is a trained model with three core parameter sets:

  • Emission parameters (μ, σ): The mean and standard deviation of the Gaussian return distribution for each of the four states.
  • Transition matrix (A): A 4×4 matrix where A[i][j] is the probability of transitioning from state i to state j on any given hour.
  • Initial state distribution (π): The probability of starting in each state at the beginning of a sequence.
Gaussian emission: P(r | state k) = (1 / σₖ√2π) · exp(−(r − μₖ)² / 2σₖ²) Transition: P(Sₜ = j | Sₜ₋₁ = i) = A[i][j]

Real-Time Classification: Forward Algorithm

Once trained, the model classifies the current regime in real time using the Forward Algorithm. Rather than labelling a single state, the Forward Algorithm computes the full probability distribution across all four states given the most recent sequence of returns. This is what produces the confidence percentages you see on the BTCMonitors dashboard.

For each new hourly candle, the algorithm updates these probabilities by combining the previous state distribution with the transition matrix and the likelihood of the new return under each state's emission distribution. This gives a Bayesian posterior probability for each state — a genuine probability, not a heuristic score.

The regime shown on the dashboard is always the state with the highest probability. The confidence percentage is that probability: a 91% confidence Low Vol Bull signal means the Forward Algorithm assigns 91% probability to the Bull state given all recent returns.

Best-Path Decoding: Viterbi Algorithm

While the Forward Algorithm gives per-state probabilities at each point in time, the Viterbi Algorithm finds the single most probable sequence of states across the entire lookback window — the optimal path through all possible regime combinations. BTCMonitors uses the Viterbi output for the regime history visualisation, ensuring the historical state sequence is globally consistent rather than being a series of independent per-hour classifications.

In practice, the two algorithms usually agree — but during genuine Transition periods, the Forward Algorithm's probability distribution across multiple states is more informative than a single Viterbi label, which is why both are used.

The Data: Hourly Returns, 7-Day Lookback

The model runs on hourly log-returns calculated from Bitcoin's price history sourced from the CoinGecko public API. BTCMonitors fetches the most recent 168 hourly data points (7 days) to compute the current regime classification. This window is long enough to distinguish genuine regimes from noise but short enough to detect regime shifts within hours of their occurrence.

The dashboard refreshes the classification every 30 seconds. On each refresh, new price data is fetched, the return sequence is updated, and the Forward Algorithm recomputes the state probabilities. When the highest-probability state changes, the regime indicator updates immediately.

How to Read the Dashboard

Understanding what each element on the BTCMonitors dashboard represents:

  • Regime label: The state with the highest Forward Algorithm probability right now.
  • Confidence %: The probability assigned to the current state. Values above 80% indicate a statistically dominant regime with high conviction. Values below 65% — especially during Transition periods — indicate genuine uncertainty.
  • Probability bars: The full distribution across all four states. When the bars are concentrated in one state, the model is certain. When spread across two or three states, the market is in a genuine regime boundary.
  • Regime age: How many hours the current state has been dominant. Longer regimes with sustained high confidence are more likely to persist than fresh regime entries.

A confidence score below 70% should be treated as a Transition signal regardless of which state is technically leading. The model is telling you it cannot confidently distinguish between two possible regimes — that is itself actionable information.

Beyond Bitcoin: Per-Coin Volatility Scaling

For the 29 altcoin dashboards accessible through the Markets menu, the same HMM framework applies but with per-coin volatility multipliers applied to the σ parameters. Ethereum uses a 1.2× multiplier, Solana 1.5×, DOGE 1.8×, and PEPE 3.0×, reflecting each asset's historical volatility relative to Bitcoin. These multipliers ensure the state boundaries are appropriately calibrated for each asset's actual return distribution rather than applying Bitcoin's parameters to structurally different markets.

Explore the current regime for any tracked asset using the 30 Crypto Prices menu in the navigation, or go directly to popular dashboards: Ethereum (ETH), Solana (SOL), XRP.