HyperliquidEthBtcRatioMomentumPair
Hypotheses
ETH-BTC Ratio Momentum Spread on Hyperliquid (4H, Long-Short Pair, Cross-Sectional Trend)
Hypotheses
Market-neutral cross-sectional momentum pair trade on Hyperliquid perpetuals capturing the persistent tendency of ETH and BTC to take turns leading the crypto market. Strategy trades the ETH/BTC RATIO (not absolute prices), going long ETHUSD.HYPERLIQUID + short BTCUSD.HYPERLIQUID when the ratio is trending up, and the inverse when it's trending down. This is a classic relative-strength factor trade that exists in equities (high-momentum vs low-momentum spread) and works in crypto because: (a) BTC dominance cycles between ~38–58% over months, (b) ETH ecosystem narratives (DeFi summers, L2 launches, ETF speculation) trigger multi-week ETH-relative outperformance, (c) macro de-risking events trigger BTC-relative outperformance (BTC = digital gold safe haven within crypto). The strategy is pure-Hyperliquid (both legs on HL), targeting the most under-represented venue quota (HYPERLIQUID at 4.1% vs 20% target). It is long-short (fills 9.3% vs ~45% target), pairs scope (fills 13.9%), and uses safe 4H bars on BTC+ETH — the deepest history on HL. Mechanism is fundamentally different from absolute-price trend (which fails on noise) because the spread between two highly correlated assets is much more mean-reverting around its momentum trend than either asset alone. NOT a classical chart pattern (avoids the 8+ pattern failures), NOT a cross-venue basis arb (already in pipeline as BtcInverseLinearBasisArbitrage and CrossVenueEthBasisArbitrage), NOT a single-asset directional strategy. Three parameters only (lookback, threshold, exit_band) to minimize overfitting risk after recurring frozen-signal / overfitting failures.
Hypotheses
Iteration 4 fix for the Layer-2 failure: `HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given`. Root cause: the Layer-2 verification proxy rebuilds the strategy by copying every callable onto a plain wrapper with `types.MethodType(val.__func__ if hasattr(val,'__func__') else val, wrapper)`; a `@staticmethod` (which lacks `__func__`) gets bound as if it were an instance method, injecting a phantom `self`, so a subsequent `self._ts(bar)` passes 2 args to a 1-arg function. The SMALLEST fix that permanently removes this failure mode is to move the bar-timestamp helper OUT of the class to a module-level function `_bar_ts_ns(bar)` — resolved from module globals, never subject to the proxy's method re-binding. The two former `self._ts(bar)` call sites (in `on_extra_bar` and `calculate_signal`) now call `_bar_ts_ns(bar)`. No other logic changed: the continuous log-ratio momentum signal, dollar-neutral paired execution (`_submit_entry`/`_submit_exit`), leverage-aware sizing, and all thresholds are identical to the previous version — preserving everything that already passed Layer 1. Verified locally: Layer 1 (static) passes and all 6 Layer-2 synthetic scenarios (steady_uptrend, steady_downtrend, flat_ranging, volatility_spike, zero_volume, price_gap) pass with no exception.
Hypotheses
Pre-optimization abandon: the ETH/BTC-ratio MOMENTUM pair has no edge and loses persistently net of Hyperliquid fees+impact — Sharpe -1.22, Sortino -2.06, total_return -69.8%, CAGR -45.5%, profit_factor 0.888, and NEGATIVE in every year (2024 -14.8%, 2025 -43.7%, 2026 -48.4%) with rolling Sharpe negative across almost the entire span. The implementation is sound (243 clean paired entries, both HL legs, dollar-neutral, no drops), so this is not a wiring/frozen-signal bug — the premise is wrong: as the hypothesis itself concedes, the ETH/BTC spread mean-reverts around its momentum trend, so a MOMENTUM entry is systematically whipsawed (win_rate 44.6%, expectancy -$154.8/trade). A Sharpe of -1.22 that is negative in all three years is not a cliff or window artifact that tuning the 3 momentum parameters (lookback/threshold/exit_band) can flip positive, and reversing to a mean-reversion signal would be a new hypothesis, not a parameter tweak — so it does not merit 2 hours of optimization. FAILURE PATTERN: cross-sectional MOMENTUM on the ETH/BTC log-ratio has no tradeable edge on 4H HL perps — the highly-correlated-major spread mean-reverts rather than trends, so momentum entries lose persistently across all regimes despite a clean, differentiated market-neutral implementation; the correct expression of any ETH/BTC-ratio edge would be mean-reversion, which is a separate hypothesis.
Implementation
Market-neutral cross-sectional momentum pair trade on Hyperliquid perpetuals. The decision variable is the log-ratio momentum of ETH/BTC (log(ETH/BTC)[now] - log(ETH/BTC)[lookback ago]), computed continuously every 4H bar via a timestamp-synchronized SyncedBuffer of both legs. When the ratio trends up beyond +threshold it goes long ETHUSD + short BTCUSD; when it trends down beyond -threshold it does the inverse. Legs are sized to equal USD notional (dollar-neutral, delta-neutral to BTC) using account equity x capital_fraction x leverage. Positions exit when momentum reverts back inside the neutral exit_band, and both legs are always opened and closed together so no naked single-asset exposure is held.
Verification Results
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['lookback', 'exit_band', 'threshold', 'min_notional', 'capital_fraction']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
- steady_downtrend: TypeError: HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
- flat_ranging: TypeError: HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
- volatility_spike: TypeError: HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
- zero_volume: TypeError: HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
- price_gap: TypeError: HyperliquidEthBtcRatioMomentumPair._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
Backtest Review
Clean, correctly-wired market-neutral pair: 243 paired entries, both HL legs, no size/notional/cash drops, dollar-neutral sizing
Backtest Review
Genuinely differentiated venue/scope (Hyperliquid long-short pair) and minimal 3-parameter signal to limit overfitting
Backtest Review
Sharpe -1.22 and Sortino -2.06 — deeply negative risk-adjusted return on a strategy whose benchmark is not meaningful, so absolute metrics govern
Backtest Review
Loses money outright and persistently: total_return -69.8%, CAGR -45.5%, profit_factor 0.888, negative in ALL three years (2024/2025/2026)
Backtest Review
Momentum-on-ratio premise appears directionally wrong: the ETH/BTC spread mean-reverts around its trend (per the hypothesis itself), so momentum entries get systematically whipsawed
Backtest Review
Positive months are fat-tailed spikes (kurtosis 71, skew 5.9; +32.5% May-2025 outlier) rather than a repeatable edge; probabilistic_sharpe 0.053
Backtest Review
Fee + impact drag ($38k commission + $25k impact) compounds a signal that has no gross edge
Analysis
Do NOT send to optimization — the base loses in all three years with Sharpe -1.22 and there is no positive region for the sweep to find. The mechanism is coded correctly but the SIGN is backwards. Your own hypothesis states the ETH/BTC spread is mean-reverting, yet should_enter() trades it as momentum (long ETH/short BTC when log-ratio momentum > +threshold, i.e. AFTER the ratio has already risen). A market-neutral pair that loses a symmetric -1.22 Sharpe across every regime is the textbook signature of an inverted entry. Two specific changes: (1) FLIP to mean-reversion — enter long-ETH/short-BTC when the ratio is stretched to the DOWNSIDE (momentum < -threshold or z-score below a band) expecting reversion, and the inverse when stretched up; exit as it reverts to the mean. Equivalently, invert the current BUY/SELL mapping and re-tune the exit_band. (2) CUT trade frequency hard — current turnover is 306x with ~$63k combined fee+impact; widen the entry threshold and/or add a minimum holding period so the mean-reversion edge is not eaten by two-leg round-trip costs. Re-backtest; if the reversed/lower-frequency variant still shows a negative or sub-cost edge, this premise should be abandoned (or escalated to revise_hypothesis).
Outcome Summary
HyperliquidEthBtcRatioMomentumPair was a differentiated, cleanly-built market-neutral pair trade on Hyperliquid 4H bars, going long/short ETH vs BTC on log-ratio momentum with just three signal parameters to limit overfitting. Despite sound wiring — 243 dollar-neutral paired entries with no size, notional, or cash drops — it lost money in every one of its three years, finishing at -69.8% total return with a Sharpe of -1.22 and profit factor 0.888. The analyst abandoned it at the pre-optimization backtest-review gate after iteration 4, concluding the premise itself was wrong rather than a tunable cliff. The takeaway: the ETH/BTC spread mean-reverts around its trend, so momentum entries are structurally whipsawed and the correct expression of any such edge would be mean-reversion, a separate hypothesis entirely.
Outcome Summary
The ETH/BTC log-ratio between two highly-correlated majors mean-reverts around its trend, so a momentum entry gets systematically whipsawed — any edge in that spread would need a mean-reversion expression, which is a new hypothesis, not a parameter tweak.
Outcome Summary
The analyst issued an 'abandon' verdict at the pre-optimization backtest-review gate: the implementation was clean (243 correctly-wired dollar-neutral paired entries, no drops), so the loss was judged a wrong premise rather than a bug, failing Sharpe, Sortino, total-return and profit-factor thresholds; optimization, analyst final review, and risk review were never reached.
Outcome Summary
A market-neutral Hyperliquid pair trade that went long ETH / short BTC (or the inverse) based on log-ratio momentum of the ETH/BTC spread, betting that BTC-dominance and ETH-narrative cycles make the spread trend more cleanly than either asset alone.
Outcome Summary
Over 695 days it lost persistently: total return -69.8%, CAGR -45.5%, Sharpe -1.22, Sortino -2.06, profit factor 0.888, win rate 44.6% across 486 trades (243 long / 243 short) with a 72.9% max drawdown. It was negative in every year (2024 -14.8%, 2025 -43.7%, 2026 -48.4%), with $38k commission plus $25k impact dragging on an already edge-less signal.
Iteration History
Verification failed (leverage_set_but_unused): config sets leverage=3.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.
Backtest and paper results are hypothetical. Trading involves risk of loss.