EthBtcRatioZScoreMeanReversionPairsMidTerm4H
Hypotheses
ETH/BTC Ratio Mean Reversion (Z-Score)
Hypotheses
Mid-term mean reversion strategy on the ETH/BTC ratio traded as a synthetic pair on Binance USD-M Futures. On 4h bars, compute ratio = ETHUSDT_close / BTCUSDT_close, then a 20-period rolling z-score. Entry: z > +2.0 → SHORT ETHUSDT + LONG BTCUSDT (equal USD notional per leg); z < -2.0 → LONG ETHUSDT + SHORT BTCUSDT. Exit: |z| < 0.5 (mean reversion target), |z| > 3.5 (regime-break stop), or 7-day time stop. Uses extra_instruments=['BTCUSDT-PERP.BINANCE'] so on_extra_bar() caches the latest BTC close for ratio computation on every ETH bar. Position sizing relative to account equity with 1-2x leverage. Edge: cointegration-style mean reversion in the most liquid crypto pair. Risks: alt-season trend regimes break the mean, funding-rate divergence between legs erodes PnL, double-fee drag (~0.20% round-trip total) requires avg trade return > 0.30% to be viable.
Hypotheses
Implements the ETH/BTC ratio z-score mean reversion as a synthetic pair. BTC is configured as a SAME-4H-timeframe extra leg so the base class's cross-leg alignment barrier defers primary processing until the contemporaneous BTC bar arrives -- the z-score and fills use same-timestamp prices, avoiding the phantom-basis bug from a stale T-1 hedge leg. The ratio is stored in a single synced buffer (one append per processed primary bar) so the rolling mean/std stay index-aligned, per the multi-instrument alignment rule. Because the base template only submits the primary leg, the BTC hedge is submitted as a side effect in should_enter and closed in should_exit so both legs move together; equal 40%-equity notional per leg makes the position dollar-neutral with ~80% gross exposure, so leverage stays 1.0 (the leverage_set_but_unused gate does not trigger) while still deploying capital. The exit band is the core of the edge: |z|<0.5 banks the bulk of the reversion, |z|>3.5 is the regime-break stop that defends against the alt-season trend (the stated #1 risk), and the 7-day time stop bounds funding/fee drag. calculate_signal returns the continuous z-score in natural units and thresholds compare in matching z-units, never clipped. Venue is BINANCE USD-M futures because the strategy shorts one leg; BTCUSDT.BINANCE is the correct tradable perp symbol (the hypothesis's 'BTCUSDT-PERP.BINANCE' is not a valid catalog id). Round-trip ~0.20% on two legs is covered by 2-sigma ratio reversions targeting >0.30% avg trade return.
Hypotheses
The ETH/BTC ratio z-score mean-reversion premise is empirically refuted (again): the strategy is a consistent, catastrophic loser with Sharpe -1.23 (CI entirely negative), profit_factor 0.831, total_return -70.9%, expectancy -$62.8/trade, PSR 0.0024, and a 73.1% max drawdown — losing money in EVERY one of the 7 years (2020 -42.4% through 2026 -0.8%) with rolling Sharpe pinned negative throughout. Judged on absolute metrics (benchmark_meaningful=FALSE for a market-neutral pair). The code is implemented correctly (552 paired dollar-neutral entries, 0 dropped, cross-leg alignment barrier) and the sample is ample, so this is a sign-wrong edge, not a bug: the symptom (consistent losses on both legs across all regimes from a fade-the-deviation rule) is consistent with the ETH/BTC log-ratio TRENDING rather than mean-reverting at the 20-bar/4H scale, so shorting the rich ratio and longing the cheap ratio systematically fights a persistent trend (likely cause, stated as symptom not a verified data claim). This is a near-duplicate of an ETH/BTC ratio z-score reversion strategy already abandoned this session for the same reason. Not optimize: no lookback/z-threshold tuning flips a systematically-losing fade with Sharpe -1.23 and every year negative into a winner. Not iterate: the code correctly implements the premise; the only 'fix' is to invert the signal into a ratio-momentum trade, which is a different hypothesis. Not worth 2 hours. FAILURE PATTERN: z-score mean-reversion on the ETH/BTC log-ratio at 4H produces regime-agnostic LOSSES (Sharpe -1.23, PF 0.83, -71% total, 73% DD, every year negative) because the ratio is non-stationary/trending at this scale rather than mean-reverting — fading 2-sigma deviations of a trending crypto-major spread is a systematically-losing trade that the dollar-neutral structure does not rescue; relative-value reversion requires a genuinely cointegrated/stationary spread, which ETH/BTC is not at a 20-bar 4H lookback. This is the second ETH/BTC ratio reversion variant to fail identically this session.
Implementation
Dollar-neutral ETH/BTC ratio z-score mean reversion on Binance USD-M perpetuals, 4H bars. Primary leg ETHUSDT.BINANCE, hedge leg BTCUSDT.BINANCE. Each aligned 4H close computes ratio = ETH/BTC, a 20-bar rolling mean/std, and z = (ratio-mu)/sigma. z >= +2 goes SHORT ETH + LONG BTC; z <= -2 goes LONG ETH + SHORT BTC, equal 40%-equity USD notional per leg (dollar-neutral, ~80% gross). Exits when |z| reverts to <= 0.5 (target), |z| >= 3.5 (regime-break stop), after a 42-bar (7-day) time stop, or a 15% per-leg drawdown. The signal is the continuous z-score (varies every bar); should_enter/exit threshold it in z-units. leverage 1.0.
Backtest Review
Implemented correctly: 552 paired dollar-neutral entries, 0 dropped, cross-leg alignment barrier used — no code bug or sparsity issue
Backtest Review
Catastrophic, consistent loss: Sharpe -1.23 (CI -2.10 to -0.37, entirely negative), profit_factor 0.831, total_return -70.9%, expectancy -$62.8/trade, omega 0.65, PSR 0.0024
Backtest Review
Loses in EVERY year (2020 -42.4% through 2026 -0.8%), rolling Sharpe negative throughout — a sign-wrong signal across all regimes
Backtest Review
Severe risk: max_drawdown 73.1% (CI to 87%), max_drawdown_duration ~2358 days, Sortino -1.11
Backtest Review
Near-duplicate of an ETH/BTC ratio z-score reversion strategy already abandoned this session — same refuted premise (the ratio trends, it does not mean-revert at a 20-bar 4H lookback)
Outcome Summary
This strategy bet the ETH/BTC ratio mean-reverts, fading 2-sigma z-score deviations as a dollar-neutral ETH-vs-BTC pair on 4H bars. The implementation was clean — 552 paired entries, none dropped, with proper same-timestamp cross-leg alignment — but the result was catastrophic and regime-agnostic: Sharpe -1.23, profit factor 0.83, -70.9% total, a 73% drawdown, and a loss in every single year. The analyst abandoned it before optimization, concluding the premise is simply backwards — the ETH/BTC ratio trends rather than reverts at this scale, so fading it fights a persistent trend on both legs. Notably it was the second identical ETH/BTC ratio-reversion variant to fail this way in the same session, reinforcing that the spread is non-stationary at a 20-bar 4H lookback.
Outcome Summary
Relative-value z-score reversion requires a genuinely cointegrated/stationary spread, which ETH/BTC is not at a 20-bar 4H lookback — fading deviations of a trending crypto-major ratio is a regime-agnostic losing trade that the dollar-neutral structure does not rescue, and no lookback/threshold tuning flips it short of inverting it into a ratio-momentum trade (a different hypothesis).
Outcome Summary
The analyst abandoned it at backtest review as an empirically refuted, sign-wrong premise rather than a bug — the code traded exactly as specified across an ample sample, but fading 2-sigma deviations loses systematically because the ETH/BTC log-ratio trends (is non-stationary) at a 20-bar/4H scale rather than mean-reverting, so the strategy continually fights a persistent trend; it was also a near-duplicate of an ETH/BTC ratio reversion variant already abandoned this session for the same reason.
Outcome Summary
A dollar-neutral long-short pairs strategy on the ETH/BTC ratio traded as a synthetic pair on Binance USD-M 4H futures (pure OHLCV), computing a 20-period rolling z-score of ETH/BTC and fading 2-sigma deviations — shorting ETH + longing BTC when the ratio was rich, longing ETH + shorting BTC when cheap — with exits on mean reversion (|z|<0.5), a regime-break stop, a 7-day time stop, and a per-leg emergency stop.
Outcome Summary
Over a 1,104-trade sample (552 paired dollar-neutral entries, none dropped, with a cross-leg alignment barrier) it was a consistent, catastrophic loser: Sharpe -1.23 (CI -2.10 to -0.37, entirely negative), profit factor 0.831, total return -70.9%, expectancy -$62.8/trade, PSR 0.0024, Sortino -1.11, and a 73.1% max drawdown (CI to 87%), losing money in every one of the seven years with rolling Sharpe negative throughout.
Backtest and paper results are hypothetical. Trading involves risk of loss.