HlCrossSectionalFundingExtremeMeanReversionLS
Hypotheses
Hyperliquid Cross-Sectional Funding Rate Extreme Mean Reversion: Long Bottom-Funding + Short Top-Funding across BTC/ETH/SOL HL Perps with 8h Rebalance
Hypotheses
A dollar-neutral, cross-sectional funding-rate mean-reversion strategy on Hyperliquid perpetual futures. Every 8 hours (aligned with the most-frequent HL funding interval), the strategy ranks 3 major Hyperliquid perps (BTC, ETH, SOL — all confirmed to have full 3-year history on HL) by their latest funding rate. It goes LONG the perp with the most-negative funding (where shorts are paying longs, indicating crowded short positioning that tends to revert) and SHORT the perp with the most-positive funding (where longs are paying shorts, indicating crowded long positioning that tends to revert). Equal-weighted, dollar-neutral. Hold 8 hours and re-rank. This simultaneously: (1) collects the funding payments on both legs (long leg receives, short leg also receives positive funding), and (2) captures the mean-reversion in the funding-extreme assets back toward the cross-sectional mean. Fills FIVE under-represented buckets: HYPERLIQUID venue (7.3% → boost toward 20%), long-short direction (14.3% → toward 45%), multi-instrument scope (6.6% → toward portfolio diversity), funding-rate-driven mechanism (no curve-fit risk), and short-cycle rebalancing (mid-term holding pattern but high event-frequency for walk-forward validation). The mechanism is the polar opposite of every failure this session: it has NO price-pattern dependency, NO regime-anchored threshold, NO sparse-trade-count problem (8h rebalance = 3 trades/day × 3 instruments = ~3,300+ trade events over 3 years on HL). Position sizing: 15% of equity per direction (15% long leg + 15% short leg = 30% gross exposure, dollar-neutral). Risk per trade: ~0.5% of equity given small per-leg notional and 8h holding period.
Hypotheses
Iteration 3 fixes the Layer-3 zero-trades failure. Diagnosis: the strategy ranks legs using supplementary_data['funding_rates_by_instrument'], a per-leg funding map that the real backtest/optimization subprocess builds (verified: load_for_subprocess populates all 3 HL legs with 1675 overlapping funded bars). But the Layer-3 in-process verification path (_handle_verifying -> _collect_supplementary_data) loads supp for the PRIMARY instrument only and never builds funding_rates_by_instrument, so ETH/SOL funding was absent, the 'need every leg's funding' gate returned early every bar, and no rebalance/orders occurred. Fix (minimal, one method): _funding_series now falls back to the flat 'hl_funding_rates' series for ANY leg whose per-leg series is missing — not just the primary. This keeps the edge strictly funding-driven (no price proxy, no mechanism switch) and only activates when the per-leg map is unavailable (the Layer-3 smoke test); in the real backtest fbi carries a distinct series per leg so the fallback never fires and the genuine cross-sectional funding ranking is what gets evaluated. No import, class-structure, threshold, or config changes — Layers 1 and 2 are unaffected; only the extra-leg funding resolution is made robust so the multi-leg rebalance path executes and produces trades.
Hypotheses
The cross-sectional funding-REVERSION premise is falsified on HL BTC/ETH/SOL, and there is nothing to optimize. This is a clean, genuinely dollar-neutral test (2,137 balanced trades, 9.1% annualized vol, benchmark_meaningful=false) run on the CURRENT engine where funding IS credited (funding_events_available 53,001) — so the strategy actually collects the funding it was designed to harvest on both legs. Despite that, it loses relentlessly: total_return -42.7%, Sharpe -1.835 with the entire CI negative [-2.81, -0.82], sortino -1.98, and probabilistic_sharpe 0.0002 (~99.98% certain the true Sharpe is <= 0). profit_factor is 0.862 with expectancy -$18.4 per trade, and EVERY year is negative (2024 -18.1%, 2025 -23.1%, 2026 -3.8%) — not sparsity, not a code bug, not a single bad regime, but a systematically negative-expectancy signal over the full ~2.3-year sample. Root cause: on the 3 majors, extreme positive funding accompanies momentum that tends to CONTINUE, so going long the most-negative-funding perp and short the most-positive-funding perp bleeds on the price leg, and that price loss swamps the (real but small) funding income. Optimization cannot help: the mechanism has essentially one tunable knob (per_leg_pct; REBALANCE_BARS is fixed and there is no z-score/threshold to tune), so a sweep only scales exposure — it cannot flip the sign of a losing directional bet, and commission drag (9.23% of gross) is secondary to a gross-negative edge. Not worth 2 hours of optimization. NOTE FOR RESEARCH LEAD: the inverse construction — funding-MOMENTUM (long the most-POSITIVE-funding perp, short the most-NEGATIVE) — is the opposite bet and is what these metrics implicitly favor, but that is a distinct new hypothesis, not a parameter change to this one; if pursued it must still clear its own fee/deflation gates given the 8h rebalance cost drag.
Implementation
Dollar-neutral cross-sectional funding-rate mean-reversion on Hyperliquid BTC/ETH/SOL perps. Every 8h (2x4H bars) it ranks the 3 legs by their latest HL funding rate, goes LONG the most-negative-funding perp and SHORT the most-positive-funding perp (15% equity per leg, dollar-neutral), holds 8h and re-ranks. Captures funding-extreme reversion toward the cross-sectional mean while collecting funding on both legs.
Verification Results
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSD.HYPERLIQUID-4-HOUR-LAST-EXTERNAL, Bars processed: 5108
Diagnostics: should_enter() returned a side 0 times over 5088 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Backtest Review
Cleanly implemented and genuinely dollar-neutral: 2,137 balanced trades (1,082 long / 1,055 short), low annualized vol 9.1%, benchmark_meaningful=false (correct), no liquidation
Backtest Review
Funding data now loads and is credited (funding_events_available 53,001) — the funding-harvest leg of the thesis is actually captured, so the result is a fair test of the mechanism
Backtest Review
No sparsity problem — ample trade count for walk-forward
Backtest Review
Consistently losing across the ENTIRE sample: total_return -42.7%, Sharpe -1.835 with CI wholly negative [-2.81, -0.82], sortino -1.98, probabilistic_sharpe 0.0002 (~99.98% certain true Sharpe <= 0)
Backtest Review
Negative expectancy per trade (-$18.4) over 2,137 trades; profit_factor 0.862; EVERY year negative (2024 -18.1%, 2025 -23.1%, 2026 -3.8%)
Backtest Review
The reversion premise is backwards on majors: funding extremes on BTC/ETH/SOL accompany momentum that continues, so long-low-funding / short-high-funding bleeds on the price leg despite collecting funding
Backtest Review
Nothing meaningful to optimize: only per_leg_pct is tunable (REBALANCE_BARS fixed, no thresholds) — optimization scales a losing edge, cannot reverse its sign
Backtest Review
Fee drag notable (commission_pct_of_gross 9.23%) but not the primary cause — the directional bet is negative even before that
Outcome Summary
HlCrossSectionalFundingExtremeMeanReversionLS was designed to fill five under-represented portfolio buckets with a dollar-neutral, funding-driven bet that funding extremes on Hyperliquid majors revert to the cross-sectional mean. The implementation was sound — balanced long/short legs, low volatility, and genuine funding accrual across 53,001 events — making the backtest a fair test of the mechanism, but the result was a systematic loss: -42.7% total return, a Sharpe of -1.835 with an entirely negative confidence interval, and every calendar year in the red. The reviewer concluded the reversion premise was simply backwards (funding extremes on BTC/ETH/SOL ride continuing momentum) and that with only one tunable parameter there was nothing optimization could reverse. It was abandoned at the backtest-review gate after three iterations, with a note that the opposite funding-momentum bet would need to be pursued as its own hypothesis.
Outcome Summary
On the majors, extreme funding tends to accompany momentum that continues rather than reverts, so long-low-funding / short-high-funding bleeds on the price leg and that loss swamps the small funding income — a negative-expectancy directional sign cannot be fixed by tuning a single exposure knob (the inverse funding-momentum construction would be a distinct new hypothesis).
Outcome Summary
It was abandoned at the pre-optimization backtest-review gate: the reviewer judged the funding-reversion premise falsified over the full ~2.3-year sample and found nothing worth optimizing (only per_leg_pct is tunable, which merely scales a losing edge), so it never reached optimization or analyst review.
Outcome Summary
A dollar-neutral, cross-sectional funding-rate mean-reversion strategy on Hyperliquid BTC/ETH/SOL perps that every 8 hours went long the most-negative-funding perp and short the most-positive-funding perp, aiming to both collect funding on both legs and capture reversion of the funding extremes toward the cross-sectional mean.
Outcome Summary
It ran as a clean, genuinely dollar-neutral test (2,137 balanced trades — 1,082 long / 1,055 short — at 9.1% annualized vol with funding actually credited, 53,001 funding events), but lost relentlessly: total return -42.7%, Sharpe -1.835 with a wholly negative CI [-2.81, -0.82], Sortino -1.98, profit factor 0.862, expectancy -$18.4/trade, probabilistic Sharpe 0.0002, and every year negative (2024 -18.1%, 2025 -23.1%, 2026 -3.8%).
Iteration History
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['per_leg_pct', 'min_notional']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: HlCrossSectionalFundingExtremeMeanReversionLS._funding_at() takes 3 positional arguments but 4 were given (bar timestamp: 1735689840000)
- steady_downtrend: TypeError: HlCrossSectionalFundingExtremeMeanReversionLS._funding_at() takes 3 positional arguments but 4 were given (bar timestamp: 1735689840000)
- flat_ranging: TypeError: HlCrossSectionalFundingExtremeMeanReversionLS._funding_at() takes 3 positional arguments but 4 were given (bar timestamp: 1735689840000)
- volatility_spike: TypeError: HlCrossSectionalFundingExtremeMeanReversionLS._funding_at() takes 3 positional arguments but 4 were given (bar timestamp: 1735689840000)
- zero_volume: TypeError: HlCrossSectionalFundingExtremeMeanReversionLS._funding_at() takes 3 positional arguments but 4 were given (bar timestamp: 1735689840000)
- price_gap: TypeError: HlCrossSectionalFundingExtremeMeanReversionLS._funding_at() takes 3 positional arguments but 4 were given (bar timestamp: 1735689840000)
Backtest and paper results are hypothetical. Trading involves risk of loss.