Skip to content

View translation

BtcMultiTimeframeTrendWeeklyGatedLongShort

Hypotheses

BTC USD-M Multi-Timeframe Trend, Long-Short (Single-Instrument BINANCE Perp, Daily Entry Gated by a Weekly Higher-Timeframe Regime, Pure OHLCV, Tail-Safe Sizing, Low-Parameter)

Hypotheses

A LONG-SHORT, SINGLE-INSTRUMENT, MULTI-TIMEFRAME trend strategy on BTCUSDT.BINANCE (USD-M perpetual) that trades the factory's validated trend edge but conditions DAILY entries on a WEEKLY higher-timeframe regime — only taking daily trend signals that ALIGN with the dominant weekly trend, and standing flat when the two disagree. This is the evidence-forced choice after the design space collapsed to a single viable point: the analyst has restricted usable signals to OHLCV + funding ONLY (liquidations/OI/account-ratio/taker all data-walled), ruled out spot (equity-marking artifact + no edge vs buy-and-hold), closed out every contrarian/fade, shown multi-instrument/options are engine-broken, and shown single-name PRICE trend FAILS on non-core alts but WORKS on the core trenders (BTC/ETH/SOL, promoted). The validated single-timeframe expressions (TS-momentum, breakout, impulse, Bollinger, pullback, funding-confirmed) already saturate the core-3; the multi-timeframe construction is the distinct, not-yet-covered expression. It is engineered strictly inside proven-safe ground: BTC (the cleanest, deepest core trender — not a dead alt); OHLCV-ONLY (the deepest wall-free data); MOMENTUM/with-trend (not a fade); DAILY entry frequency (adequate trade sample — avoiding the thin-sample trap that a pure-weekly book would hit, while the weekly gate is the robustness layer); USD-M PERP (not spot — avoids the equity-marking artifact; not intraday — avoids the chop failure); SINGLE-INSTRUMENT/SINGLE-VENUE/SINGLE-ACCOUNT (no multi-instrument aggregation bug); and TAIL-SAFE controls (leverage <=1.5, hard ATR stop, modest notional cap) to prevent the LINK-style blowup. The weekly regime gate is the genuine differentiator versus the promoted single-timeframe daily BTC TS-momentum: by suppressing daily signals that fight the dominant weekly trend, it cuts the whipsaw/false-signal rate, aiming to raise the hit rate, reduce drawdown, and decorrelate the return stream. Low parameter count to resist overfitting.

Hypotheses

Iteration 2 fix (Layer-2 synthetic): the failure was 'TypeError: _ema() takes 2 positional arguments but 3 were given'. _ema was a @staticmethod(arr, period) but the verifier binds it as an instance method, so self._ema(closes, period) passed self as a third arg. Minimal fix: change _ema to a normal instance method def _ema(self, arr, period). No other logic changed — imports, the weekly-gated signal, entry/exit, and sizing are all intact and were already passing Layer 1.

Hypotheses

