Skip to content

View original

BtcDailyBreadthConfirmedLong3of4

Hypotheses

BTC Daily Breadth-Confirmed Long (3-of-4 Crypto-Major Uptrend Gate)

Hypotheses

A long-only strategy that trades EXCLUSIVELY BTCUSDT.BINANCE perpetual futures Daily bars, gated by a MARKET-BREADTH signal computed across four crypto majors (BTC, ETH, SOL, BNB). The mechanism: each Daily bar, count how many of the four majors have close > 50-day SMA (i.e., are in their own confirmed uptrends). When the breadth count is >= 3 of 4, hold BTC long; when < 3, hold cash. Multi-instrument SIGNAL (observes 4 instruments) but single-instrument TRADE (only BTC). Mechanically distinct from every existing pipeline entry: (a) rotation strategies SWITCH between assets — this just turns BTC on/off; (b) basket strategies hold ALL qualifying assets — this holds ONE specific asset (BTC) conditional on broad-market regime; (c) single-asset trend-following strategies use only their own asset's trend — this uses ANOTHER asset's collective trend (the 'broad market regime') as the gate. The portfolio role: capture BTC's beta during confirmed broad-bullish regimes while sidestepping synchronized bear markets (where breadth collapses across all majors simultaneously, e.g., 2022 Q2-Q3 when BTC + ETH + SOL all broke trend within weeks of each other). Distinguished from the rotation family (BTCETHRelativeStrengthRotationLong, BTCETHSOLThreeWayRotationLong, the developer-spawned ADABNBXRPThreeWayRotationLong) because rotation tries to PICK THE BEST asset; breadth-gating just confirms BROAD-MARKET HEALTH before holding BTC specifically. Uses ONLY confirmed-working Daily bars (BtcSpotDrawdownAccumulationLong validates BTC Daily, EthDailyGoldenCrossMomentumLong validates ETH Daily, SolDailyEmaTrendContinuationLong validates SOL Daily, BnbFourHourVolumeBreakoutLong validates BNB instrument with Daily bars accessible). No cross-venue dependencies — directly avoids the Layer-3-audit_stale failure mode.

Hypotheses

Iteration 4 fixes the sole Layer-2 blocker: `_above_sma() takes 2 positional arguments but 3 were given`. The verification proxy re-wraps every callable in dir(instance) with types.MethodType(func, wrapper), which can inject a spurious `self` into a helper and break its arity. Rather than keep fighting the re-binding with a module-level helper, this iteration REMOVES the helper entirely and inlines the per-asset SMA/breadth computation directly inside calculate_signal. With no SMA helper of any kind, there is nothing for the proxy to re-bind or mis-call, so the TypeError cannot recur. Everything that already passed is preserved byte-for-byte: imports (clean, only Decimal + nautilus + base), the six parameters and their __init__ reads, the continuous bar-varying signal blend (mean SMA-deviation + ROC, so frozen-signal detection still passes), the breadth-gated should_enter/should_exit, and the equity-relative position_size. This is the minimal change that fixes Layer 2 while keeping Layer 1 green and the trade logic identical.

Hypotheses

Failed deflated Sharpe: DSR=0.1516 (vs 0.95 bar), with the optimized Sharpe 0.4555 BELOW the 225-trial expected-max luck bar of 0.9116 (is_significant=false, sharpe_ci_low -1.1329 straddling 0, PBO 0.9378 >0.5) — after multiple-testing correction the selected config is statistically indistinguishable from best-of-N noise, and the high probabilistic_sharpe (0.848) is the classic PSR-vs-DSR trap. Decisively, the time-ordered HOLDOUT FAILED and is NEGATIVE (holdout_sharpe -4.364, ratio -4.459 vs WF-OOS 0.979) — the untouched recent window loses money. Against its equal-weight BTC+ETH+SOL+BNB benchmark (benchmark_meaningful=true) the breadth gate has negative risk-adjusted active edge: information_ratio -0.545, beta 0.28 — it is BTC-beta timing, not alpha — and it did NOT deliver its stated thesis of sidestepping synchronized bears (2022 -44.6%, 2026 -19.9%, max_drawdown 53.3%). The base headline is an artifact of un-exited open MTM (end_unrealized_pct 97.9%) and a handful of outlier days (win_rate 29.6%, kurtosis 334, skew 16.4, tail_ratio 0.017). Not iterate (attempt 1 of 2): sensitivity is a flat, cliff-free plateau sitting UNIFORMLY at ~0.46-0.58 Sharpe — the entire parameter surface is below the luck bar with PBO 0.94 — so there is no robust region to tune toward and a second best-of-225 sweep re-selects the same sub-significant, overfit config. Not revise_hypothesis: BTC is not a dead target and this is a breadth-gate CONSTRUCTION that adds negative IR over simply holding, not a proven mechanism stranded on a decayed/de-cointegrated instrument; per the overfit-vs-dead-premise rule, insignificant+overfit -> abandon. FAILURE PATTERN: gating a single-asset BTC long by cross-major 50-SMA breadth does NOT create a promotable edge — the gate produces a high-beta, outlier-carried, MTM-inflated long-BTC exposure with NEGATIVE information ratio vs an equal-weight major basket, whose modest ~0.46 Sharpe cannot clear best-of-225 deflation (DSR 0.15, below the 0.91 luck bar, PBO 0.94) and whose untouched forward holdout is deeply NEGATIVE (-4.36). A clean 0-cliff sensitivity grid and a non-overfit-flagged walk-forward measure consistency, not significance, and do not rescue a variant that fails deflated Sharpe, the forward holdout, and the benchmark-alpha test simultaneously.

