Skip to content

View original

HyperliquidRelativeMomentumPairsNeutral

Hypotheses

Hyperliquid ETH/BTC & SOL/BTC Relative-Momentum Pairs — Market-Neutral, Ride the RELATIVE Trend (Not Fade It): For Each Pair Go LONG the Outperformer / SHORT the Underperformer When Their Beta-Adjusted Ratio Is TRENDING, Flip When Relative Trend Reverses, Weekly Check (HYPERLIQUID Perps, Long-Short, 2-Parameter)

Hypotheses

A MARKET-NEUTRAL, MULTI-INSTRUMENT strategy that trades RELATIVE MOMENTUM between paired crypto majors on Hyperliquid perps — a small book of a few INDEPENDENT beta-neutral pair trades (ETH-vs-BTC, SOL-vs-BTC, SOL-vs-ETH), NOT a ranked cross-sectional basket and NOT a single-name trend. For each pair it computes the trailing `lookback`-day return SPREAD (return of leg A minus return of leg B) and, when that relative trend is clearly directional (|spread| beyond a vol-scaled dead-band), goes LONG the outperformer and SHORT the underperformer in BETA-ADJUSTED equal risk so the pair carries ~zero crypto beta — its P&L is the RELATIVE performance, not market direction. It RIDES the relative trend and flips when the relative trend reverses. This is deliberately the OPPOSITE SIGN of, and therefore distinct from, the dead BTC-ETH spread MEAN-REVERSION (that faded ratio deviations at 1H and had no fee-clearing edge; THIS follows the multi-week ratio trend, which is the documented persistent effect — 'ETH-season vs BTC-season' relative regimes trend for weeks-to-months). It is ALSO distinct from my pipeline items: NOT the HL cross-sectional momentum BASKET (that ranks N names and holds dollar-neutral deciles rebalanced weekly; THIS is a handful of specific, economically-motivated pair spreads, each traded on its own relative-trend sign — no ranking, no decile reconstitution); NOT single-name TSMOM (each position is a hedged SPREAD, market-neutral, whereas TSMOM is net-directional); NOT funding/carry/options. It fills the two largest bucket gaps at once — HYPERLIQUID venue (6.8% vs ≥20%) and long-short/market-neutral (14.2% vs 85.8% long-only) — plus pairs scope. It also directly answers the LINK-spot risk_reject lesson (94% bear drawdown): being beta-neutral, it has NO catastrophic long-only bear-market drawdown — in 2022 a beta-neutral relative book is roughly flat-to-positive, not −80%. L61 feed check: PURE OHLCV daily bars on BTC/ETH/SOL HL perps, which have FULL multi-year daily history (daily avoids the sub-hourly HL data-span trap; these three are the most-liquid HL perps so no data_unavailable risk). TIMEOUT-SAFETY: spreads are trailing returns from incrementally-updated rolling windows, O(1) per bar — no per-bar rescan/sort. FEE ARITHMETIC (checklist #1): relative ETH/BTC and SOL/BTC trends routinely run 10–30% over a multi-week regime; each captured relative leg is several % of notional versus a 2-leg HL round trip ≈ 0.09%×2 ≈ 0.18% — >10x the fee on realized legs. Relative-trend sign flips only a few times/yr per pair; 3 pairs × ~4 flips/yr × multi-year history ⇒ ~50–70 completed trades, above the measurability floor for walk-forward + holdout. Emphatically NOT a sub-fee fast-cadence mechanism.

Hypotheses

Implements the hypothesis exactly: relative-momentum (trend-following, NOT fading) on beta-adjusted pair spreads between Hyperliquid majors, with a vol-scaled dead-band, weekly cadence, and 2 core tunables (lookback_days, entry_z — both clamped in code with matching _param_bounds). Sign is deliberately opposite to ratio mean-reversion: it rides |spread| beyond the dead-band and flips only on reversal, giving roughly 4–12 flips/pair/year — several % of relative move per captured leg versus a ~0.18% two-leg Hyperliquid round trip, i.e. >10x the fee, and enough completed trades over the multi-year daily history for walk-forward + holdout. Venue is HYPERLIQUID futures (as specified): shorts are required, leverage > 1 is used, and BTCUSD/ETHUSD/SOLUSD all have full 1-DAY history in the catalog from 2020, so no data_unavailable and no sub-hourly HL span trap. Layer-3 safety: warmup is only 43 aligned daily bars inside a 365-day sandbox window, and with entry_z=0.8 the |z| gate fires for the majority of weeks, so entries occur within the first weeks; per-bar work is fixed-size numpy over deques (maxlen), no history rescan, so the 300s cap is not at risk. L59 (neutral books hitting -100%) is addressed structurally: legs are beta-hedged to ~zero net delta, gross is hard-capped independently of the equity path, and margin usage stays ~0.6× equity. One caveat worth flagging: SOL-ETH is linearly dependent on the other two spreads (SOL/ETH = SOL/BTC − ETH/BTC), so the three pairs are not statistically independent and the book effectively double-weights the SOL and ETH relative bets — the `pairs` parameter makes it trivial to drop that leg if the analyst prefers two orthogonal spreads; I implemented all three as the hypothesis specified.

Hypotheses

Losing strategy with its core premise falsified. total_return -47.6%, profit_factor 0.88 (<1.0), and avg_trade_return_pct -1.72% — negative expectancy, a hard disqualifier (L8). max_drawdown 63.7% (CI to 95.6%) triggers the >50%-DD hard abandon (L19) AND falsifies the 'beta-neutral / crisis-alpha, no bear drawdown' thesis: the book lost 39.7% in 2022. Sharpe 0.008 with CI straddling zero, IR -0.702. The wild return distribution (kurtosis 12, single weeks of +171%/-62%, avg_position_pct 44%) shows the supposedly zero-beta book is over-leveraged and not risk-controlled. Relative-trend-following on crypto-major ratios does not persist net of whipsaw/fees — not a tunable-parameter problem. Long-short major-perp basket class (L45, 0/84). Failure pattern: relative_momentum_pairs_negative_expectancy (PF<1.0, negative return, >50% DD, neutrality premise falsified).

Implementation

Market-neutral relative-momentum pairs book on Hyperliquid perps (BTCUSD, ETHUSD, SOLUSD; 1-DAY bars, pure OHLCV). Three independent pair spreads are traded — ETH-vs-BTC, SOL-vs-BTC, SOL-vs-ETH. For each pair it computes the trailing 42-day log-return spread s = log(A_t/A_{t-L}) - log(B_t/B_{t-L}) and normalises it by the realised vol of the daily spread return over the same window, giving a drift t-stat z = s / (sigma_daily * sqrt(L)). z is computed and returned every bar (continuous signal). On a calendar-anchored weekly check (days_since_epoch // 7 bucket change, derived from bar.ts_event — never a bar counter), each pair sets direction: z > +entry_z → LONG A / SHORT B, z < -entry_z → LONG B / SHORT A, inside the vol-scaled dead-band → hold prior direction (hysteresis), so the book rides the multi-week relative regime and only flips when relative trend reverses. The hedge leg is sized by the rolling OLS beta of A's daily returns on B's (clamped 0.5–2.0), so each pair holds +d·N on A and −d·N·beta on B and carries ~zero crypto beta. Because each of BTC/ETH/SOL appears in two pairs and the OMS nets, per-pair signed notionals are aggregated per instrument and one reconciler drives each instrument to its net target (close-then-open on a sign flip, 30% notional dead-band to avoid churn). Gross notional is hard-capped at 0.75 × equity × leverage; leverage 2.0 is consumed directly in sizing (equity × per_pair_pct × leverage), so gross runs ~1.2× equity with ~0.6× equity margin. Framework single-instrument auto-entry is disabled (should_enter → None); the whole book is driven from calculate_signal behind the base template's cross-leg alignment barrier so every spread uses contemporaneous same-timestamp closes.

Verification Results

Consider dropping the SOL/ETH leg (the `pairs` parameter makes this trivial) to trade two orthogonal spreads, or document that the third pair is intentionally redundant.

Verification Results

The SOL/ETH pair is linearly dependent on the other two: the log(SOL/ETH) spread equals log(SOL/BTC) spread minus log(ETH/BTC) spread. Trading all three pairs double-weights the SOL and ETH relative bets rather than adding an independent return source, so the book is not the 'three independent pair trades' the hypothesis frames. This is a design/attribution nuance, not a mislink — all three pairs are explicitly named in the hypothesis.

Verification Results

Route to analyst/backtest review for edge evaluation across full multi-year history and walk-forward.

Verification Results

Sandbox backtest over 364 days is net-negative: total_return -13.88%, Sharpe -0.325 (CI -2.08 to +1.22), PF 0.686, win_rate 0.375, avg_trade_return_pct -4.10% over 16 trades. This is NOT a code-defect signature (no 0.0 win rate / |Sharpe|>5 / PF 0.0 per L17), and per-trade moves clearly exceed fees, so the negative result reflects the relative-momentum edge failing in this window rather than a correctness bug. The relative-trend edge is unproven and the wide Sharpe CI straddles zero.

Verification Results

Confirm the full-history backtest yields >=~50-70 completed trades before spending optimization budget.

Verification Results

Low trade cadence: ~16 round-trips per 364-day window implies ~80-100 trades over a 5-6 year backtest — above the measurability floor but leaving limited statistical power for walk-forward + holdout, especially given the SOL/ETH redundancy reduces effective independent bets.

Backtest Review

Clean, timeout-safe multi-leg implementation with genuine beta-adjusted hedging, calendar-anchored rebalance and shared-leg netting

Backtest Review

Full multi-year daily HL history, no data-availability problem

Backtest Review

total_return -47.6% and profit_factor 0.88 (<1.0) — the strategy loses money, a hard disqualifier

Backtest Review

max_drawdown 63.7% (CI to 95.6%) directly falsifies the 'beta-neutral, no catastrophic bear drawdown' thesis: 2022 -39.7%

Backtest Review

Sharpe 0.008 with CI [-0.69, +0.65] — indistinguishable from zero; information_ratio -0.702

Backtest Review

Return distribution is wild (kurtosis 12.0; +171%/-62%/+74% single weeks) with avg_position_pct 44.3% — the 'neutral' book is over-leveraged and not risk-controlled

Backtest Review

avg_trade_return_pct -1.72%; only 86 trades — negative expectancy per trade

Backtest Review

Long-short major-perp basket class (L45, 0/84 survival)

Outcome Summary

HyperliquidRelativeMomentumPairsNeutral proposed a small book of beta-neutral pair trades on Hyperliquid majors — riding the multi-week relative trend of ETH/BTC, SOL/BTC, and SOL/ETH ratios and flipping when it reverses — pitched as the opposite sign of the dead BTC-ETH mean-reversion pair and as an answer to the LINK-spot bear-drawdown lesson via market-neutrality. The implementation was clean (genuine beta-adjusted hedging, shared-leg netting, timeout-safe), but it lost money: total_return -47.6%, PF 0.88, negative per-trade expectancy over 86 trades, a Sharpe indistinguishable from zero, and a 63.7% max drawdown that included a -39.7% 2022 loss directly falsifying its no-bear-drawdown thesis. The analyst abandoned it on the first iteration at the backtest_review gate as a losing, premise-falsified strategy in the 0/84-survival long-short major-perp basket class, not fixable by tuning. It never advanced to optimization, analysis, or risk review.

Outcome Summary

Beta-neutral construction and a low realized beta do not guarantee small drawdowns — an over-leveraged (44% avg position) relative-momentum pairs book still lost 39.7% in 2022 and 63.7% peak-to-trough, and relative-trend-following on crypto-major ratios does not survive whipsaw and fees, so the 'no catastrophic bear drawdown' promise must be verified, not assumed from neutrality.

Outcome Summary

It was abandoned at the pre-optimization backtest_review gate on iteration 1 as a losing strategy with its core premise falsified: negative expectancy (PF 0.88, avg_trade_return_pct -1.72%) is a hard disqualifier, the 63.7% max drawdown triggers the >50%-drawdown hard abandon and disproves the crisis-alpha/neutrality claim, and relative-trend-following on crypto-major ratios does not persist net of whipsaw and fees — a class problem (long-short major-perp basket, 0/84 survival), not a tunable one.

Outcome Summary

A market-neutral, multi-instrument relative-momentum pairs book on Hyperliquid perps (ETH/BTC, SOL/BTC, SOL/ETH) that measures each pair's trailing log-return spread normalized by spread volatility (a z-score), and when the relative trend is directional goes long the outperformer / short the underperformer in beta-adjusted equal risk, riding the multi-week relative regime and flipping when it reverses, with a weekly calendar check and two parameters (lookback days, entry z).

Outcome Summary

The strategy lost money: total_return -47.6%, profit_factor 0.88, avg_trade_return_pct -1.72% over 86 trades (negative expectancy), Sharpe 0.008 with a CI [-0.69, +0.65] indistinguishable from zero, and information_ratio -0.702. Its return distribution was wild (kurtosis 12.0, single weeks of +171%/-62%) with avg_position_pct 44.3%, and max_drawdown reached 63.7% (CI to 95.6%) — including a -39.7% loss in 2022 that directly falsified its 'beta-neutral, no bear drawdown' thesis, even though realized beta was low (0.01).
Strategy report

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