Failed deflated Sharpe and, decisively, the forward holdout on optimization attempt 1. DSR=0.0038 (vs 0.95 bar) with the optimized Sharpe 0.459 BELOW the 225-trial expected-max luck bar of 0.9277 (is_significant=false, sharpe_ci_low -0.2427 straddling 0, PBO 0.7354 >0.5) — after multiple-testing correction the selected config is statistically indistinguishable from best-of-225 noise; probabilistic_sharpe 0.9955 vs DSR 0.0038 is the textbook selection-inflation trap. Decisively, the untouched time-ordered HOLDOUT FAILED and is NEGATIVE (holdout_sharpe -0.156, ratio -0.422 vs WF-OOS 0.370). The walk-forward is is_overfitted=TRUE (avg IS 0.994 -> avg OOS 0.370, one OOS window -0.863). The base edge is a single-day 2021 outlier (2021-05-11 +88.9% daily return, return_kurtosis 1655, skew 39.5, tail_ratio 0.086) — annual 2021 +90.8% carries a headline whose other years are single-digit. The clean 0-cliff sensitivity surface measures consistency, not significance, and the whole surface sits at ~0.43 Sharpe, below the 0.93 luck bar. Not iterate (attempt 1 of 2): the binding failures are a negative forward holdout plus an overfit walk-forward with no robust region above the luck bar to tune toward — a second best-of-225 sweep re-overfits the 2021 outlier. Not revise_hypothesis: per the overfit->abandon rule this is high-IS/negative-holdout overfitting, BTC is a fine instrument, and the promoted single-timeframe BTC TS-momentum book already covers this ground — the weekly regime gate added no generalizing edge. FAILURE PATTERN: adding a weekly higher-timeframe regime gate to the already-promoted single-timeframe daily BTC TS-momentum does NOT create a distinct promotable edge — the multi-timeframe variant produces the same single-asset daily-trend deflation signature (DSR 0.004, optimized Sharpe below the luck bar, PBO 0.74, negative forward holdout, is_overfitted) with the entire base return carried by one 2021 day (kurtosis 1655). A clean 0-cliff sensitivity grid and a positive walk-forward OOS average do not rescue an outlier-carried single-name daily long-short that fails deflated Sharpe and the forward holdout simultaneously.

Implementation

Long-short single-instrument multi-timeframe trend on BTCUSDT.BINANCE USD-M perp. A daily EMA-spread momentum signal (fast vs slow EMA) is acted on ONLY when it aligns with the dominant weekly regime (weekly close vs weekly MA); when the two timeframes disagree the book stands flat. Tail-safe: leverage capped at 1.5x and wired into the notional cap, ATR risk sizing, a hard ATR stop, and a regime-flip exit.

Verification Results

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['atr_mult', 'risk_pct', 'weekly_ma', 'atr_period', 'daily_fast', 'daily_slow', 'exit_thresh', 'entry_thresh', 'min_notional'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: BtcMultiTimeframeTrendWeeklyGatedLongShort._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692840000) - steady_downtrend: TypeError: BtcMultiTimeframeTrendWeeklyGatedLongShort._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692840000) - flat_ranging: TypeError: BtcMultiTimeframeTrendWeeklyGatedLongShort._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692840000) - volatility_spike: TypeError: BtcMultiTimeframeTrendWeeklyGatedLongShort._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692840000) - zero_volume: TypeError: BtcMultiTimeframeTrendWeeklyGatedLongShort._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692840000) - price_gap: TypeError: BtcMultiTimeframeTrendWeeklyGatedLongShort._ema() takes 2 positional arguments but 3 were given (bar timestamp: 1735692840000)

Backtest Review

Mechanism correctly implements the hypothesis: 30 trades, 16 long/14 short, all with-trend and weekly-regime-gated on the correct instrument (BTCUSDT.BINANCE USD-M perp). The trades match the premise — long through the 2020-21 and 2023-24 bull runs, short through the 2022 bear and 2025-26 top.

Backtest Review

Not an outlier artifact: the +88% daily-return spike is the exit-day marking of a genuine 209-day long (+331%, leverage only 0.27x). Real trend capture, not a sizing/marking bug.

Backtest Review

Multi-regime edge: positive in every year except 2020 (2021 +90.8%, 2022 +8.5%, 2023 +6.2%, 2024 +15.9%, 2025 +10.1%, 2026 +6.9%). Shorts earned real PnL in bear years, so the long-short construction works both directions.

Backtest Review

Decorrelated and tail-controlled: beta 0.13, alpha 0.094, max_drawdown 14%, recovery_factor 45, per-trade leverage stayed 0.1-0.3x (tail-safe cap held).

Backtest Review

Thin trade sample: 30 trades over 5.5 years means a 3-window walk-forward gets ~10 trades/window — the optimizer risks fitting to noise. Inherent to multi-month position trading but a real robustness hurdle.

Backtest Review

