Markov Regime Switching: Plain English, Real Backtests
A model that sounds like quant gatekeeping reduces to one idea — markets behave differently depending on which state they're in right now — and our data shows it ranks as a top-5 stock indicator.
What Regime Switching Actually Means
Markets don't behave the same way all the time. Sometimes a trend carries for weeks. Other times, prices chop sideways and the same trend-following system bleeds you dry. Regime switching is just the formal name for that observation: the market is in one state right now, and that state changes.
A Markov Regime model tries to estimate which state you're in at any given moment. It doesn't predict the future directly. It says: given today's price behavior, here is the probability we're in a trending regime versus a mean-reverting one. That probability then filters which signals you act on — or whether you act at all.
Where the 'Markov' Part Comes In
The Markov property is simple: the next state depends only on the current state, not on the full history. If the market is in a low-volatility trending regime today, the probability of being in that same regime tomorrow is determined by today alone — not by what happened three months ago.
That's a deliberate simplification. Real markets have memory in some ways. But the simplification makes the model tractable: you can estimate transition probabilities, fit them to historical data, and get an interpretable output without stacking hundreds of parameters onto a short price history.
In practice, most implementations you'll encounter use a two-state model: a low-volatility state and a high-volatility state, or a bull state and a bear state. The model outputs a probability of being in each state, updated bar by bar as new data arrives.
What the Backtests Show
We ran 660,005 out-of-sample backtests across 903 assets — stocks, forex, commodities, ETFs, crypto, and indices — on the 1-Hour, 4-Hour, Daily, and Weekly timeframes, testing 382 indicators including Markov Regime. Across all assets, 63% had at least one indicator that beat buy-and-hold after realistic transaction costs.
Within the stock universe specifically, Markov Regime ranked as a top-5 indicator, emerging as the best-performing indicator on 14 individual stocks. That's a meaningful result. Most of the 382 indicators tested cluster toward the middle of the distribution. Reaching the top-5 means it outperformed hundreds of alternatives — including popular standards like RSI, MACD, and Bollinger Bands — on those specific assets.
The edge was not uniform across all asset classes. In forex, the Fisher Transform dominated by a wide margin. Crypto was led by trend-following and pivot-based indicators. Commodities went to Keltner Mean-Reversion. Markov Regime's advantage in our tests was concentrated in equities, which fits the intuition: stock markets have identifiable macro-driven regime cycles — earnings seasons, rate cycles, risk-on/risk-off — that other asset classes express differently or less cleanly.
Is This Just Curve-Fitting?
That's the right question, and the backtest design addresses it directly. All results are out-of-sample — the model's parameters were estimated on a training period and performance was measured on a forward period the model never saw. Curve-fitting is most dangerous when you optimize dozens of free parameters on the same data you measure performance on. A two-state Markov model estimates a compact set of regime properties from data structure rather than by sweeping through arbitrary threshold combinations.
There's also a cross-asset plausibility check. If these results were pure overfit, you'd expect Markov Regime to appear dominant across many asset classes. Overfit indicators tend to rank near the top everywhere in training and fail everywhere out-of-sample. Here, the performance is concentrated in equities, where there's a principled reason to expect regime detection to add signal.
That said, nothing in these results is a guarantee. A regime model calibrated on one era of volatility can degrade when the market enters a state it hasn't seen before. These are hypothetical backtests run on historical data, not a promise of future returns.
How to Use It Without a PhD
You don't need to implement a Hidden Markov Model from scratch. The practical use case is as a filter, not a standalone signal: when the model outputs a high probability of trending regime, bias toward momentum setups; when it signals mean-reverting conditions, lean on oscillators or reduce exposure.
A few common failure modes to avoid. Don't treat regime state as a binary on/off switch for large position changes — the probability output is fuzzy and flips can be noisy near transition boundaries. Don't retrain the model on fresh data every session; that reintroduces look-ahead and defeats out-of-sample integrity. And don't assume the same two-state setup that worked on one asset transfers to another without testing. The 14 stocks where Markov Regime ranked first aren't the same 14 you'll happen to be trading — check your specific asset's results before applying any configuration to real capital.
Questions, answered
Are these real trading results?
No. Every result published on IndicatorEdge is a <strong>hypothetical backtest</strong> run on historical data with realistic transaction costs applied. Backtests cannot account for slippage in illiquid conditions, execution latency, broker-specific fills, or future market regimes that differ structurally from the tested period. Nothing here is financial advice. Past backtest performance does not predict live trading returns.
Does Markov Regime work on crypto or forex?
In our data, it did not rank as a top indicator in either class. Crypto was led by trend-following and pivot-based indicators. Forex was dominated by the Fisher Transform across a large number of pairs. Markov Regime's edge in our 660,005 backtests was concentrated in equities. That's useful information: it tells you where to look and where not to over-apply it.
How many states should the model use?
Most practical implementations use two states, and that's where the theoretical grounding is strongest. Three states can capture a 'transition' or 'crash' regime explicitly, which sometimes improves fit on equity indices. Beyond three, you're likely overfitting unless you have an unusually long price history. Start with two states and only add a third if it improves held-out metrics on a period the model was not trained on.
Is Markov Regime better than RSI or MACD for stocks?
On the 14 stocks where it ranked first in our tests, it outperformed every other indicator we tested — including RSI, MACD, and the other 380-plus alternatives in our library. But 'better' is always asset-specific. The <a href="/assets">asset pages</a> show the top indicator for each ticker so you can check what actually won on whatever you trade, rather than applying a class-level generalization.
Every figure here comes from our own out-of-sample backtests, costs included — not a course or a guess. Educational information only — not investment advice. Hypothetical backtested results; past performance does not guarantee future results. Trading involves risk of loss.
Keep reading
Get the weekly edge report
The best-performing indicator per asset, what changed this week, and the honest caveats — straight to your inbox.