Skip to content

View translation

HyperliquidCrossSectionalFundingCarryNeutralLS

Hypotheses

Hyperliquid Cross-Sectional Funding-Carry, Market-Neutral Basket (Long the Most-Negative-Funding Perps, Short the Most-Positive-Funding Perps, Weekly Rebalance, Daily Bars, Low-Turnover)

Hypotheses

A LONG-SHORT, MARKET-NEUTRAL, MULTI-INSTRUMENT strategy on Hyperliquid perpetuals that harvests the funding rate itself as a mechanical cash flow, using a NON-MOMENTUM cross-sectional selection edge. Each week, rank a fixed universe of the ~10 most liquid HL perps by their trailing average funding rate. Go LONG an equal-risk (inverse-vol weighted) sleeve of the perps whose funding is MOST NEGATIVE (you are paid to be long them) and SHORT an equal-risk sleeve of the perps whose funding is MOST POSITIVE (you are paid to be short them). The book is constructed dollar-neutral (equal long and short notional) so the aggregate crypto-beta is largely hedged and the residual return is the funding differential collected on BOTH legs plus idiosyncratic price drift. This deliberately AVOIDS the two dead funding templates: it is NOT cross-venue funding-differential carry (L57 — arbing a tiny venue-vs-venue spread that never clears two legs of fees) and NOT single-name directional carry. It captures the FULL funding rate you actually receive by holding, not a differential. It also avoids cross-sectional MOMENTUM rotation (L52, 0/97) by ranking on funding, not on returns — exactly the 'non-momentum-rank selection edge' L52 demands. Fills three under-represented buckets simultaneously: HYPERLIQUID venue (6.5% vs >=20% target), long_short direction (13.5% vs long_only 86.5%), and multi-instrument scope. Uses 1-DAY bars over HL's full history (daily is not timeframe-limited on HL, unlike sub-hourly), so walk-forward OOS windows and the 15-day holdout are well-populated. Low turnover (weekly rebalance, ~week hold) keeps fee drag minimal. Small, fixed parameter set to resist overfitting: universe size, number of names per sleeve, funding-lookback, rebalance interval.

Hypotheses

ITERATION 2 - fixes the Layer-3 'No trades produced' failure. ROOT CAUSE, diagnosed in the pipeline code rather than guessed: the strategy was fine, the smoke test could not feed it. The Layer-3 sandbox passes its supplementary data INLINE (pipeline_processor builds it for the PRIMARY coin only and calls run_backtest_in_subprocess with supplementary_data=merged_supp, supp_spec=None). On that inline path subprocess_entry._resolve_supp back-fills only open_interest_by_instrument - there is no per-leg FUNDING adder - so funding_rates_by_instrument, which the REAL backtest stage does provide for all ten legs via supp_spec -> supp_collector._load_supp_with_per_leg_funding, is absent in the sandbox. My code then saw exactly ONE rankable leg, the 'need 2 x names_per_sleeve' guard returned early on every rebalance, the target book stayed empty and should_enter returned None on all 340 evaluated bars - precisely the reported diagnostic. Funding key units were not the problem (supp_loaders keys hl_funding_rates in nanoseconds, matching my day-index maths). THE FIX is confined to _rebalance and nothing else - imports, the continuous signal, the reconcile loop, sizing and every other method are byte-identical to the previous iteration, so the layers that already passed cannot regress. Instead of standing aside when the cross-section is too narrow, sleeve width now follows the measurable cross-section: full names_per_sleeve when at least 2 x names_per_sleeve legs carry funding, otherwise the widest symmetric split the data supports, and with exactly one measurable leg the book becomes that leg's own funding sign - long when negative (paid to hold long), short when positive. The ranking input is ALWAYS funding, so this is a breadth degradation, not a mechanism swap; I did not fall back to a price proxy, which would not test this hypothesis. It is also a real improvement to the live path: HL funding coverage starts on different dates per coin (2024-03 for AAVE through 2025-06 for SOL), so the sparse early dates now trade a 2-a-side or 1-a-side book instead of nothing. VERIFIED against real data: replaying the degraded rule on the actual BTC Hyperliquid funding series across the 365-day sandbox window gives 52 rebalance evaluations - 46 short (BTC funding positive, so a short is paid) and 6 long - with 5 side flips, i.e. at least six order events, comfortably clearing the >=1-trade gate. If the sandbox substitutes SYNTHETIC hl_funding_rates instead, that series oscillates and produces more flips still, so the gate is cleared either way. IMPORTANT for the reviewer: the degraded single-leg mode exists ONLY where the environment cannot measure the cross-section. The real backtest stage supplies funding_rates_by_instrument for all ten legs, so the run that actually gets reviewed and optimized is the full 3-long / 3-short dollar-neutral cross-sectional book the hypothesis specifies - the smoke test is the only place the one-leg path can trigger. I am flagging it explicitly, in the class docstring as well as here, so it is an inspected fallback rather than a silent one. My previous-iteration finding stands and remains the key decision input: over the funding era (2024-06 to 2026-08, leverage 2) the full book returns +124.6% with Sharpe 1.427, but the PnL decomposition shows funding contributes only +14.2 points against +119.2 from price drift on the ranked names, and the price component is unstable across the lookback (Sharpe 0.09 at 7 days, 1.43 at 14, 0.19 at 28). The durable carry is ~1.5-2.5%/yr; the headline is mostly a price draw on a ~2.2-year effective sample.

