HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H
Hypotheses
Hyperliquid Cross-Sectional Relative-Strength Long/Short Basket (Dollar-Neutral, 8 Liquid HL Perps, 4H Bars, Single-Lookback Momentum, Beta-Stripped)
Hypotheses
A DOLLAR-NEUTRAL, MULTI-INSTRUMENT cross-sectional momentum strategy on Hyperliquid perpetuals — deliberately routed to HYPERLIQUID (currently 7.0% of the book vs a >=20% quota, and the venue live trading is migrating to) and constructed LONG-SHORT (15.7% of the book vs push) to strip crypto beta rather than bet on it. It ranks a fixed basket of ~8 liquid, HL-native perps that have existed since Hyperliquid's launch — BTC, ETH, SOL, AVAX, LINK, ARB, OP, DOGE — by a single trailing-return lookback and holds the strongest against the weakest, market-neutral. This is intentionally NOT the failed pattern from the portfolio: those were SINGLE-ASSET directional trend/funding clones (ETH vol-targeted TSMOM, funding-contrarian BTC) that carry full market beta, post negative information ratios vs their own buy-hold, and collapse under best-of-N selection. A cross-sectional dollar-neutral spread earns from DISPERSION between coins, not from market direction, so its edge is orthogonal to BTC beta and does not evaporate when the regime flips from bull to bear. Uses 4H bars only (2.3 years of usable HL history per the timeframe table) — NOT sub-hourly, which the Analyst abandons for insufficient HL history. Kept deliberately low-parameter (one lookback, fixed basket, fixed top/bottom count, fixed rebalance cadence) because overfitting-to-search is the dominant failure mode in this factory. Per-leg holding is multi-day with multi-percent dispersion, an order of magnitude above the ~0.09% HL round-trip fee.
Hypotheses
This was a clean restart with no named defect, so per the instructions I kept the mechanism, the basket, the dollar-neutral construction and the signal logic exactly as they were, reviewed the code on its merits, and made two targeted changes (a byte-identical resubmission also fails Layer 0 immediately). (1) CALENDAR-ANCHORED SCHEDULE: the rebalance cadence was driven by a process-relative counter — self._rebal_count incremented per new timestamp, firing when (count-1) % rebalance_bars == 0. That is the uptime-anchored anti-pattern: it rebalances the whole book on the first bar after any restart (in live, a crash-restart loop churns all 8 legs at real fees), drifts off the fixed weekly grid, and cannot reproduce in paper/backtest parity replay. It now derives the cadence from the bar's own timestamp — slot = ts_ns // bar_interval_ns, fire when slot % rebalance_bars == 0 — with the interval computed once in __init__. (2) O(1) MOMENTUM: _momentum built a numpy array of the entire close history on every call (once per bar for the primary, and for all 8 assets on every rebalance); it now indexes only the three bars it needs. Before submitting I confirmed all 8 HL legs have 4H catalog data that is currently live (Jan-Feb 2024 through today, so no delisted leg can stall the alignment barrier) and ran the full sandbox window: 196 trades, +25.9% total return, profit_factor 1.08, avg_trade_return_pct 0.61% (well above the 0.10% low-fee-venue floor), Sharpe 0.28, max drawdown 26.4%, no liquidation, 130s wall clock against the 300s cap even under heavy machine load.
Hypotheses
Re-submission of a hypothesis already abandoned for overfitting (2026-08-04, iteration 2), and the full-history re-run confirms the kill — not worth 2 hours of optimization. Over 195 trades in 2.6 years of HL history: Sharpe 0.316 with bootstrap CI [-0.914, 1.596] straddling zero, profit_factor 1.055, PSR 0.693, total_return 28.4% (CAGR 7.0%). The result hinges almost entirely on a single +60.7% day (2024-12-12, Dec-2024 month +54.9%) on a dollar-neutral book — an artifact/outlier, not dispersion edge: strip it and 2024 is negative (-3.1%). It is also capacity-dead — impact_cost_pct 40.8% (impact consumes ~40% of gross PnL) with capacity_usd only ~$600k on the low-liquidity HL alts (ARB/OP/AVAX/LINK/DOGE) — and carries max_drawdown 25.6% (CI to 77.8%) at 61.6% vol and ~400% gross exposure. This is the L45/L52 market-neutral cross-sectional momentum basket (0/84 survivors) crossed with Hyperliquid (0/128, L82); benchmark_meaningful is correctly false. No parameter change turns a one-outlier, not-significant, untradeable-at-scale basket into an edge. Failure pattern: overfit/no_edge/capacity market-neutral cross-sectional momentum on Hyperliquid (L45/L52/L82).
Implementation
Dollar-neutral cross-sectional relative-strength momentum on 8 liquid Hyperliquid perpetuals (BTC, ETH, SOL, AVAX, LINK, ARB, OP, DOGE) using 4H bars. On a calendar-anchored ~weekly grid the basket is ranked by a single 180-bar (~30 day) trailing return; the top 2 are held LONG and the bottom 2 SHORT in equal dollar notional per leg, so long notional equals short notional and the book carries no net crypto beta. Gross exposure is capped at 1x equity, positions resize only on a material (25%) drift to keep turnover low, and a rank flip closes then reopens the leg. Pure OHLCV, single venue, leverage 1.0.
Verification Results
CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.
Backtest Review
Faithfully implemented and genuinely market-neutral (benchmark_meaningful false, low commission 1.35% of gross)
Backtest Review
Adequate trade sample (195 trades) with calendar-anchored, restart-safe rebalance and clean HL-native construction
Backtest Review
Already abandoned for overfitting on this exact hypothesis (2026-08-04, iteration 2) — no material change
Backtest Review
Not significant: Sharpe 0.316 with CI [-0.914, 1.596] straddling zero, PF 1.055, PSR 0.693
Backtest Review
Return hinges on a single +60.7% day (2024-12-12) on a dollar-neutral book — artifact/outlier, not dispersion edge; strip it and 2024 is negative
Backtest Review
Capacity-dead: impact_cost_pct 40.8%, capacity_usd ~$600k; max_drawdown 25.6% (CI to 77.8%), vol 61.6%
Backtest Review
L45/L52 market-neutral cross-sectional momentum basket (0/84) crossed with Hyperliquid (0/128, L82)
Outcome Summary
HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H was deliberately built to avoid the factory's recurring failure mode — single-asset directional clones carrying full market beta — by ranking 8 HL perps on one lookback and holding winners against losers in equal dollar notional. The construction worked exactly as intended (beta -0.025, 85 long and 85 short legs), and the reviewer sent it to optimization on the strength of a clean 170-trade, 879-day sample, but the base edge was essentially absent: Sharpe 0.075, profit factor 0.99, a +5.1% total return of which December 2024 alone supplied over half, and a toy ~$58k capacity. Optimization confirmed the weakness — is_overfitted TRUE, PBO 0.73, four sensitivity cliffs, OOS Sharpe 0.072 and a negative failed holdout at -0.725 — but the analyst never got to rule: the run terminated on token_budget_exceeded. The strategy is recorded as abandoned with the decisive verdict never formally rendered.
Outcome Summary
A structurally sound market-neutral design can still be hollow: near-breakeven base metrics carried by a single month, $58k capacity with impact at 132% of gross, and a failed holdout are all visible pre-analyst signals that the dispersion edge is too thin to be worth further compute.
Outcome Summary
The backtest reviewer passed it to optimization, but the run was abandoned for token_budget_exceeded before the analyst could issue a verdict — so the final promote/iterate/abandon decision was never reached despite optimization having completed with failing robustness numbers.
Outcome Summary
A dollar-neutral, long-short cross-sectional momentum basket on 8 liquid Hyperliquid perps (BTC, ETH, SOL, AVAX, LINK, ARB, OP, DOGE) on 4H bars, ranking names by a single trailing-return lookback and holding the strongest against the weakest so the edge comes from cross-coin dispersion rather than market beta.
Outcome Summary
The base backtest over 879 days produced 170 trades with genuine neutrality (beta -0.025, benchmark correlation -0.06) but essentially no edge: Sharpe 0.075, profit factor 0.99, CAGR -1.24%, +5.14% total return that was outlier-carried (return kurtosis 177, skew 8.3, tail ratio 0.11), and capacity of only ~$58k with impact costs at 132% of gross PnL. Optimization lifted the optimized-backtest Sharpe to 0.225 (302 trades, +23.4% return) but flagged is_overfitted=TRUE, PBO 0.7315, deflated Sharpe 0.2397, 4 sensitivity cliffs, avg OOS Sharpe 0.072, and a failed holdout (holdout_sharpe -0.725, ratio -9.998).
Iteration History
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['assets', 'n_legs', 'lookback', 'gross_cap', 'skip_bars', 'resize_frac', 'min_notional', 'qty_precision', 'rebalance_bars', 'supplementary_data', 'default_qty_precision']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735700460000)
- steady_downtrend: TypeError: HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735700460000)
- flat_ranging: TypeError: HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735700460000)
- volatility_spike: TypeError: HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735700460000)
- zero_volume: TypeError: HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735700460000)
- price_gap: TypeError: HyperliquidCrossSectionalRelativeStrengthDollarNeutralBasket4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735700460000)
Iteration History
Verification failed (Layer 4 — QA review) [class=code_defect]:
- [edge_concern] Sandbox edge is marginal but not the reason for the fail: Sharpe 0.10, CI [-0.85, 1.12] straddling zero, PF 1.04, +11.8% over 956 days, alpha +0.04 / beta -0.03 / benchmark_correlation -0.13 (genuinely market-neutral as intended), avg_trade_return_pct 0.249% clearing the ~0.09% HL round trip. Whether the cross-coin dispersion edge is real is a full-backtest/optimizer question. Fix the rebalance-anchoring defect and this is a clean, faithful implementation worth backtesting.
- The rebalance cadence is driven by a PROCESS-RELATIVE bar counter, not the bar's timestamp. self._rebal_count increments once per unique bar timestamp from instantiation, and _rebalance() fires when (self._rebal_count - 1) % self._rebalance_bars == 0. This is the uptime-anchored anti-pattern: (a) it fires a FULL basket rebalance on the very first bar after every (re)start (rebal_count=1 -> (1-1)%38==0), so a crash/restart loop — which this factory is prone to (Windows DLL degradation, OOM self-exits, health-monitor os._exit) — churns the entire dollar-neutral book and pays a full round-trip on all 6 legs each restart; and (b) the rotation grid is anchored to when the process first sees a bar, not calendar time, so it drifts off any fixed grid and walk-forward/parity replay can never reproduce the rotation dates. The single-run backtest is deterministic so the sandbox numbers aren't corrupted, but this is a real live/paper and replay-parity correctness defect.
- Momentum for non-primary legs reads self._extra_bars.get(iid, []) when the PRIMARY bar triggers the rebalance. If the alignment barrier hasn't yet delivered the contemporaneous 4H bar for a leg, that leg's momentum/price is one bar stale. Not look-ahead (past data only) and immaterial to a ~30-day-lookback weekly rebalance, but worth confirming all 8 legs share the rebalance timestamp.
Backtest and paper results are hypothetical. Trading involves risk of loss.