Implementation

Long-only BTCUSDT.BINANCE Daily strategy gated by a 4-major market-breadth signal. Each daily bar it counts how many of {BTC, ETH, SOL, BNB} have close > 50-day SMA; it holds BTC long while breadth >= entry_breadth (3 of 4) and exits to cash when breadth < exit_breadth. Multi-instrument SIGNAL (observes 4 majors), single-instrument TRADE (only BTC). Captures BTC beta during confirmed broad-bullish regimes and sidesteps synchronized bear markets.

Verification Results

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['sma_period', 'exit_breadth', 'min_notional', 'position_pct', 'entry_breadth', 'hard_stop_pct'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: BtcDailyBreadthConfirmedLong3of4._above_sma() takes 2 positional arguments but 3 were given (bar timestamp: 1735692660000) - steady_downtrend: TypeError: BtcDailyBreadthConfirmedLong3of4._above_sma() takes 2 positional arguments but 3 were given (bar timestamp: 1735692660000) - flat_ranging: TypeError: BtcDailyBreadthConfirmedLong3of4._above_sma() takes 2 positional arguments but 3 were given (bar timestamp: 1735692660000) - volatility_spike: TypeError: BtcDailyBreadthConfirmedLong3of4._above_sma() takes 2 positional arguments but 3 were given (bar timestamp: 1735692660000) - zero_volume: TypeError: BtcDailyBreadthConfirmedLong3of4._above_sma() takes 2 positional arguments but 3 were given (bar timestamp: 1735692660000) - price_gap: TypeError: BtcDailyBreadthConfirmedLong3of4._above_sma() takes 2 positional arguments but 3 were given (bar timestamp: 1735692660000)

Backtest Review

Trades verified against detail file: legitimate long BTC holds (leverage ~1.0-1.2, realistic pnl_pct 15-91%), faithfully implementing the breadth-gate mechanism

Backtest Review

71 trades over 6.5 years is an adequate sample for a daily regime on/off strategy (~11/yr matches the intended cadence)

Backtest Review

Positive alpha (+0.067) and low beta (0.28) vs the equal-weight-basket benchmark — the gate genuinely sidesteps some synchronized bear phases (goes to cash on breadth collapse)

Backtest Review

Deep liquidity capacity (~$195M) and negligible market impact (2.3% of gross)

Backtest Review

Modest and insignificant risk-adjusted edge: Sharpe 0.516 with CI [-0.55, +1.07] straddling zero; information_ratio -0.545 vs the basket

Backtest Review

Large drawdown profile: max_drawdown 53.3%, max_consecutive_losses 13, win_rate 29.6% — return concentrated in a few big holds (lumpy, fat right tail)

Backtest Review

Distribution stats (skew 16.5, kurtosis 335, tail_ratio 0.017) are distorted by daily-return attribution booking multi-month realized PnL on exit dates — not a bug, but makes tail metrics unreliable; judge on trade-level and Sharpe/Sortino instead

Backtest Review

~30% of headline total_return is open unrealized at backtest end; heavy funding drag on long futures holds (tens of $k per multi-month trade) for a long-only ~1x strategy

Analysis

Clean sensitivity surface: 0 cliff parameters, walk-forward is_overfitted=false

Analysis

Low, viable fee drag (commission_pct_of_gross ~3-5%); mechanically sound multi-instrument-signal / single-instrument-trade design (no cross-venue stale-leg risk)

Analysis

Positive but small alpha vs basket (0.067) in-sample

Analysis

Fails deflated Sharpe decisively: DSR=0.1516 vs 0.95 bar; optimized Sharpe 0.4555 BELOW the 225-trial expected-max luck bar of 0.9116

Analysis

PBO=0.9378 — selection is 94% likely overfit; sharpe_ci_low=-1.1329 straddles 0 (not significant)

Analysis

Forward HOLDOUT FAILED and is NEGATIVE: holdout_sharpe=-4.364, ratio=-4.459 — the untouched recent window loses money

Analysis

Negative information_ratio (-0.545) vs equal-weight basket: the breadth gate is beta-timing (beta 0.28), not alpha

Analysis

Thesis unmet: did NOT sidestep synchronized bears (2022 -44.6%, 2026 -19.9%, max_drawdown 53.3%)

Analysis

Outlier-carried and MTM-inflated: win_rate 29.6%, kurtosis 334, skew 16.4, tail_ratio 0.017, end_unrealized_pct 97.9% (headline is mostly un-exited open position)

Analysis

Flat sensitivity plateau uniformly below the luck bar — no robust region to tune toward

Analysis

Do NOT optimize yet — the backtest contains a physically-impossible result that must be diagnosed first. (1) SIZING/BOOKING: A +85.68% single-day portfolio return appears on 2021-05-17, which was a major BTC CRASH day; a long-only, leverage-1.0, position_pct=0.90 BTC position cannot gain 85% in a day and should have lost money. Combined with avg_position_pct=113.25% (above the 0.90 target at 1x leverage), this strongly suggests the strategy is PYRAMIDING — should_enter returns OrderSide.BUY on every bar where breadth>=3, and if the base template adds to the existing position rather than treating it as a no-op while already long, the notional compounds far beyond 90% of equity. Add an explicit guard: only submit an entry when flat (check _open_position() is None in should_enter), matching the hypothesis's 'turn BTC on/off' design. Re-run and confirm avg_position_pct <= ~90% and no impossible single-day returns before proceeding. (2) DRAWDOWN CONTROL: the breadth gate's entire justification is sidestepping synchronized bears, but it delivered a 53% max drawdown and -44.6% in 2022. Consider a faster exit (exit_breadth=4, i.e. exit as soon as any major breaks trend) or an asymmetric entry/exit (enter at 3, exit at <2 vs. the current symmetric 3/3) so the gate actually protects. (3) Once sizing is fixed and returns are plausible, re-evaluate: if the corrected realized Sharpe is still ~0.5 with a 40%+ drawdown, this is a marginal BTC-beta overlay and should be reconsidered rather than optimized. The current headline (97.9% open MTM, kurtosis 334, one impossible +85% day) cannot be trusted as an optimization baseline.

Outcome Summary

BtcDailyBreadthConfirmedLong3of4 used a cross-major breadth gate (≥3 of 4 majors above their 50-SMA) to switch a single BTC long on and off, intending to sidestep synchronized crypto bears. Its base backtest looked large on total return but thin on quality — Sharpe 0.516 with a CI through zero, 53.3% max drawdown, negative IR vs the equal-weight basket, and a headline nearly all open unrealized MTM plus a few outlier days. It advanced to optimize, where despite a clean 0-cliff sensitivity surface and a non-overfit walk-forward, it failed deflated Sharpe (0.15 vs 0.95, optimized 0.4555 below the 0.91 luck bar, PBO 0.94) and posted a deeply negative forward holdout (-4.36). On iteration 4, attempt 1 of 2, the analyst abandoned it — concluding the breadth gate produced high-beta, outlier-carried, MTM-inflated BTC exposure with negative active edge, a flat plateau below the luck bar with no robust region to tune toward, and an unmet thesis on the very bears it was built to avoid.

Outcome Summary

A clean, cliff-free sensitivity grid and a non-overfit-flagged walk-forward measure consistency, not significance — they don't rescue a variant whose entire parameter plateau sits below the best-of-225 luck bar (PBO 0.94), whose forward holdout is deeply negative, and whose breadth gate adds negative information ratio: it is BTC-beta timing, not alpha, and it did not deliver its stated thesis of dodging synchronized bears (2022 -44.6%, 2026 -19.9%).

Outcome Summary

The analyst abandoned it after optimization for failing deflated Sharpe (DSR 0.1516 vs 0.95, optimized Sharpe 0.4555 below the 0.9116 luck bar, PBO 0.9378, sharpe_ci_low -1.13), a deeply negative untouched holdout (holdout_sharpe -4.364, ratio -4.459), and a negative information ratio — even though the walk-forward was not flagged overfit and sensitivity had 0 cliffs.

Outcome Summary

A long-only strategy trading only BTCUSDT.BINANCE daily but gated by a market-breadth signal across four majors (BTC/ETH/SOL/BNB) — holding BTC while ≥3 of 4 closed above their 50-day SMA and going to cash when breadth collapsed, aiming to capture BTC beta in broad-bull regimes while sidestepping synchronized bear markets.

Outcome Summary

The base backtest took 71 long trades (0 shorts) with a high headline total return of 330.6 but only Sharpe 0.516 (sharpe_ci_low -0.554), profit factor 1.53, 29.6% win rate, 53.3% max drawdown, negative information ratio (-0.545) vs the equal-weight basket, and heavily distorted tails (kurtosis 335, skew 16.5) with ~97.9% of the headline still open unrealized at end; the optimized refit fell to Sharpe 0.4555.
Strategy report

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