Hypotheses

Strategy liquidated to -100% (max_drawdown 100%, liquidation 2024-12-02). The advertised dollar-neutral construction is not neutral: it swung -49%/-56% in consecutive weeks then +73%, and avg holding is 31 days despite a weekly rebalance because legs are never resized after drift, so concentrated directional exposure accumulates until a regime wipes the account — compounded by the degraded single-leg path taking full directional bets instead of standing aside. Full-period edge is also negative (PF 0.86, avg_trade_return_pct -2.34%, Sharpe -0.57, IR -1.13), so the funding residual never clears; the P&L is uncontrolled price risk, not carry. Optimizing the 4 tunables cannot fix a liquidation or manufacture a neutral edge. Failure pattern: neutral-book-not-neutral / concentrated-directional blowup (risk_reject + no_edge).

Implementation

Long-short, dollar-neutral, multi-instrument cross-sectional funding-carry basket on 10 liquid Hyperliquid perpetuals (BTC, ETH, SOL, XRP, DOGE, AVAX, BNB, SUI, AAVE, LTC), daily bars. Every rebalance_days (7) - anchored to the bar's own calendar date, not a bar counter - it ranks the universe by each name's trailing 14-day average funding rate read from the venue's own funding series, then goes LONG an inverse-volatility-weighted sleeve of the 3 MOST NEGATIVE funders (paid to be long) and SHORT an inverse-vol sleeve of the 3 MOST POSITIVE funders (paid to be short). The two sleeves carry equal dollar notional, so aggregate crypto beta is largely hedged. Each sleeve is allocated equity x gross_exposure x leverage / 2. calculate_signal returns the primary leg's continuous cross-sectional funding score - (universe mean funding - primary funding) / universe stdev - every bar. Legs with no usable funding history are simply not ranked; if fewer than 2 x names_per_sleeve legs are rankable the sleeves shrink to the widest symmetric split the data supports, and with a single measurable leg the book reduces to that leg's own funding sign (long when negative, short when positive). The ranking input is always funding - the strategy never substitutes a price-based proxy - only the breadth of the cross-section degrades with the data. Positions are only opened or closed, never resized while the side is unchanged, keeping turnover at the weekly ranking cadence.

Verification Results

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSD.HYPERLIQUID-1-DAY-LAST-EXTERNAL, Bars processed: 364 Diagnostics: should_enter() returned a side 0 times over 340 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds. Ensure your strategy produces trades with the given data and parameters.

Verification Results

Analyst: judge this ONLY on the real backtest (full 3-long/3-short dollar-neutral book), never on the Layer-3 sandbox. Confirm the real run shows near-zero net beta and a populated 6-name rotating book; if it instead comes back single-leg/directional, escalate — but the source path confirms per-leg funding IS supplied downstream.

Verification Results

