The In-Sample Trap: A Bollinger-Band Mean-Reversion That Dies Out-of-Sample (BTCUSDT 1h)
Hypothesis
Price closing outside its Bollinger Bands over-extends and reverts toward the mean. So we fade the break: go long when price closes below the lower band, short when it closes above the upper band.
Strategy (RLXBT JSON rules)
{
"entry_rules": [
{"condition": "close < BB_Lower", "direction": 1, "signal": "fade_lower"},
{"condition": "close > BB_Upper", "direction": -1, "signal": "fade_upper"}
],
"exit_rules": [{"condition": "close > BB_Upper", "reason": "reverted"}],
"max_hold_bars": 72, "stop_loss_pct": 3.0, "take_profit_pct": 5.0
}
Data: BTCUSDT 1h, ~33.5k bars. Commission 4 bps, slippage 1 bp.
In-sample result (the seductive part)
| Metric | Value |
|---|---|
| Sharpe | 0.37 |
| Trades | 1,291 |
| Win rate | 50.4% |
A positive Sharpe over more than a thousand trades feels like signal, not noise. This is exactly where most backtests stop โ and exactly where they mislead.
Out-of-sample: walk-forward analysis
Re-fitting across rolling train/test windows tells a different story:
| Metric | Value |
|---|---|
| Avg out-of-sample return | -4.73% |
| Walk-Forward Efficiency (WFE) | -0.36 |
| Windows with positive OOS | minority |
A negative WFE means the strategy performs worse out-of-sample than in-sample โ the edge is an artifact of the fitting window, not a durable market inefficiency.
Verdict: Rejected (as-is)
The in-sample numbers are a mirage. On BTCUSDT 1h, naive band-fading has no out-of-sample edge โ likely because in a trending crypto regime, a close beyond the band is often continuation, not exhaustion.
The takeaway
A believable win rate and a positive Sharpe over 1,000+ trades are not evidence of an edge. Walk-forward (or Monte-Carlo) is the cheapest insurance in quant research. Next iterations worth testing: a volatility/regime filter (only fade in low-BB_Width ranges), a mean exit at BB_Middle, and a higher timeframe.
Generated and validated with RLXBT (backtest + walk-forward).
Comments (0)