BtcCmVolRegimeGatedDonchianBreakoutLS
Hypotheses
BTC COIN-M Inverse Perp Volatility-Regime-Gated Donchian Breakout, Long-Short (Single-Instrument BTCUSD_PERP.BINANCE_CM, 4h Bars, Trade Channel Breaks ONLY in Expanding-Volatility Regime — Flat in Chop, ATR-Stopped, Pure OHLCV, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument directional strategy on the Binance COIN-M inverse perpetual BTCUSD_PERP.BINANCE_CM (BTC-margined, ~0.06% round-trip taker), 4-hour bars, pure OHLCV. It trades classic Donchian channel breakouts BUT gates every entry behind a volatility-regime filter: signals are taken only when the market is in an EXPANDING-volatility state, and the strategy sits flat during low-volatility chop. This is a re-attempt of a previously abandoned hypothesis whose abandon was an ENGINE BUG — a phantom COIN-M liquidation from margining a USDT-only account with qty×price maintenance margin — fixed 2026-07-24 (commit 59c8a73) to coin-funded, face-based margining; the abandoned code re-runs cleanly at 0.5× sizing, 254 trades, no liquidation, and QA credited the code. Mechanism per 4h bar: (1) compute an N-bar Donchian high/low channel (default N=30 ≈ 5 days); (2) compute a volatility-regime flag = ATR(14) is above its own rolling median over the last M bars (default M=60 ≈ 10 days) AND rising vs 6 bars ago; (3) go LONG on a close above the upper channel and SHORT on a close below the lower channel, ONLY if the vol-regime flag is TRUE — otherwise ignore all breakout signals and hold no position. It deliberately fills three under-represented buckets at once — BINANCE_CM venue (3.2% vs ≥5%), long_short direction (14.7% in a long-only-dominated book), and diversification away from the 71.5% USD-M concentration — on a low-fee venue where the fee math is forgiving. It is a single-leg CM strategy on BTC OHLCV only (L20-blessed: no multi-asset CM funding history needed), and it addresses the exact failure mode that killed the SOL 15m opening-range breakout (chop whipsaws, 28% win rate) by refusing to trade in the regime where breakouts fail-and-reverse. Against this session's trend-sleeve deaths (single-regime concentration on daily macro trend), its defense is the 4h frequency (254 trades → return stream not dominated by a handful of monster daily bars) plus a hard ATR stop and time cap so no single position rides a bull spike disproportionately.
Hypotheses
Implements the hypothesis exactly: (1) N-bar Donchian high/low channel excluding the current bar; (2) vol-regime flag = ATR(14) above its rolling median over M bars AND rising vs 6 bars ago; (3) long on upper-channel close break, short on lower-channel break, gated on the regime flag so the strategy sits flat in chop — the direct answer to the breakout-whipsaw failure mode. Three tunable knobs (donchian_lookback, vol_window, atr_stop_mult) with clamps mirrored in _param_bounds so the optimizer never searches values the code rewrites. calculate_signal returns a CONTINUOUS channel-position value (close - mid)/half_width in natural units every bar (|signal|>1 ⇔ a real channel break), never a gated constant; the regime test lives in should_enter. Venue is BINANCE_CM per the hypothesis (long-short + BTC-margined convexity, ~0.09% RT taker), 4h bars matched to the mid/long-term breakout horizon, and confirmed present in the catalog (BTCUSD_PERP.BINANCE_CM-4-HOUR-LAST-EXTERNAL). Inverse sizing uses contracts_for_notional (whole $100-face contracts) rather than the linear equity/price formula — at ~$55k typical notional that is ~550 contracts, far above min notional, so zero-trade/min-notional failure is not a risk. leverage=2.0 is genuinely consumed in position_size via the gross-notional cap (equity × 0.75 × leverage = 1.5× equity ceiling), while per-trade risk stays capped at 2% of equity against the ATR stop, and the time cap plus trail prevent any one position from riding a single trend leg disproportionately. All state is incremental (deques + Wilder ATR + a ≤60-element median sort), so per-bar cost is O(1)-ish and the 300s smoke budget is safe.
Hypotheses
unrealized_mtm_tail_driven_closet_beta_donchian_clone: BTC COIN-M vol-regime-gated Donchian breakout is a single-instrument pure-OHLCV directional-breakout clone (0/213 survival, L41/L63) whose strong-looking headline does not survive scrutiny. The +299% total_return is ~2/3 unrealized (end_unrealized_pct 201.3 vs realized ~98%) — the result and much of the daily-return Sharpe hinge on an un-exited open position marked to market at backtest end, not a realized edge. It is tail-driven (kurtosis 7.56): a single day 2023-01-14 (+21.1%) IS essentially the entire 2023 (+31.7%). It is closet-long BTC (benchmark_correlation 0.86, beta 0.45, information_ratio -0.487) and has decayed for two years (2025 -0.75%, 2026 -1.84%, rolling Sharpe near/below zero from late 2025). Sharpe 0.792 has a positive CI low (0.139) but that is the pre-deflation, best-of-selection number; over a 225-trial / 3-param sweep the deflated Sharpe would strip it below significance (expected-max luck bar exceeds 0.139), exactly as prior Donchian/trend clones died. avg_trade_return_pct 1.05% clears the CM fee floor so this is not a fee death and the prior phantom-liquidation was a legitimately-fixed engine bug — but the signal itself is a tail-and-MTM-driven closet-beta trend clone. Per L41/L63 the class prior overrides the attractive headline; a directional OHLCV book's base Sharpe is its ceiling and this one would die at DSR/holdout. Not worth the 2-hour optimization run.
Implementation
Long-short Donchian channel breakout on the BTC COIN-M inverse perpetual (BTCUSD_PERP.BINANCE_CM, 4-hour bars, pure OHLCV). Each bar it computes an N-bar Donchian channel from the PRIOR bars (default 30 ≈ 5 days) and a volatility-regime flag: Wilder ATR(14) above its own rolling median over the last M bars (default 60 ≈ 10 days) AND rising versus 6 bars ago. It goes LONG on a close above the upper channel and SHORT on a close below the lower channel, but ONLY while the expanding-volatility regime holds — in low-volatility chop every breakout is ignored and the book stays flat. Exits are an ATR chandelier trail (3×ATR from the favourable extreme since entry), a hard 60-bar (≈10-day) time cap, or a full opposite channel break. Sizing is volatility-targeted: 2% of equity risked against the ATR stop distance, capped at 0.75×equity×leverage of gross notional, converted to WHOLE inverse contracts via contracts_for_notional ($100 face per BTCUSD_PERP contract, BTC-margined/settled).
Verification Results
At backtest review, evaluate realized-only performance, confirm Sharpe survives without the largest winner, and lean on the holdout where a terminal open position cannot inflate the result.
Verification Results
Headline inflated by a large open position: end_unrealized_pct is +195% against total_return +299%, so ~2/3 of the reported return is unrealized mark-to-market on a still-open position, not realized PnL (largest_win $29,116 vs avg_win $3,569 is an ~8x outlier). The per-trade edge is sound because avg_trade_return_pct 1.15% is measured over the 158 CLOSED trades, but the headline total_return and Sharpe (0.79) are lifted by the open markup and must be discounted. Same inflation pattern that has flattered optimized headlines before.
Verification Results
Weight DSR and OOS Sharpe heavily; check shorts contribute positively and the edge isn't purely the long leg riding 2024-2025 BTC.
Verification Results
Directional single-instrument OHLCV Donchian-breakout family (historically fragile). The vol-regime gate is a genuine differentiator and the sandbox is significant (Sharpe CI low 0.14 > 0, positive alpha), but information_ratio is -0.49 vs buy_hold and beta 0.45 to BTC — some return is long-BTC exposure in a bull sample. Generalization must be proven at walk-forward/holdout, not assumed.
Verification Results
Carry 2x leverage and DD forward to risk review; consider sensitivity to leverage=1.0.
Verification Results
Leverage 2.0 (within the BINANCE_CM cap, legitimately consumed) amplifies both the 39.1% max drawdown (CI to 59%) and the open-position markup. Correct and intentional, but risk review should confirm the 2x drawdown profile on an inverse contract is acceptable.
Backtest Review
Best risk-adjusted profile of the family: Sharpe 0.792 with CI low 0.139 (positive), PSR 0.99, PF 1.70, Sortino 1.20
Backtest Review
max_drawdown 39.1% stays under the L19 50% line; hard ATR stop + time cap bound single-position risk
Backtest Review
avg_trade_return_pct 1.05% clears the CM fee floor; balanced long/short book (84L/74S), 158 trades, clean inverse sizing; prior liquidation was a since-fixed engine bug
Backtest Review
299% headline is almost entirely unrealized: end_unrealized_pct 201.3 — realized is only ~98%, so the result (and much of the Sharpe) hinges on an un-exited open position marked to market at backtest end
Backtest Review
Single-day tail dependence: 2023-01-14 alone +21.1% IS essentially the entire 2023 (+31.7%); kurtosis 7.56
Backtest Review
Closet-long BTC: benchmark_correlation 0.86, beta 0.45, information_ratio -0.487 — mostly captured beta
Backtest Review
Decayed: 2025 -0.75%, 2026 -1.84%; rolling Sharpe near/below zero from late 2025
Backtest Review
Single-instrument pure-OHLCV Donchian-breakout clone family (0/213, L41/L63); Sharpe 0.79 with CI-low 0.139 would deflate below significance under the 225-trial best-of-N luck bar
Outcome Summary
BtcCmVolRegimeGatedDonchianBreakoutLS re-submitted a vol-regime-gated Donchian breakout on the BTC COIN-M perp after its earlier abandon was traced to a since-fixed phantom-liquidation engine bug, and this run cleared the code and the Sharpe/drawdown/PF floors with the best profile of its family (+299%, Sharpe 0.792, PF 1.70, 39.1% max DD). On inspection the shine was fragile: about two-thirds of the return was unrealized mark-to-market on an un-exited position, a single +21% day carried all of 2023, and with 0.86 BTC correlation and a negative information ratio it was mostly captured beta that had decayed to negative through 2025-2026. Its Sharpe CI-low of 0.139, while positive, sits below the deflation luck bar a 225-trial sweep would impose. As another 0/213 OHLCV breakout clone, it was abandoned at backtest review before any optimization or analysis.
Outcome Summary
Discount a headline return for unrealized mark-to-market on open positions and for single-day tail dependence before trusting it; a positive pre-deflation Sharpe CI-low (0.139) is still below the best-of-N luck bar for a 3-param sweep, and a class prior (0/213 OHLCV breakout clones, high beta/negative information ratio) overrides an attractive-looking backtest.
Outcome Summary
It was abandoned at the pre-optimization BACKTEST_REVIEW gate: despite passing the Sharpe, drawdown, and PF floors and having the engine bug legitimately fixed, the strong headline did not survive scrutiny — it was ~2/3 unrealized MTM on an un-exited open position, tail-driven, and captured beta rather than alpha, with a two-year decay. As a single-instrument OHLCV Donchian-breakout clone (0/213 survival), its Sharpe CI-low of 0.139 would deflate below significance under the 225-trial best-of-N luck bar and die at DSR/holdout, so it was judged not worth the optimization run. Optimization, analysis, and risk review were never reached.
Outcome Summary
A long-short, single-instrument directional strategy on the BTC COIN-M inverse perp (BTCUSD_PERP.BINANCE_CM, 4H, pure OHLCV) that traded Donchian channel breakouts only in an expanding-volatility regime (ATR above its rolling median and rising), sat flat during chop, and exited via an ATR chandelier trail, a time cap, or an opposite channel break — a re-attempt of a prior submission whose abandon was a since-fixed phantom-liquidation engine bug.
Outcome Summary
Over 5.8 years it made 158 trades (84 long / 74 short) with total return +299%, profit factor 1.70, Sharpe 0.792 (CI low 0.139, positive), Sortino 1.20, PSR 0.99, avg_trade_return_pct 1.05% (clearing the CM fee floor), and a 39.1% max drawdown — the best risk-adjusted profile of its family. But ~2/3 of the headline was unrealized (end_unrealized_pct 201.3 vs realized ~98%), the PnL was tail-driven (kurtosis 7.56, a single +21.1% day essentially being all of 2023), and it was effectively closet-long BTC (correlation 0.86, beta 0.45, information ratio -0.487), decaying to negative in 2025 (-0.75%) and 2026 (-1.84%).
Backtest and paper results are hypothetical. Trading involves risk of loss.