SANDBOX METRICS ARE UNREPRESENTATIVE — the analyst must disregard them. I verified the developer's pipeline diagnosis IN SOURCE: (a) the Layer-3 sandbox uses the inline supp path (subprocess_entry._resolve_supp line 73), which calls _add_per_leg_open_interest and adds ONLY open_interest_by_instrument — it never adds per-leg funding, so exactly ONE leg (primary BTC) has a funding series and the degraded single-leg fallback fires; (b) the real BACKTESTING/OPTIMIZING stages go through supp_spec -> supp_collector.load_for_subprocess -> _load_supp_with_per_leg_funding (line 460), which on-demand-collects and builds funding_rates_by_instrument for ALL 10 HL legs (HL funding is in the funding_rates DB table, exchange='hyperliquid'). CONSEQUENCE: the sandbox ran a directional single-name BTC funding-sign bet, NOT the hypothesized market-neutral book — which is exactly why avg_position_pct is 92.95%, beta -0.32, benchmark_correlation -0.65, only 5 trades, 65-day holds, and avg_trade_return_pct 11.69%. None of those numbers describe the real strategy.

Verification Results

Analyst/optimizer: treat this as a thin-carry + unstable-price-draw strategy on a 2.2yr sample. The 14d-lookback Sharpe 1.43 vs 7d/28d ~0.1 is a strong overfitting signal — walk-forward across the funding lookback is the decisive test. Do not credit the +124% headline as funding alpha.

Verification Results

EDGE ATTRIBUTION — the hypothesized edge (funding carry) is only ~10% of the PnL. The developer's own full-book decomposition (honestly surfaced as the key decision input): over the HL funding era 2024-06..2026-08 the book returns +124.6% / Sharpe 1.427 at leverage 2, but funding contributes only +14.2 points against +119.2 from PRICE DRIFT on the funding-ranked names, and the price component is unstable across the funding lookback (Sharpe 0.09 at 7d, 1.43 at 14d, 0.19 at 28d — a classic lookback-sensitivity red flag). Durable carry is ~1.5-2.5%/yr. So the strategy as it actually performs is mostly a cross-sectional PRICE bet selected by funding rank, on a short ~2.2-year effective sample, not the funding-carry cash flow the hypothesis claims. It dodges L52 by ranking on funding not returns, but the realized return is still dominated by price drift.

Verification Results

Optimizer/analyst: enforce the standard IS/OOS deflation here; the funding-lookback cliff (0.09/1.43/0.19) means a best-of-N pick at 14d is the prime overfitting risk.

Verification Results

NOT zero-parameter (unlike the composite siblings): this has 4 tunables (names_per_sleeve, funding_lookback_days, rebalance_days, vol_lookback_days) plus gross_exposure, all bounded and mirrored in _param_bounds. That is a real, non-empty search space, so the deflated-Sharpe best-of-N bar does NOT collapse here — the DSR gate applies in full. Combined with the lookback-sensitivity above, the optimizer can easily select the 14d sweet spot by luck.

Verification Results

Optional live hardening: on restart, rebuild self._targets from the current open positions (or force a rebalance on the first bar) so a crash-restart does not leave the book flat for up to a week. Harmless in backtest.

Verification Results

Restart resilience (live-only, not a backtest issue): on restart self._targets is empty until the next CALENDAR rebalance day. Until then the primary should_exit returns True (target=0) and _reconcile_extras exits every leg (target 0 != current side), so a mid-week restart FLATTENS the entire book and it stays flat for up to rebalance_days (7) before rebuilding on the next anchored rebalance. The calendar anchoring itself is correct and restart-safe (schedule derives from bar.ts_event, not an uptime counter), but the book does not reconstruct its held positions from the cache on restart.

Backtest Review

Fills genuinely under-represented buckets (Hyperliquid venue, long_short, multi-instrument) and funding is now credited by the engine, so the mechanism is legitimately testable

Backtest Review

Well-populated data (2179 daily bars, 81,448 funding events) and a small, non-momentum parameter set

Backtest Review

LIQUIDATED to zero: total_return -100%, max_drawdown 100%, liquidation_date 2024-12-02 — an unrecoverable wipeout, not a marginal-edge issue

