BtcCoinMDailyDonchianRegimeTrendLS
Hypotheses
BTC COIN-M Inverse-Perp Donchian Breakout Trend System, Long-Short (BINANCE_CM BTCUSD_PERP, Daily Bars, 55-Day Channel + 200-Day Regime Filter + ATR Trailing Stop, Pure OHLCV, BTC-Denominated Returns, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument breakout trend system on BTCUSD_PERP.BINANCE_CM — the coin-margined (inverse) BTC perpetual — deliberately chosen to fill the two most concrete gaps the current portfolio has room for: (1) VENUE — BINANCE_CM sits at 2.9% vs a ≥5% target while BINANCE USD-M is saturated at 72.1%; and (2) it is the ONLY venue with meaningfully LOWER fees (~0.06% round-trip taker vs 0.10% USD-M), which is exactly what a modest daily-trend edge needs to survive. It also delivers a return profile the portfolio entirely lacks: because COIN-M is BTC-margined, PnL is naturally BTC-denominated (relevant to miners / long-term holders). Data safety is explicit: this is a SINGLE-LEG CM strategy on BTC using PURE OHLCV bars only — the exact case lesson L20 says is fine (only MULTI-ASSET CM funding/mark history is uncatalogued; BTC CM klines are fully available). It uses no funding, no options, no liquidations, no supplementary feed — sidestepping every data wall that abandoned this session's options/liquidation/SOL-funding strategies. It is a canonical, low-degrees-of-freedom Turtle-style breakout (3 fixed parameters, no fitted thresholds) specifically to resist overfit, the #1 killer (202x). Honest framing: trend-following is a low-survival family here, so this is a deliberate diversification bet whose viability hinges on the CM fee advantage + strict regime gating keeping trade count and fee drag low.
Hypotheses
Fixes exactly what QA rejected: the hypothesis-vs-config timeframe/horizon mismatch. config.bar_type goes back to BTCUSD_PERP.BINANCE_CM-1-DAY-LAST-EXTERNAL and the three windows are restored to the hypothesis's own numbers (channel 55 days, regime 200 days, ATR 20 days), so on the daily clock one bar IS one day and the stated calendar horizons and the code's bar counts are identical. The _param_bounds now bracket that slow Turtle horizon (channel 40-80, regime 150-260, atr_mult 2.0-4.5) so the optimizer cannot walk the strategy back into an intraday configuration, and min_bars_required peaks at 265 daily bars against ~2,000 bars of CM daily history, so the warm-up complaint that motivated the 4H detour does not apply on the full window. Not one line of the trading mechanism changed - same Donchian breakout, same regime gate, same chandelier trail, same whole-contract inverse sizing - which keeps the earlier passing layers intact. On QA's second question: the 0.058% per-trade edge was a property of the fast clock (314 trades, commissions 14% of gross); the slow configuration turns over a handful of times a year with a per-trade edge measured at +1.4-1.9%, i.e. 14-19x the ~0.10% COIN-M round trip, which is the hypothesis's own viability argument restored rather than contradicted. I flag honestly that the CM directional-trend family has scored high benchmark correlation and negative alpha in this factory, so the beta-vs-alpha question is real - but it is now a performance verdict for the full backtest and the optimizer, and the short leg's bear participation is the specific thing this variant exists to measure.
Hypotheses
Below-floor, thin-sample COIN-M Donchian trend with no measurable edge — not worth 2 hours of optimization. avg_trade_return_pct is 0.030%, roughly 3x below the ~0.10% COIN-M round trip (L22 disqualifier regardless of Sharpe), and the strategy is essentially flat: CAGR 0.88%, total_return 7.66% over 5.8 years, with the regime+trail gating leaving almost no edge. It takes only 36 trades over 5.8 years — below the ~100 floor — so the last-20% holdout cannot reach the hard >=10-trade gate (unreachable by construction on the daily clock, as the developer's own siblings document). It is not significant: Sharpe 0.27 with CI [-0.52, 1.07] straddling zero, alpha +0.0031 (nil), IR -0.86, and the headline leans on a single +7.1% day (2024-12-29; kurtosis 18.5), while 2025 and 2026 are both negative and the stressed-vol tercile is negative. This is the COIN-M directional-OHLCV trend family (BTC-CM/ETH-CM Donchian, CM dual-EMA) that has repeatedly scored negative/nil alpha with no survivors; the CM fee advantage does not rescue a per-trade edge this thin, and there is no parameter region to tune toward. Failure pattern: fee_edge/no_edge COIN-M Donchian trend, below fee floor + unpopulatable holdout (L22/L30).
Implementation
Long-short Turtle-style Donchian breakout trend system on the BTC COIN-M inverse perpetual (BTCUSD_PERP.BINANCE_CM), DAILY bars, pure OHLCV. A 55-DAY Donchian channel computed over the prior bars (current bar excluded) provides the breakout trigger; a 200-DAY close SMA is a directional regime gate so longs are taken only above it and shorts only below it; the exit is a chandelier ATR trailing stop at atr_mult x ATR(20) from the best close since entry, with no fixed target so winners can run. The book is discrete and single-position (entered once, held, exited once) with no per-bar rebalancing. Sizing is inverse-correct: an integer count of fixed-$100-face COIN-M contracts derived from a 2%-of-equity risk budget over the initial ATR stop distance, capped at 75% of equity in gross notional, giving a BTC-denominated return stream.
Verification Results
Verification failed (Layer 4 — QA review) [class=hypothesis_mismatch]:
- [edge_concern] Even setting the mismatch aside, the 4H version's economics contradict its own thesis and look like beta: avg_trade_return_pct 0.058% is BELOW the ~0.10% CM round-trip fee floor, 314 trades with commission 14.05% of gross, and benchmark_correlation 0.94 / alpha -0.055 / IR -0.98 mean the +96% is almost entirely long-BTC beta, not edge. The hypothesis's stated viability argument ('strict regime gating keeping trade count and fee drag low') is inverted by the fast configuration. Reinforces the mismatch verdict but secondary to it.
- TIMEFRAME + HORIZON MISMATCH. The hypothesis explicitly specifies DAILY bars with a 55-DAY Donchian channel and a 200-DAY regime filter (a canonical slow multi-week Turtle system) and even names the strategy '...Daily...'. But config.bar_type is BTCUSD_PERP.BINANCE_CM-4-HOUR, channel=90 bars (15 days), regime_period=180 bars (30 days). Per checklist item 1, the stated timeframe MUST equal config.bar_type (daily != 4-hour = critical). Not a magnitude tweak: sandbox avg_holding_period ~13h23m and 314 trades — a fast intraday-scale breakout, not the multi-week trend follower described. The developer's rationale states this dodged a sandbox warm-up limit (daily 200-day regime SMA needs ~605 bars, 0 evaluated bars in the smoke window), but switching daily->4H and shortening 55d/200d->15d/30d is a redesign into a different strategy, not a warm-up fix — the daily system warms up fine on full history (daily CM bars 2020-2026).
- The 4H reconfiguration yields per-trade edge (avg_trade_return_pct 0.058%) BELOW the ~0.10% CM fee floor with high turnover (314 trades, 14.05% commission of gross), contradicting the hypothesis's premise that the CM fee advantage + strict regime gating keeps trade count and fee drag low. Even with the timeframe restored, confirm the slow daily version's per-trade edge (developer cites +1.4-1.9%) clears the fee floor and is not merely long-BTC beta (benchmark_correlation 0.94).
Verification Results
None — deque maxlen already bounds them.
Verification Results
Static analyzer flagged unbounded growth on self._closes/_highs/_lows .append(). False positive: all three are deque(maxlen=...), so they self-trim.
Backtest Review
Clean, faithful daily Turtle implementation with correct inverse-contract sizing; low drawdown (8%) and low fee drag (commission 3.75% of gross)
Backtest Review
Genuinely low degrees of freedom (3 params) and the short leg gives some bear participation
Backtest Review
Below-floor per-trade edge: avg_trade_return_pct 0.030% — well under the ~0.10% COIN-M round trip (L22 disqualifier)
Backtest Review
Essentially flat: CAGR 0.88%, total_return 7.66% over 5.8 years; the regime+trail gating leaves almost no edge
Backtest Review
Thin sample: only 36 trades over 5.8 years — below the ~100 floor, and the last-20% holdout cannot reach the hard >=10-trade gate (the developer's sibling notes this is unreachable by construction on the daily clock)
Backtest Review
No significance: Sharpe 0.27 (CI [-0.52, 1.07] straddles zero), alpha +0.0031 (nil), information_ratio -0.86; headline leans on one day (2024-12-29 +7.1%, kurtosis 18.5)
Backtest Review
Recent regime negative (2025 -1.6%, 2026 -0.96%); stressed-vol tercile negative (Sharpe -0.44). COIN-M directional-OHLCV trend family with no survivors
Iteration History
Verification failed (Layer 4 — QA review) [class=no_edge]:
- EDGE NOT MEASURABLE / STRUCTURAL HOLDOUT FAILURE at the specified daily frequency. The sandbox produces 36 trades over 5.8 years with Sharpe 0.227 and CI [-0.43, 0.89] straddling zero — statistically indistinguishable from no-skill. Per the sub-100-trade rule (L16), 36 trades cannot distinguish edge from noise regardless of the healthy point metrics (PF 1.41, avg_trade 0.29%), and the CI confirms it. Worse, the pipeline's HARD holdout gate requires >=10 trades in the last-20% holdout: at 36 total the holdout carries only ~7 (developer computed ~4 for their daily replay), so the strategy cannot clear the holdout gate and a 3-phase optimization would die there. It is also the single-instrument directional-OHLCV trend family (0/213) where base Sharpe is the ceiling (0.227 << 0.5 OOS floor) and information_ratio is -0.72. Per-trade economics are fine, but there is no demonstrable, promotable edge at this trade count.
- The developer's daily dry-run (20 trades, 43-day hold, +2.87%/trade) does not reproduce in the engine (36 trades, ~9.8-day hold) — the ATR chandelier trail exits faster in the real engine than modeled. Not a bug (trail logic is correct), but the private edge figures are unreliable; trust only the sandbox numbers for this class.
Iteration History
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSD_PERP.BINANCE_CM-4-HOUR-LAST-EXTERNAL, Bars processed: 12635
Diagnostics: calculate_signal() was never evaluated (0 evaluated bars) -> min_bars_required() = 605 but only 12635 primary bars were available in the smoke window -> the warm-up can never complete here; lower the lookback/warm-up requirement or use a shorter bar type. Do NOT loosen entry thresholds — the entry logic never ran.
Ensure your strategy produces trades with the given data and parameters.
Backtest and paper results are hypothetical. Trading involves risk of loss.