CoinMEthDonchianBreakoutLongFlat
Hypotheses
COIN-M ETH Daily Donchian Breakout, LONG/FLAT (Single-Instrument BINANCE_CM Inverse Perp, Pure OHLCV, Fixed Single-Entry Sizing, No Flips/No Resize, Deep-History Clean-Sizing Probe Twin of the Pending CM BTC Book — Confirms Whether the COIN-M Account Path Dodges the USD-M Over-Exposure Defect, Tail-Safe, Low-Parameter)
Hypotheses
A LONG-ONLY (LONG/FLAT, never short), SINGLE-INSTRUMENT, DAILY Donchian-channel breakout trend strategy on ETHUSD_PERP.BINANCE_CM (COIN-M inverse perpetual). This is the deliberate TWIN of the pending CoinMBTCDonchianBreakoutLongFlat: confirming that a venue sizes correctly requires at least two instruments on it (the USD-M over-exposure defect was only established as venue-wide after BTC 429%, ETH 1062%, and SOL all reproduced it). ETH is the only other deep-history COIN-M major, so a CM ETH long/flat book is the natural second data point. Rationale stack: (1) BINANCE USD-M perp is engine-corrupted (proven over-exposure defect, two clean long/flat 1x reproducers BTC 429% / ETH 1062%, independent of flips/resizing); (2) BINANCE spot-CASH has a held-position MTM defect; (3) multi-instrument has an aggregation defect; (4) options has a settlement-marking defect; (5) census signals (liq/OI/taker/account-ratio) are data-walled — so signals are restricted to OHLCV + funding; (6) HYPERLIQUID sizes correctly but is data-length-limited (its BTC/ETH/SOL Donchian sleeve is pending on that risk). COIN-M is the ONLY remaining venue with BOTH a distinct account/contract path (inverse, BTC/ETH-margined, dapi — may sit outside the corrupted USD-M position_size pipeline) AND deep multi-year history (ETHUSD_PERP since 2020) sufficient for a valid 3-window walk-forward + 15-day holdout. CM's only known engine limitation is excluded inverse FUNDING — this book is PURE OHLCV, so that limitation does not apply. Construction is the maximally bug-avoiding form: single-instrument, OHLCV-only, LONG/FLAT (no flip-stacking), ONE fixed-fractional size at entry with NO dynamic resizing, leverage 1.0, close-to-flat before any re-entry, lowest fees (~0.06% RT). PRE-REGISTERED ACCEPTANCE / SIZING CHECK (doubles as CM-defect detector): avg_position_pct ~<=100% and single-day equity returns within ~+/-15-20% (ETH at 1x; inverse PnL is mildly nonlinear but still bounded near ETH's daily move). If violated, the over-exposure defect extends to COIN-M too — abandon and escalate as the CM reproducer. If it sizes correctly, this + the CM BTC book establish COIN-M as the first deep-history venue capable of validly backtesting the trend edge while USD-M is broken.
Hypotheses
Iteration 2 addresses the ONLY reported failure (Layer 3 sandbox_timeout) with the smallest possible change and touches nothing else: signal definition, entry/exit rules, sizing, imports, config and parameters are byte-for-byte the same behaviour. The feedback asked for per-bar work that does not scan a window: the two rolling Donchian extremes were computed with max(self._highs) / min(self._lows) over the stored deque on EVERY bar (O(lookback) per bar, up to 60 comparisons x3). They are now maintained with index-tagged MONOTONIC deques (_push_max/_push_min/_front), giving amortised O(1) per bar with a deque that never exceeds the window length; I verified against a brute-force reference over 3000 random bars that the entry-high, entry-low and exit-low series are IDENTICAL to the previous implementation (prior bars only, current bar excluded), so the signal and trade sequence are unchanged. The strategy reads no supplementary series at all, builds no lists, sorts nothing and allocates nothing per bar, so there is now no remaining per-bar cost that scales with history. Honest note: at 1-DAY bars the sandbox window is only ~2400 bars, so this strategy's own compute was already tiny relative to the 300s budget — the wall-clock is most likely dominated by on-demand BINANCE_CM data collection for ETHUSD_PERP (outside strategy control). This change removes every scan the feedback named; if it times out again the cause is the venue's data path, not the code.
Hypotheses
The hypothesis's own pre-registered sizing check failed, and the underlying has no edge — abandon and escalate as the COIN-M over-exposure/marking reproducer. The developer pre-registered that single-day equity returns must stay within ~±15-20% at 1x, else 'the over-exposure defect extends to COIN-M too — abandon.' The run shows a +206.9% single-day equity return on 2021-03-22 (ETH did not move anywhere near 207% that day), an order of magnitude past the bound, so the COIN-M account path also mis-sizes/mis-marks. That one artifact day IS the result: 2021 is +272% while 2022 (-1.4%), 2023 (-2.0%), 2025 (+1.5%) and 2026 (-6.1%) are flat-to-negative, so PF 3.67 and avg_trade_return_pct 13.55% are illusory. Independently, it is uninvestable: max_drawdown 69.6% (CI to 94.8%, past the L19 50% line) with every stress window deeply negative (LUNA -52%, rate-shock -46%), only 26 trades over 5.8 years (far below measurability), and Sharpe 0.652 with bootstrap CI [-0.15, 1.47] straddling zero — a single-instrument Donchian breakout in the L30/L63 graveyard. No optimization runs on a PnL created by a marking/over-exposure artifact, and stripped of it there is no edge. Failure pattern: venue over-exposure/marking artifact (pre-registered trigger) + risk_reject/no_edge single-instrument breakout, 70% DD (L19/L30).
Implementation
Long/flat daily Donchian breakout on the ETH COIN-M inverse perpetual (ETHUSD_PERP.BINANCE_CM, 1-DAY bars, pure OHLCV). Enters long when the close breaks above the highest high of the prior entry_lookback bars; exits when the close breaks below the lowest low of the prior exit_lookback bars (the trend's own trailing stop). Continuous signal = (close - channel_mid) / channel_half_width, recomputed every bar. One fixed-fractional notional (0.75x equity) per entry, no resizing/pyramiding/flips, leverage 1.0, sized in whole $10 inverse contracts via contracts_for_notional. Doubles as the COIN-M sizing probe: avg_position_pct should land near 75% and daily equity moves near ETH's own.
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 ETHUSD_PERP.BINANCE_CM-1-DAY-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).
Verification Results
Analyst to confirm from the positions/trades report that at all times the two legs are opposite-side and near-equal USD notional (net delta ~0), and that no single-day equity move exceeds ~+/-15-20% — the hypothesis's own delta-neutrality acceptance criteria — before sending to optimization.
Verification Results
Reported exposure_pct (200.57%) contradicts the config rationale's intended ~0.50x gross. Evidence says the SIZING is correct (per_leg = equity*0.25*1.0; avg_position_pct 24.6% matches the 25%/leg target; the leverage 2->1 change left exposure_pct unchanged, so it is not driven by the sizing/leverage path) and 200% is the same two-leg aggregation artifact seen on other correctly-sized pairs. Not a confirmed defect, but because the hypothesis pre-registered an exposure acceptance check, it must be verified rather than assumed.
Backtest Review
Clean, minimal long/flat OHLCV construction; correct inverse-contract sizing intent; low fees (0.58% of gross)
Backtest Review
Serves its stated diagnostic purpose — it reproduces the venue over-exposure/marking defect on COIN-M
Backtest Review
Pre-registered acceptance check violated: 2021-03-22 shows +206.9% single-day equity return vs the ±15-20% bound the hypothesis set as the abandon trigger — CM account path mis-sizes/mis-marks
Backtest Review
Result is one artifact day: 2021 +272% (the +207% print) with all other years flat-to-negative; PF 3.67 / avg_trade_return_pct 13.55% are that single day
Backtest Review
Catastrophic drawdown: max_drawdown 69.6% (CI to 94.8%), past the L19 line; every stress window deeply negative
Backtest Review
Below measurability: 26 trades over 5.8 years; Sharpe 0.652 with CI [-0.15, 1.47] straddling zero; single-instrument breakout graveyard (L30/L63)
Outcome Summary
CoinMEthDonchianBreakoutLongFlat was designed as a diagnostic twin of the CM BTC book — a maximally bug-avoiding long/flat daily Donchian breakout whose real job was to test, via a pre-registered single-day-return bound, whether the COIN-M account path sizes correctly where USD-M is broken. It answered the question, but the wrong way: a +206.9% single-day equity print on 2021-03-22 (far beyond anything ETH did) tripped the abandon trigger, showing COIN-M also mis-sizes/mis-marks, and that one artifact day accounted for essentially the whole +245.7% headline. Stripped of the artifact there was no edge anyway — 26 trades, a Sharpe CI straddling zero, a 69.6% drawdown, and deeply negative stress windows. It was abandoned at backtest review and flagged for escalation as the COIN-M over-exposure/marking reproducer, before any optimization or analysis.
Outcome Summary
A pre-registered sizing/acceptance check is what turns a probe into a verdict — the +207% single-day equity move (impossible from ETH's actual move) proves the COIN-M account path shares the USD-M over-exposure/marking defect, so its deep history cannot validly backtest the trend edge; and a headline built on one artifact day over just 26 trades is not a real result.
Outcome Summary
It was abandoned at the pre-optimization BACKTEST_REVIEW gate on its own pre-registered trigger: the single-day equity return blew past the ±15-20% bound, so the COIN-M path reproduces the over-exposure/marking defect — to be escalated as the CM reproducer. Independently it was uninvestable: a 69.6% drawdown past the L19 line, only 26 trades (below measurability), a Sharpe CI straddling zero, every stress window deeply negative, and a single-instrument Donchian breakout (L30/L63 graveyard) whose PnL is a marking artifact with no edge once stripped. Optimization, analysis, and risk review were never reached.
Outcome Summary
A long-only (long/flat, never short), single-instrument, pure-OHLCV daily Donchian breakout trend strategy on the ETH COIN-M inverse perp (ETHUSD_PERP.BINANCE_CM) with one fixed-fractional entry size, no resizing or flips, leverage 1.0 — built as the deep-history twin of the CM BTC book to probe (via a pre-registered sizing check) whether the COIN-M account path avoids the proven USD-M over-exposure defect.
Outcome Summary
The pre-registered acceptance check failed: it printed a +206.9% single-day equity return on 2021-03-22 (ETH moved nowhere near that), an order of magnitude past the ±15-20% bound, confirming the CM account path also mis-sizes/mis-marks. The headline (total return +245.7%, PF 3.67, avg_trade_return_pct 13.55%) was that one artifact day — 2021 was +272% while other years were flat-to-negative — with a 69.6% max drawdown (CI to 94.8%), only 26 trades over 5.8 years, and Sharpe 0.652 (CI [-0.15, 1.47] straddling zero).
Backtest and paper results are hypothetical. Trading involves risk of loss.