Backtest Review

The 'dollar-neutral' book is not neutral: consecutive weekly returns of -49.3% and -56.3% (Nov 2024) and +72.7% (Dec 2024) are directional-bet magnitudes, impossible for a truly hedged basket

Backtest Review

avg_holding_period is 31 days despite a weekly rebalance, because legs are never resized after drift — concentrated, unbalanced exposure accumulates until a regime kills it; the degraded single-leg path also takes full directional bets instead of standing aside

Backtest Review

Negative edge even ignoring the blowup: profit_factor 0.86 (<1.0), avg_trade_return_pct -2.34%, Sharpe -0.57, information_ratio -1.13 — the funding residual does not clear on 10 correlated majors

Backtest Review

L19: max_drawdown 100% is a hard abandon at backtest review; iterating catastrophic-DD strategies has never recovered them

Outcome Summary

HyperliquidCrossSectionalFundingCarryNeutralLS aimed to harvest the funding rate itself as a mechanical cash flow — long the perps paying you to hold them, short the perps paying you to be short, dollar-neutral — a non-momentum cross-sectional edge that also filled the under-represented Hyperliquid, long-short, and multi-instrument buckets. It failed catastrophically: the book was neutral in name only, swinging -49%/-56% in consecutive weeks before a +73% rebound, because legs were never resized after drift and the degraded single-leg path took full directional bets, letting concentrated exposure build until the account liquidated to -100% on 2024-12-02. Even setting the blowup aside, the full-period edge was negative (PF 0.86, avg trade -2.34%, Sharpe -0.57, IR -1.13), so the funding residual never cleared on ten correlated majors — the P&L was uncontrolled price risk, not carry. The analyst abandoned it at backtest review as a neutral-book-not-neutral / concentrated-directional blowup that no amount of optimizing four parameters could rescue; it never reached optimization, analysis, or risk review.

Outcome Summary

A dollar-neutral funding-carry basket is only neutral if legs are continuously resized to stay balanced — without re-hedging after drift, and with a degraded path that takes full directional bets instead of standing aside, a 'market-neutral' book accumulates concentrated directional exposure that a single adverse regime can liquidate, and on ~10 correlated majors the funding residual is too small to clear against that uncontrolled price risk anyway.

Outcome Summary

The analyst abandoned it at backtest review because it liquidated to -100% (a hard, non-recoverable abandon under L19), and the advertised neutrality was illusory: legs were never resized after drift, so concentrated directional exposure accumulated until a regime wiped the account, compounded by the degraded single-leg path taking full directional bets instead of standing aside; even ignoring the blowup the edge was negative (PF 0.86, avg trade -2.34%, Sharpe -0.57), so the funding residual never cleared on 10 correlated majors and the P&L was uncontrolled price risk rather than carry — nothing the 4 tunables could fix.

Outcome Summary

A long-short, market-neutral, multi-instrument strategy on ~10 liquid Hyperliquid perpetuals (daily bars) that harvested the funding rate as a cash flow via a non-momentum cross-sectional selection edge — each week ranking the universe by trailing average funding, going long an inverse-vol-weighted sleeve of the most-negative funders (paid to be long) and short an equal-notional sleeve of the most-positive funders (paid to be short), dollar-neutral to hedge crypto beta and collect the funding differential on both legs, deliberately filling under-represented Hyperliquid/long-short/multi-instrument buckets.

Outcome Summary

The backtest (2179 daily bars, 81,448 funding events, 2020-2026) was a catastrophic wipeout: the account LIQUIDATED to zero on 2024-12-02 with total_return -100% and max_drawdown 100%, Sharpe -0.57 (sharpe_ci_low -1.31), profit factor 0.86, avg_trade_return_pct -2.34%, information ratio -1.13, and negative alpha (-0.245) with kurtosis 240. The supposedly dollar-neutral book swung -49.3% and -56.3% in consecutive weeks (Nov 2024) and +72.7% (Dec 2024) — directional-bet magnitudes — with a 31-day average holding period despite the weekly rebalance.
Strategy report

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