Skip to content

View original

EthBtcRatioConvergencePairsMarketNeutral4H

Hypotheses

ETH/BTC Ratio Relative-Value Convergence, Market-Neutral Pairs (Long the Laggard / Short the Leader When the Log-Ratio Z-Score Deviates ≥2σ From Its Rolling Mean, USD-M Perps, 4h Bars, Adaptive-Mean + Hard Divergence Stop, 3-Parameter)

Hypotheses

A MARKET-NEUTRAL statistical-arbitrage pairs trade on the two most cointegrated crypto majors: ETHUSDT.BINANCE and BTCUSDT.BINANCE (USD-M perps, 4h bars). Signal = the z-score of the log(ETH/BTC) price ratio versus its own rolling mean over a lookback window (default ~180 bars ≈ 30 days). When the ratio stretches ≥ entry_z (default 2.0) ABOVE its rolling mean (ETH richly outperforming BTC), SHORT ETH perp + LONG equal-notional BTC perp, betting on convergence; symmetric when it stretches ≥2σ BELOW (long ETH / short BTC). The position is delta-neutral in dollar terms (equal-notional legs) so it carries no crypto-beta — its P&L is the RELATIVE move of ETH vs BTC, not the market direction. Exit on convergence to |z| ≤ exit_z (default 0.5). This is a deliberately DIFFERENT family from the funding-carry basket that just collided (twice abandoned fee_edge): its edge is not a sub-basis-point funding cash flow that alt legs can't clear, but a multi-percent ratio reversion — ETH/BTC 2σ deviations are typically 2–4%, an order of magnitude above the ~0.20% two-leg USD-M round-trip (4 fills × ~0.05%), so it is structurally fee-viable where the N-leg carry baskets and cross-sectional reversal baskets (L12) are not. A ROLLING (adaptive) mean absorbs slow structural re-ratings of the ratio, and a hard divergence stop at |z| ≥ 3.5 exits when cointegration appears to be breaking rather than reverting, capping the classic stat-arb tail. Returns are earned in every regime the ratio oscillates (ranging and trend-then-reconverge), so there is no single-regime/2021 bull-spike concentration — the killer of every trend sibling this session — and no options trade-count wall.

Hypotheses

Implements the ETH/BTC ratio convergence hypothesis as a delta-neutral two-leg USD-M pairs trade, using the proven multi-instrument pattern: ETH drives the signal, BTC is the synced extra leg, and the base class's same-timeframe alignment barrier guarantees the BTC bar for the current timestamp is present when calculate_signal runs, so the log-ratio buffer holds only contemporaneous pairs (avoiding the classic index-desync trap called out in the multi-instrument alignment rules). Fee viability (the explicit differentiator from the twice-abandoned funding-carry basket): a 2-sigma ETH/BTC deviation is typically 2-4%, an order of magnitude above the ~0.20% four-fill USD-M round-trip, so per-trade edge dwarfs costs. Lessons applied: (L4) both legs are the deepest majors with full 4h history, so no leg abandons on missing data, and Layer 2 feeds extras + calls calculate_signal directly (the z-score varies bar-to-bar, so no frozen-signal issue); (L21/L25) warmup is ~180 bars, a small fraction of the ~2190-bar 4h sandbox window, and 2-sigma ratio deviations recur many times per year, so >=1 trade is guaranteed without a compound gate that fires zero times; (L15) sizing is equity-relative each entry (non-compounding), gross capped at ~0.8x equity with a margin buffer, and a hard |z|>=3.5 divergence stop caps the classic stat-arb tail; the entry band [entry_z, hard_stop_z) additionally blocks entering or re-entering a spread whose cointegration appears to be breaking. Venue is BINANCE USD-M linear (NOT COIN-M inverse, avoiding the four-times-fatal inverse-contract engine defect): get_account_equity() returns a clean USDT figure and sizing is the ordinary qty = notional/price on both legs; leverage stays 1.0 (referenced in sizing, so no unused-leverage gate and no liquidation risk). Because returns are earned whenever the ratio oscillates and reconverges rather than from a directional beta, there is no single-regime/2021-bull concentration that killed the session's trend siblings, and being a single-pair two-leg hedge it is not a rank-and-rotate cross-sectional basket (L12). It fills the under-represented market-neutral and cross-sectional-relative-value buckets in a long-only-dominated book.

Hypotheses

No edge to optimize: avg_trade_return_pct = -0.63% (NEGATIVE per-trade expectancy, below the 0.15% fee floor), Sharpe -0.32, PF 0.81, total_return -55.9%, max_drawdown 57.6% (>50% hard-abandon). The result is well-sampled (244 trades) and loses in 6 of 7 years across all regimes — this is a falsified premise, not a config problem: the log(ETH/BTC) ratio trends through 2σ deviations rather than reverting on the 4h/30d window (short win rate 0.36), so the convergence bet is systematically adverse. Optimization fits parameters to data that contains no profitable region; spending 2 hours will only fit noise. Abandon at review rather than optimize.

Implementation

