BtcDailyDonchianTimeSeriesMomentumLS
Hypotheses
C — Time-Series Momentum / Donchian Trend (BTC Perp)
Hypotheses
ECONOMIC HYPOTHESIS: BTC trends persist via under-reaction, momentum, and flow persistence. VENUE: BINANCE USD-M perp, BTCUSDT, MARGIN, leverage>1 (short-capable). TIMEFRAME: 1d. ENTRY: long when close breaks above prior N-day high; short when close breaks below prior N-day low. Sweep N across 20-55 days (report the FULL range, identify profitable plateau, flag if edge depends on one narrow N). EXIT: primary = 3x ATR chandelier/trailing stop; robustness variant = opposite-channel (N/2) exit. NO fixed take-profit (objective is to ride extended trends). RISK: volatility-adjusted position sizing if supported; do NOT tune sizing to manufacture returns. COSTS: realistic taker fees + slippage; funding N/A for daily-hold trend but include if positions span funding stamps. CONSTRAINTS: long & short; NO RSI; NO one-trade-per-day restriction; NO skip-after-loss rule; do NOT aggressively optimize before initial report. Report gross AND net. Prioritize robustness/parameter-plateau over max return.
Hypotheses
Iteration-2 fix for the reported `leverage_set_but_unused` rejection, and nothing else — signal logic, entry/exit logic, imports, class structure and parameter clamps are byte-identical to the previous (Layer 1/2-passing) version. Two changes, both confined to sizing: (1) `position_size` now reads `self.config.leverage` directly (the previous `getattr(self.config, "leverage", 1.0)` form did not match the gate's token scan), with the value also cached as `self.leverage` in `__init__`; (2) more substantively, leverage is now a genuine MULTIPLIER on the vol-targeted notional rather than an upper bound. Previously the multiplier was `min(target_vol/realized_vol, leverage * max_gross_frac)` — with BTC realized vol typically 0.4-0.9 annualized, the vol-target ratio sits around 0.4-0.9 and never reached the 2.0 cap, so the leverage was inert and the backtest was arithmetically identical to 1x, exactly what the gate flags. Now `notional = equity * min(target_vol/realized_vol, max_gross_frac) * leverage`, so the 2x budget is actually deployed and the margin model binds. Verified on a synthetic daily path: notional per entry roughly doubles versus the prior formula, signal remains continuous (361 distinct values over 400 bars, ~21 breakout entries), and the strategy still respects `max_gross_frac` before leverage so gross exposure stays capped at leverage x equity rather than compounding without limit.
Hypotheses
ohlcv_trend_clone_leverage_artifact_unmeasured: single-instrument BTC daily Donchian/TSMOM breakout — the 0/213-survival OHLCV trend family (L9/L41). Only 42 trades make the Sharpe 0.493 statistically unmeasured with CI [-0.131, 1.064] straddling zero (L10). max_drawdown 76.5% (CI high 94.9%) is a hard-abandon breach (L19). The 366% headline is a leverage/compounding-on-equity artifact (avg_position_pct 1692%, single daily returns of +4195%/+2418%/+877%, kurtosis 69.6) plus 254.6% un-exited open-position unrealized paper gain — not realized edge; information_ratio is negative (-0.139) and PF 1.095 is marginal. Tuning 8 params on a 42-trade, spike-driven sample cannot reach the promotion floor; not worth the 2-hour optimization run.
Implementation
BTCUSDT.BINANCE USD-M perpetual, 1-DAY bars, long + short time-series momentum. calculate_signal returns the continuous normalized position of the close within the prior N-day Donchian channel ((close - channel_mid) / channel_half_width), computed on bars strictly before the current one; |signal| > 1 means the close has broken the prior N-day high (+) or low (-). Entry: BUY above +entry_threshold, SELL below -entry_threshold. Exit (primary, exit_mode='chandelier'): 3x ATR(20) trailing stop from the position's running extreme, plus an unconditional close on a full opposite N-day breakout; robustness variant exit_mode='opposite_channel' exits on an N/2-day channel break instead. No fixed take-profit, so extended trends run. Sizing is volatility-targeted: notional = equity * min(target_vol / realized_vol, max_gross_frac) * config.leverage, keeping risk-per-trade roughly constant across vol regimes while deploying the declared 2x margin budget.
Verification Results
Verification failed (leverage_set_but_unused): config sets leverage=2.0 but the strategy never references leverage in sizing. Size positions on it — notional = equity * fraction * leverage / price (read self.config.leverage) — or set leverage=1.0. As written the leverage is inert and the backtest is identical to 1x.
Verification Results
Ensure the full backtest spans multiple years so the N-sweep (20-55) produces a statistically meaningful trade count per N; report the parameter plateau rather than point metrics.
Verification Results
Very low trade frequency: the sandbox produced only 5 trades over 362 daily bars, and sharpe_ci_low is -0.5492 (CI straddles zero). This is inherent to a 40-day Donchian trend-follower on daily bars, and the hypothesis explicitly acknowledges low-frequency trend riding, so it is not a code defect. But the sandbox metrics are noise-dominated and unreliable.
Verification Results
Slice the prior-N window excluding the current bar (list(self._highs)[-(n+1):-1]) to mirror the entry convention.
Verification Results
Minor lookahead in the non-default 'opposite_channel' exit only: calculate_signal appends the current bar to self._highs/_lows before should_exit runs, so that branch's min/max window includes the current bar. Entry logic and the default chandelier exit are unaffected.
Backtest Review
avg_trade_return_pct nominally clears the fee floor, but is a leverage/compounding artifact
Backtest Review
Mechanism (Donchian TSMOM) is a legitimate, well-specified trend template
Backtest Review
Single-instrument OHLCV trend/momentum clone — 0/213 survival class (L9/L41)
Backtest Review
Only 42 trades over ~6.5yr — Sharpe 0.493 with CI [-0.131, 1.064] straddles zero (unmeasured, L10)
Backtest Review
max_drawdown 76.5% (CI high 94.9%) — hard-abandon breach (L19)
Backtest Review
avg_position_pct 1692% + daily returns of +4195%/+2418%/+877% — leverage/compounding-on-equity artifact (L36); return_kurtosis 69.6, skew 3.77
Backtest Review
end_unrealized_pct 254.6% of 366% total_return — headline is un-exited open-position paper gain, not realized edge
Backtest Review
information_ratio -0.139 (no alpha vs buy-hold); PF 1.095 marginal; losing years 2023 -114%, 2025 -68%
Outcome Summary
BtcDailyDonchianTimeSeriesMomentumLS was a textbook long-short Donchian time-series-momentum trend rider on BTC perps, with an iteration-2 fix to make the declared leverage an actual sizing multiplier rather than an inert cap. Its 366% headline return looked striking but proved hollow: over 6.5 years it took only 42 trades at a 35.7% win rate, its Sharpe of 0.493 had a confidence interval straddling zero, and its 76.5% max drawdown breached the hard-abandon floor. The analyst determined the return was largely a leverage/compounding artifact (avg position ~1692% of equity, kurtosis 69.6) compounded by 254.6% of un-exited open-position paper gains, with a negative information ratio and marginal profit factor. It was abandoned at the backtest-review gate as another entry in the 0/213-survival single-instrument OHLCV trend-clone family, judged not worth the optimization run.
Outcome Summary
A large headline return can be an illusion — leverage/compounding-on-equity, extreme-kurtosis spikes, and un-exited open-position paper gains can inflate results while the true risk-adjusted edge (Sharpe, information ratio, drawdown) fails every floor; trend clones also need enough trades to be statistically measurable.
Outcome Summary
The analyst issued an 'abandon' verdict at the pre-optimization backtest-review gate: it is a single-instrument OHLCV trend/momentum clone from the 0/213-survival family, the 42-trade sample left the Sharpe statistically unmeasured with a CI straddling zero, the 76.5% drawdown was a hard-abandon breach, and the headline return was a leverage/compounding-plus-unrealized artifact rather than realized edge. It never reached optimization, post-opt analyst review, or risk review.
Outcome Summary
A long-short daily time-series momentum / Donchian breakout on BTCUSDT Binance USD-M perp, going long on breaks above the prior N-day high and short below the prior N-day low, riding trends with a 3x ATR chandelier trailing stop, no fixed take-profit, and volatility-targeted sizing that deployed the declared leverage as a genuine multiplier.
Outcome Summary
Over ~6.5 years and only 42 trades (24 long / 18 short, 35.7% win rate) it showed a 366% headline total return but a Sharpe of just 0.493 (95% CI [-0.131, 1.064]), profit factor 1.095, information ratio -0.139, and a 76.5% max drawdown (CI high 94.9%); the reported avg_trade_return_pct of 4.95% and 366% return were flagged as leverage/compounding artifacts (avg_position_pct 1692%, kurtosis 69.6, skew 3.77), with 254.6% of the total return being un-exited open-position paper gains.
Backtest and paper results are hypothetical. Trading involves risk of loss.