← Back to Research
Feature Engineering8 min readOctober 5, 2024

Hurst Exponent for Market Regime Classification

Using Hurst exponent to detect trending vs mean-reverting regimes and adapt strategy parameters accordingly.

HurstRegime DetectionTime Series

What is the Hurst Exponent?

The Hurst exponent (H) measures the long-term memory of a time series. Originally developed by Harold Hurst for Nile river flood analysis, it has become a standard tool in quantitative finance for regime detection.

H > 0.5: Trending (persistent) behavior. Future returns tend to follow past returns
H = 0.5: Random walk. No predictable pattern
H < 0.5: Mean-reverting (anti-persistent) behavior. Future returns tend to reverse past returns

For trading systems, this distinction is critical. A momentum strategy performs well when H > 0.5 but gets destroyed when H < 0.5. Conversely, mean-reversion strategies work when H < 0.5 but fail during strong trends.

The R/S Method

I use the Rescaled Range (R/S) method for Hurst estimation. The algorithm:

1.Take a window of N log-returns
2.Compute the mean and standard deviation
3.Calculate cumulative deviations from the mean
4.R = max(cumulative) - min(cumulative)
5.S = standard deviation
6.Compute R/S for different sub-window sizes
7.H = slope of log(R/S) vs log(window size)

The R/S method is computationally simple and robust to non-Gaussian distributions, which is important for financial returns (they have fat tails).

Practical Settings for V7

After extensive testing, these are the parameters I settled on:

Calculation window: 200 M15 bars (approximately 3 trading days)
Input: Log returns of close prices
Sub-windows: [20, 40, 60, 80, 100, 150, 200]
Update frequency: Every bar
Smoothing: 5-bar EMA on raw Hurst values (reduces noise without adding too much lag)

Why 200 bars? Shorter windows (50-100) produced Hurst estimates that changed too rapidly, flipping between trending and mean-reverting multiple times per day. Longer windows (500+) were too slow to detect regime transitions. 200 bars captured regime shifts within 2-4 hours of actual transition.

How V7 Uses Hurst

Hurst serves two purposes in V7:

1. L1 Feature Input

Hurst is one of the 38 features fed to the L1 XGBoost models. The models learn regime-conditional patterns automatically. For example, certain candlestick patterns are only predictive when H > 0.55 (trending market).

2. L3 Exit Giveback Rules

This is where Hurst has the biggest practical impact. The exit management layer uses Hurst to set the giveback percentage. How much unrealized profit you are willing to give back before closing a trade.

H > 0.55 (trending): 35% giveback. Let winners run because trends tend to continue
H < 0.45 (mean-reverting): 25% giveback. Take profits quicker because the move is likely to reverse
0.45 to 0.55 (neutral): 30% giveback. Default setting

This 10% difference in giveback may seem small, but across 4,505 trades it has a significant impact on total R captured.

Common Pitfalls

Using raw prices instead of returns: Hurst exponent on price levels gives you approximately 1.0 because prices are non-stationary. You need to use log returns.

Too-short windows: Windows under 100 bars produce noisy estimates. The Hurst exponent needs enough data to distinguish signal from noise.

Not smoothing: Raw Hurst values jump around. A short EMA (3-5 bars) cleans this up without adding meaningful lag.

Over-relying on Hurst alone: Hurst tells you trending vs mean-reverting but nothing about volatility or momentum strength. I combine it with K-Means clustering (S09) and ADX for a complete regime picture.

Static thresholds: My 0.55/0.45 thresholds work for V7's M15 timeframe. Different timeframes need different thresholds. Daily bars show less variation in Hurst than 1-minute bars.

Validation

To validate that Hurst-based regime detection actually improves trading performance, I ran an A/B test:

System A: Fixed 30% giveback regardless of regime
System B: Hurst-adaptive giveback (25%/30%/35%)

Over the 7.5-year backtest period:

System A: 532.1R total
System B: 533.9R total

The difference is modest (+1.8R) but System B also showed lower maximum drawdown (1.49% vs 1.67%) and more consistent monthly returns. The value of regime-adaptive exits shows up more in risk reduction than return enhancement.

Bottom Line

Hurst exponent is one of the simplest regime detection tools you can add to a trading system. It requires minimal computation, provides clear actionable output (trend/revert), and integrates easily with existing strategy logic.

Start with R/S method, 200-bar window, and the three-tier threshold system. Fine-tune from there based on your specific timeframe and asset class.

Where the Value Actually Is

The A/B test results are revealing. Hurst-adaptive exits only added +1.8R over 7.5 years in raw returns. The temptation is to highlight the drawdown improvement and downplay the modest return difference. But honesty matters: the feature adds value primarily as risk reduction, not return enhancement. Being precise about WHERE the value comes from prevents you from over-attributing edge to components that are good but not magical. Honest accounting of each module's contribution is how you build a system you can actually trust.