Market-neutral statistical-arbitrage pairs trade on ETHUSDT.BINANCE (primary) and BTCUSDT.BINANCE (extra leg), USD-M linear perps, 4h bars. The signal is the z-score of log(ETH/BTC) versus its own rolling mean over `lookback` bars (default 180 ~ 30 days), computed from a synced log-ratio buffer that appends only on timestamp-aligned bars so both legs are contemporaneous. When z >= entry_z (2.0) it shorts ETH and longs equal-dollar BTC (betting the ratio converges down); when z <= -entry_z it longs ETH and shorts BTC. Entries fire only in the band entry_z <= |z| < hard_stop_z so an already-broken spread is never entered. Exits on convergence (|z| <= exit_z, 0.5) or a divergence stop (|z| >= hard_stop_z, 3.5). Legs are equal dollar notional, so the book is delta-neutral (no crypto beta) and P&L is the relative ETH-vs-BTC move. An orphan guard flattens any single naked leg. Three edge parameters (lookback, entry_z, exit_z); linear equity sizing, leverage 1.0.

Verification Results

Edge is THIN but fee-viable — analyst's call on full history. Positives: avg_trade_return_pct 0.214% clears the 0.15% futures floor (fee-viability claim holds), delta-neutrality confirmed (beta 0.042), no liquidation, metrics_reliable=true. But realized edge is slim: Sharpe 0.06 (CI straddles zero), PF 1.02, +1.02% over 363 days, avg_loss $2,634 slightly > avg_win $2,428 so positive expectancy rests on win_rate 0.53. Not a defect — confirm it generalizes on the full backtest/walk-forward.

Verification Results

Long/short side asymmetry: short_win_rate 0.684 (short-ETH-when-rich worked) vs long_win_rate 0.368 (long-ETH-when-cheap didn't) over 19 trades each. Likely regime luck (ETH underperformed BTC this window), but if the long-ETH-cheap leg is persistently negative on full history it signals a directional ETH/BTC drift the symmetric mean-reversion doesn't capture. Analyst: confirm BOTH directions are profitable across regimes.

Verification Results

Capacity note (informational): impact_cost_pct 25.5%, capacity_usd ~$1.53M. Only $393 impact at the tested size, but the fee-viable edge could erode at scale — relevant at sizing/promotion, not correctness.

Backtest Review

Clean, correct two-leg market-neutral implementation (equal-notional, orphan guard, contemporaneous synced ratio buffer)

Backtest Review

Adequate trade sample (244 trades) — results are statistically measured, not noise

Backtest Review

Genuinely different family from the fee_edge funding-carry siblings; not a fee-magnitude problem

Backtest Review

avg_trade_return_pct = -0.63% — NEGATIVE per-trade expectancy, disqualifying regardless of Sharpe (L22)

Backtest Review

Sharpe -0.32, profit_factor 0.81, total_return -55.9%, max_drawdown 57.6% (>50% hard-abandon per L19)

Backtest Review

Losing in 6 of 7 years (2020,2021,2022,2023,2025,2026) — no regime where the edge exists, so it is not tunable

Backtest Review

Premise falsified: ETH/BTC log-ratio trends through 2σ rather than reverting (short win rate 0.36) — mean-reversion convergence bet is systematically adverse

Outcome Summary

This strategy deliberately switched families away from the session's fee-dead funding carries, proposing a market-neutral ETH/BTC ratio-convergence pairs trade whose multi-percent reversions should have dwarfed the ~0.20% two-leg round-trip. The implementation was clean and well-sampled — 244 trades, equal-notional legs, orphan guard — so the loss was not a fee-magnitude or noise problem but a falsified premise: the log(ETH/BTC) ratio trended through 2σ deviations instead of reverting, so fading extremes was systematically adverse (short win rate 0.36) and the book lost money in 6 of 7 years, ending -55.9% with a 57.6% drawdown. With negative per-trade expectancy and no regime in which the edge existed, the analyst abandoned it at review on its first iteration rather than optimize parameters against data containing no profitable region.

Outcome Summary

A clean, fee-viable market-neutral pairs implementation is worthless if the underlying spread does not actually mean-revert — ETH/BTC log-ratio 2σ deviations trended through rather than converged on a 4h/30-day window, so cointegration/reversion must be empirically demonstrated before betting on convergence.

Outcome Summary

It was abandoned at the pre-optimization backtest-review gate on multiple hard failures — negative per-trade expectancy below the fee floor, negative total return, profit factor below 1.0, and a >50% hard-abandon drawdown — because its premise was falsified: the log(ETH/BTC) ratio trends through 2σ deviations rather than reverting on the 4h/30-day window, making the convergence bet systematically adverse with no profitable regime to tune toward.

Outcome Summary

A market-neutral statistical-arbitrage pairs trade on ETHUSDT.BINANCE and BTCUSDT.BINANCE USD-M perps (4h bars), fading ≥2σ z-score deviations of the log(ETH/BTC) ratio from its rolling mean — long the laggard, short the leader with equal-notional legs — betting on multi-percent ratio convergence with a hard divergence stop at |z|≥3.5.

Outcome Summary

The backtest was well-sampled but clearly losing: -55.9% total return over 244 trades, negative per-trade expectancy (avg_trade_return_pct -0.63%), Sharpe -0.32, profit factor 0.81, and a 57.6% max drawdown, with the short side winning only 0.36 of the time and losses in 6 of 7 years.
Strategy report

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