Lumpy returns from multi-month holds marked at exit give a modest headline Sharpe of 0.43 with a CI that straddles 0 (-0.36 to 0.77) and information_ratio -0.50; this will be the binding test at deflation/holdout.

Backtest Review

Return distribution is heavily fat-tailed (kurtosis 1655, tail_ratio 0.086) because a few multi-month trends carry the bulk of PnL.

Analysis

Clean sensitivity surface: 0 cliff parameters, Sharpe flat ~0.42-0.44 across all ±20% variations

Analysis

Low drawdown (14-16%), reasonable trade count (30 base / 40 optimized), tail-safe sizing worked as designed (no blowup)

Analysis

Fails multiple-testing deflation decisively: DSR=0.0038 vs 0.95 bar; optimized Sharpe 0.459 BELOW the 0.9277 expected-max luck bar over 225 trials; is_significant=false; PBO=0.7354

Analysis

Forward holdout FAILED and is NEGATIVE: holdout_sharpe -0.156, ratio -0.422 vs WF-OOS 0.370

Analysis

Walk-forward is_overfitted=TRUE: avg IS 0.994 collapses to avg OOS 0.370 with one OOS window deeply negative (-0.863)

Analysis

Sharpe CI straddles 0 (ci_low -0.2427); base ci_low -0.3638

Analysis

Edge is a single-day 2021 outlier: 2021-05-11 +88.9% daily return, return_kurtosis 1655, skew 39.5, tail_ratio 0.086 (fat left tail masked by few large wins)

Analysis

information_ratio negative (-0.50 base / -0.45 optimized) — does not beat its own benchmark risk-adjusted

Analysis

Weekly regime gate did not add generalizing edge over the already-promoted single-timeframe BTC TS-momentum sibling

Outcome Summary

This strategy expressed the factory's validated BTC trend edge as a multi-timeframe construction, gating daily momentum entries on a weekly regime to cut whipsaw while holding leverage ≤1.5x for tail safety. The initial backtest passed review to optimize — 225% return, 30 well-balanced long/short trades, low 14% drawdown — but the analyst's numbers thinned under scrutiny: a modest 0.43 Sharpe with a CI straddling zero and returns dominated by a single +88.9% day in May 2021. After optimization, it failed multiple-testing deflation (DSR 0.0038, Sharpe below the best-of-225 luck bar, PBO 0.74) and, decisively, went negative on the forward holdout while the walk-forward tested as overfit. With no robust region above the luck bar to tune toward and the ground already covered by the promoted single-timeframe BTC book, it was abandoned on optimization attempt 1 rather than iterated.

Outcome Summary

Bolting a weekly regime gate onto the already-promoted single-timeframe daily BTC TS-momentum edge adds no generalizing signal — it reproduces the same single-name daily-trend deflation signature with the entire base return carried by one 2021 outlier day (kurtosis 1655).

Outcome Summary

The analyst abandoned it at the post-optimization ANALYZING stage: it failed deflated Sharpe (DSR 0.0038 vs 0.95 bar, optimized Sharpe 0.459 below the 225-trial luck bar of 0.9277, PBO 0.7354) and decisively failed the untouched forward holdout, which was negative (holdout_sharpe −0.156, ratio −0.422 vs 0.7 threshold).

Outcome Summary

A long-short BTCUSDT USD-M perpetual trend strategy that took daily EMA-spread momentum signals only when they aligned with a weekly higher-timeframe regime (weekly close vs 20-period MA), standing flat on disagreement, with ATR-based tail-safe sizing (leverage ≤1.5x).

Outcome Summary

The base backtest over ~2002 days produced a 225% total return, Sharpe 0.43 (CI −0.36 to 0.77), 30 trades (16 long/14 short) at a 50% win rate and 14% max drawdown; optimization lifted the headline to 268% return and Sharpe 0.46 across 40 trades, but the walk-forward was flagged is_overfitted (avg IS 0.99 → avg OOS 0.37, one OOS window −0.86).
Strategy report

Backtest and paper results are hypothetical. Trading involves risk of loss.