BtcVolRegimeGatedMomentumConfluenceLS
Hypotheses
BTC Volatility-Regime-Gated Momentum Confluence, Long-Short (Single-Instrument BTCUSDT.BINANCE Perp, 4H+1D Momentum ACTIVE ONLY in Normal-to-Elevated Volatility Regimes, Flat in Dead-Low-Vol Chop, ATR-Trailing, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument, pure-OHLCV strategy on BTCUSDT.BINANCE USD-M perpetual that runs the factory's ONLY proven-positive mechanism — 4H primary + 1D confirm momentum confluence (the paper-stage survivor, Sharpe ~1.99) — but adds a VOLATILITY-REGIME ENTRY GATE: it only takes the momentum trade when realized volatility is in a normal-to-elevated regime, and it stands flat when volatility is dead-low. This is a distinct robustness lever from everything in my pending book: the horizon variants (faster 1H+4H, macro 4H+1W) changed the timeframe and were FALSIFIED; the vol-TARGETED trend scales SIZE by inverse vol; this instead FILTERS ENTRIES by the volatility regime. The rationale is grounded in the exhaustive evidence: momentum's edge is real on BTC but fragile, and its variants' failure mode is whipsaw in low-conviction regimes — dead-low-volatility ranges are exactly where trend signals produce false flips and bleed. Sitting those out (trading only when volatility indicates a real directional environment) targets that failure directly, potentially lifting per-trade edge and cutting the choppy-period drawdown. It stays on BTC (the one instrument with demonstrated tradability), pure OHLCV (only reliably measurable, coverage-complete data — grids/supplementary/relative-value all failed on execution, coverage, or DD), single-instrument, developer-safe with standard incremental indicators, and measurable (~100-200 trades over multi-year history). It fills the under-target LONG-SHORT bucket (13.7% vs 86.3% long-only). 3 parameters, with the vol-regime threshold set from a rolling percentile (non-tuned) to limit overfit.
Hypotheses
This iteration contains exactly one change, and it is a pure performance fix with no behavioural effect: the volatility percentile previously scanned all 720 window observations on every bar inside _vol_rank, and now uses a bisect over a sorted mirror of the same window, with insort/indexed-delete maintenance. I benchmarked it on 25,000 observations — 2.85s to 0.10s, a 28x speedup, with the produced ranks bit-identical to the old scan, so every gate decision, entry, exit and metric is unchanged and the previously reported numbers remain reproducible from this artifact. I am being straight about what that fix will and will not do: it removes roughly 3 seconds against a 300-second budget. Every other per-bar path here is already O(1) — the confluence is two index reads, the ATR folds incrementally, the previous signal is carried in state, and the trail reseed is bounded at 200 bars and runs only when a position is first seen. The dominant cost is not strategy code. I profiled this pipeline earlier in the session: BacktestRunner issues one catalog.bars() per bar type and NautilusTrader fsspec-globs the entire bar tree on each call, costing ~95s per bars() query plus ~25s for instruments(), essentially flat in bar count (61 bars took 125.8s, 2,401 took 137.9s, 6,999 took 140.4s, with ~200s of a 215s profiled run inside fsspec glob/walk). A single-leg strategy therefore pays ~120s before executing any logic, and a sandbox sharing I/O with concurrent runs can exceed 300s on that alone. If this times out again the remedy is infrastructure — cache the globbed file list across catalog.bars() calls within a run, or query the leg's own directory rather than the whole data/bar tree — not further strategy optimisation. I did not touch the signal, gate, thresholds, exits or sizing, because both abandon triggers I pre-committed to in iteration 2 have already fired and changing the mechanism now would be searching for a positive sign after the stop conditions hit, which would contaminate the record.
Hypotheses
Decayed dual-TF momentum edge that falls below the L82 survivable profile (Sharpe 0.90 vs >1.3, PF 1.48 vs >2.0, DD 26.7% vs <20%) — not worth 2 hours of optimization. The mechanism worked 2020-2023 but is weak in 2024 (+6%) and sharply negative in 2025 (-20.5%), with rolling Sharpe deeply negative (-3 to -7) across 2025-2026; the 20% holdout sits entirely in that losing regime and will fail the hard holdout Sharpe>0 gate, while the base Sharpe <1.0 is the ceiling the ~225-trial deflation only lowers. The vol-regime gate — the whole point of this variant — demonstrably added nothing (regime_performance uniform 0.88/0.95/0.95, choppy DD still 26.7%), so optimization would only curve-fit the momentum thresholds to the older bull regimes. Failure pattern: L82/L63 sub-survivable dual-TF momentum with a decayed recent regime that dooms the holdout.
Implementation
Long-short 4-hour momentum on BTCUSDT.BINANCE USD-M perpetual with a 1-day confirm floor, permitted to open only when realized volatility sits in a normal-to-elevated regime. Both momentum horizons come from the same 4H series in random-walk sigma units (change over n bars divided by ATR*sqrt(n)); the 4H leg carries conviction while the 1D leg acts as a directional permission floor at 25% of the entry threshold. The regime gate is a rolling percentile of relative ATR (ATR/close) against its own trailing 720-bar distribution, opening at the 30th percentile — a self-calibrating level rather than a fitted absolute threshold. When the regime is shut the signal is damped and clipped strictly below the exit level, so it can neither open a position nor by itself close one. Entries require a fresh cross of the entry threshold; exits are a hysteresis signal reversal at half the entry threshold and an ATR trailing stop from the best close since entry, both evaluated every bar so risk management is never gated. Sizing risks a fixed fraction of equity to the trailing-stop distance, capped at 1x equity notional, leverage 1.0.
Verification Results
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of BTCUSDT.BINANCE-4-HOUR-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Backtest Review
Measurable full-history sample: 121 trades over 2437 days, avg_trade_return_pct 2.06% (well above the 0.15% fee floor), PF 1.48, positive alpha (0.139) with near-zero beta (0.027) so it is genuinely long-short rather than crypto beta.
Backtest Review
Belongs to the one factory-promotable mechanism family (4H+1D dual-TF momentum confluence on Binance USD-M, L82); clean single-instrument pure-OHLCV implementation, developer already fixed the two known confluence/exit defects.
Backtest Review
Below the L82 survivable dual-TF profile on every axis: Sharpe 0.90 (needs >~1.3), PF 1.48 (needs >2.0), max_drawdown 26.7% (needs <20%). Base Sharpe <1.0 is the ceiling the ~225-trial deflation only lowers (L63/L82).
Backtest Review
Edge has clearly decayed: 2020 +31.9%, 2021 +36.5%, 2022 +19.4%, 2023 +19.1%, then 2024 +6.2%, 2025 -20.5%, 2026 +6.5%. rolling_sharpe is deeply negative (-3 to -7) across 2025-08 through 2026, and information_ratio is -0.63.
Backtest Review
The 20% holdout (last ~15 months) lands squarely in the losing 2025-2026 regime and will almost certainly fail the hard holdout gate (Sharpe > 0). PSR is already only 0.9487 for the single config.
Backtest Review
The vol-regime gate that is the entire premise of this variant added nothing: regime_performance is uniform across calm/normal/stressed (0.88/0.95/0.95) and the choppy-period drawdown is still 26.7% — the lever did not lift per-trade edge or cut chop drawdown as hypothesized.
Iteration History
Verification failed (Layer 4 — QA review):
- UNMEASURABLE SAMPLE, AND THE CHOSEN LEVER MOVES AWAY FROM MEASURABILITY. Sandbox produced 6 trades over 363 days (~6/year -> ~36 over a multi-year span, below the ~100 floor, L16), against the hypothesis's own claim of ~100-200 over multi-year. This is structural, not incidental: a volatility-EXCLUSION gate can only REDUCE the trade count relative to the ungated 4H+1D survivor -- it removes the low-vol bottom ~30% of bars -- so adding it to an already-selective 1.0-sigma confluence (both horizons must clear the threshold via signed-minimum, plus a fresh cross) makes the sample SMALLER, exactly the wrong direction for a family whose recurring failure is sample size (1H+4H 9/yr, triple iter1 12/yr, weekly 9-22/yr, all unmeasurable). The n=6 metrics are noise despite the enticing headline: profit_factor 3.95 and avg_trade_return_pct 4.04% on SIX trades, Sharpe 0.897 with CI [-0.71, 2.29] straddling zero, return_skew 2.73, return_kurtosis 50.5, and the largest_win $7,072 is ~68% of the $10,411 net profit -- tail-driven and indistinguishable from luck.
Iteration History
Verification failed (Layer 4 — QA review):
- THE COUNT FIX WORKED AND REVEALED NO EDGE -- the developer's own pre-committed abandon condition. The base-selectivity fix (1D leg made a directional FLOOR gate instead of a co-equal signed-minimum threshold, the same fix that took the macro sibling 9 -> 22) correctly lifted the count from 6 to 21 trades over 363 days (~105-130 over a multi-year span, roughly measurable). But the enlarged, measurable sample is decisively net-negative: total_return -8.12%, profit_factor 0.650, Sharpe -0.532 (CI [-2.28, 0.93]), win_rate 0.333, avg_trade_return_pct -0.592% (negative and on the wrong side of the 0.15% fee floor), expectancy -$386/trade. The reward:risk is favorable (avg_win $2,151 vs avg_loss $1,655, ~1.30) but the 33% hit rate cannot carry it (EV ~= 0.333 x 2151 - 0.667 x 1655 ~= -$388). Both of the developer's pre-committed abandon triggers fire: the count is under ~30/year AND the measurable sample is negative / below the fee floor. The volatility-regime lever adds nothing to a momentum confluence on BTC.
Backtest and paper results are hypothetical. Trading involves risk of loss.