Level 4
12 min readLesson 24 of 43

Regime Filtering: Context Is Everything

Why your strategy only works sometimes

The Strategy That Only Works Sometimes

You've found an edge. Backtest shows 65% win rate over three years. Great, right?

Then you look closer. In 2021 bull market: 75% win rate. In 2022 bear market: 48% win rate. The "edge" wasn't an edge at all—it was just riding a trend.

This is why regime filtering matters. Market context changes everything. A strategy that prints money in a trending market might hemorrhage in a range. A mean-reversion edge that works in calm conditions might get destroyed in volatile ones.

If you deploy strategies without understanding their regime dependencies, you're gambling on market conditions staying favorable.

What Are Market Regimes?

A regime is a distinct market state with consistent characteristics. Common regime categories:

Trend Regimes

  • Bull (strong uptrend): Higher highs, higher lows, buy the dip works
  • Bear (strong downtrend): Lower highs, lower lows, sell the rally works
  • Neutral (no clear trend): Price oscillates without direction

Volatility Regimes

  • Low volatility: Small daily moves, mean reversion works well
  • High volatility: Large swings, trend-following works better
  • Transitioning: Volatility regime changing, signals unreliable

Market Structure Regimes

  • Trending: Clear directional movement
  • Ranging: Price bouncing between support/resistance
  • Choppy: No clear structure, frequent reversals

A single market can be in multiple regime categories simultaneously: "High volatility bull trend" or "Low volatility range."

Identifying Regimes

How do you know what regime you're in? Several approaches:

Moving Average Methods

  • Price above 200-day MA = bull regime
  • Price below 200-day MA = bear regime
  • Slope of MA indicates trend strength
  • Simple but effective

Volatility Metrics

  • ATR (Average True Range) percentile
  • Realized volatility vs historical average
  • High = volatile regime, Low = calm regime

Price Structure

  • Sequence of higher highs/higher lows = uptrend
  • Sequence of lower highs/lower lows = downtrend
  • No clear sequence = range/chop

Correlation Analysis

  • BTC-altcoin correlation high = risk-on/risk-off regime
  • Correlation breaking down = divergence regime

Machine Learning Approaches

  • Hidden Markov Models for regime detection
  • Clustering algorithms on price features
  • More sophisticated but harder to interpret

We typically use simple methods. Price relative to major MAs combined with volatility percentile captures most regime information without overcomplicating.

Why Different Edges Work in Different Regimes

Market microstructure explains why strategies are regime-dependent:

Mean Reversion in Ranges When price is ranging, deviations from the mean get corrected. Extremes attract counter-pressure. Mean-reversion strategies profit.

But in strong trends, "oversold" just means "cheap and getting cheaper." Mean-reversion signals become traps.

Trend Following in Trends Strong trends develop momentum. Breakouts lead to follow-through. Trend strategies profit.

But in ranges, breakouts get faded. Momentum signals whipsaw. Trend strategies lose on false signals.

Volatility Strategies High volatility amplifies moves. Wide stops needed, bigger targets possible.

Low volatility means tight ranges. Strategies need smaller targets, tighter stops.

The same indicator reading can mean opposite things in different regimes. "Oversold" in a bull trend is a buying opportunity. "Oversold" in a bear trend is a warning it's about to get worse.

Regime-Specific Edges

Here's a key insight: you don't need universal edges. Regime-specific edges are perfectly valid—often more robust than "works everywhere" claims.

Consider these as separate edges:

Bull Market Edge

  • Signal: Funding rate drops below -1.5 z-score
  • Regime filter: BTC above 200-day MA
  • Logic: In bull markets, negative funding = oversold dip-buying opportunity

Bear Market Edge

  • Signal: Funding rate rises above +2.0 z-score
  • Regime filter: BTC below 200-day MA
  • Logic: In bear markets, high funding = overleveraged longs about to get liquidated

Same indicator, opposite signals, different regimes. Both can be valid edges in their respective contexts.

Filtering Signals by Regime

Implementation involves two steps:

  1. Regime Classification: At each timestamp, determine current regime(s)
  2. Signal Filtering: Only accept signals when the required regime is active

In your discovery pipeline, you might test:

  • Edge without regime filter (baseline)
  • Edge in bull regime only
  • Edge in bear regime only
  • Edge in high vol only
  • Edge in low vol only

You'll often find that an edge that's mediocre overall becomes excellent when filtered to appropriate regimes.

Example from our system: A certain open interest divergence signal shows 55% win rate overall. Filter to "high volatility bear regime" and it jumps to 72% win rate with better profit factor. The unfiltered version was diluted by signals in wrong contexts.

Dynamic Regime Detection

For live trading, you need real-time regime classification. This creates challenges:

Regime Transitions Regimes don't change instantly. The transition from bull to bear happens over time. How do you trade during transitions?

Approach 1: Require regime confirmation (regime must be stable for X days) Approach 2: Reduce position size during transitions Approach 3: Only trade edges that work in both regimes

Regime Lag Most regime indicators lag. By the time the 200-day MA confirms a bear market, the move is partly done.

Approach 1: Accept the lag—some missed opportunities is better than wrong-regime trades Approach 2: Use faster indicators with more noise Approach 3: Multiple timeframe confirmation

False Regime Signals Sometimes what looks like a regime change reverses quickly. "Bear market confirmed" followed by new highs.

Approach 1: Require sustained regime signals Approach 2: Accept some false signals as cost of doing business Approach 3: Regime confidence scoring (not binary but probability)

Practical Implementation

Our regime system uses:

  1. Trend Regime: Price vs 200-period MA on 4h candles

    • Bull: Price > MA AND MA slope > 0
    • Bear: Price < MA AND MA slope < 0
    • Neutral: Otherwise
  2. Volatility Regime: ATR percentile over 90 days

    • High: ATR > 70th percentile
    • Low: ATR < 30th percentile
    • Normal: Between
  3. Combined Regime: Cartesian product

    • "High Vol Bull", "Low Vol Bear", etc.

During edge discovery, we test performance in each combined regime. Edges get labeled with their valid regimes.

During live trading, we check current regime before accepting signals. Signal only fires if regime matches.

The Regime-Aware Backtest

When backtesting, always analyze performance by regime:

RegimeWin RateProfit FactorSignalsSharpe
Bull High Vol71%3.21452.1
Bull Low Vol58%1.42030.8
Bear High Vol68%2.81121.9
Bear Low Vol45%0.7189-0.3

This table tells you immediately: this edge only works in high volatility conditions. Deploy it without the volatility filter and you'll suffer in low-vol periods.

Regime analysis transforms vague "works sometimes" into precise "works in these specific conditions."

Key Takeaways

  1. Different strategies work in different market conditions—this is fundamental, not a flaw
  2. Classify regimes using simple methods: trend (price vs MA) and volatility (ATR percentile)
  3. Test edges within regimes, not just overall
  4. Filter signals by requiring appropriate regime conditions
  5. Accept that regime-specific edges are valid—you don't need strategies that work everywhere
  6. Regime transitions require careful handling in live trading

Context is everything. The same signal means different things in different regimes. Building regime awareness into your discovery and trading systems separates professionals from amateurs guessing at market conditions.