Skip to content

View translation

SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H

Hypotheses

SOL Cross-Venue Funding Carry: Short Hyperliquid Perp / Long Binance Spot When HL Funding Runs Rich (Delta-Neutral, 4H Bars, Harvest Hyperliquid's Retail-Leverage Funding Premium, Low-Parameter)

Hypotheses

A DELTA-NEUTRAL, CROSS-VENUE funding-carry book on SOL: LONG SOLUSDT.BINANCE_SPOT (cash leg) + SHORT SOLUSD.HYPERLIQUID (perp leg, the funding-collecting leg), opened only when Hyperliquid's realized funding on SOL is running structurally RICH. This single hypothesis fills FOUR of the most under-weight buckets simultaneously: HYPERLIQUID venue (7.3% vs a >=20% target — the largest venue gap), BINANCE_SPOT (10.5% vs >=15%), cross_venue (6.6% vs >=15%), and non-long-only direction (long_only is 84.1% vs a <=55% cap). It runs on 4H bars deliberately: Hyperliquid's candle API serves only ~5000 candles per interval, and 4H is the shortest interval with ~2.3 years of usable history — a 15m/1h HL design would pass backtesting and then be abandoned for insufficient history. CRITICAL DISTINCTION from the failed CM-vs-USD-M funding-spread trade: that one chased a ~1e-6-per-8h DIFFERENTIAL between two near-identical Binance perps and was arithmetically incapable of clearing fees. This targets Hyperliquid's ABSOLUTE funding level on a retail-leverage-favored name, which on hot stretches runs 0.005-0.03% PER HOUR (HL pays hourly, not 8-hourly) — i.e. 0.12-0.72% per DAY, one to two orders of magnitude above the ~0.29% all-in round trip (Binance spot ~0.20% RT + HL perp ~0.09% RT). The carry is a mechanical cash flow the short-perp leg receives every hour it is held, and the engine credits funding. Kept deliberately minimal (4 knobs, no chain scanning, no greeks, no census-ratio feed) to resist both the overfitting/deflated-Sharpe rejections and the Layer-3 timeout pathology that has killed five recent hypotheses.

Hypotheses

Iteration 4, revived under the zero-trades amnesty, and the measurement changes the story: the hypothesis's defining number is false. Iteration 2 traded at a 1.0e-5 gate and QA correctly called it below break-even, demanding the hypothesis's own rich band (0.005-0.03%/hr = 5.0e-5..3.0e-4); iteration 3 implemented exactly that and produced zero trades over 5,408 bars. I measured the real feed rather than re-tuning blind — hl_funding_rates for SOL, 8,550 hourly points, 2025-06-08..2026-08-07: mean -3.9e-7/hr, sd 3.3e-5, MAX 6.18e-5, 99th percentile 1.91e-5, with the 75th-95th percentiles all pinned at 1.25e-5 (HL's baseline interest component). Only 0.023% of hours ever touch 5.0e-5 and nothing ever reaches 3.0e-4, so the top of the claimed band is ~5x above the all-time maximum. Since the strategy gates on the trailing MEAN, the cap is lower still: max 3.13e-5 at 24h, 2.42e-5 at 48h, 1.98e-5 at 120h — the 5.0e-5 gate is unreachable at any lookback, which is the zero-trade cause and is not fixable by threshold tuning. The fix therefore moves the fee margin from the gate to the HOLD, using QA's own arithmetic: break-even hold = round_trip/(gate x 24) = 0.29%/0.024%/day = 12.1 days at a 1.0e-5 gate, so I keep a reachable gate (1.0e-5, at/above HL's baseline), add a 21-day minimum hold (~1.7x coverage) and only allow the carry-decay exit after it; the naked-leg guard is the sole pre-min-hold exit. Simulated on the real funding series with the 0.29% round trip charged: 9 round trips over 14 months at +0.151% net per trade and a 28.8-day average hold, or +0.342% per trade over 7 trades at a 30-day floor — positive and above the 0.15% per-trade floor. I also replaced the process-relative bar-count hold clock with calendar time off the bar timestamp (restart- and replay-identical), and declared _param_bounds. Honest ceiling, stated up front: this is ~2%/year on 5-9 trades/year with multi-week holds, which cannot populate walk-forward OOS windows or a 15-day holdout, and a 30-day SOL spot-vs-HL-perp basis swing is easily larger than the carry it protects. My expectation is a roughly break-even, unmeasurable run and an abandon at backtest review — not because the code is wrong, but because the hypothesis's premise of 0.12-0.72%/day of carry overstates the real feed by one to two orders of magnitude.

Hypotheses

Below-floor, negative-expectancy delta-neutral funding carry whose premise is falsified by the real feed — not worth 2 hours of optimization. Funding IS credited by the engine (22,291 events, 52 trades), so this is a genuine economic result, and it still fails: avg_trade_return_pct 0.074% is below the 0.15% viability floor, profit_factor 1.096, total_return -1.48% over ~2.6 years, Sharpe -0.29 with CI [-1.32, 1.01] straddling zero, PSR 0.32, and avg_loss ($5020) exceeds avg_win ($4714). The hypothesis's defining number is quantitatively false: it assumed 0.12-0.72%/day of Hyperliquid carry, but the developer measured the actual SOL HL funding at a ~1.25e-5/hr baseline (all-time max ~6.18e-5/hr ≈ 0.03%/day), one to two orders of magnitude below the claim, and the 'rich' gate is unreachable at any lookback — there is no rich regime to harvest. The tiny real carry is then swamped by the cross-venue basis: return_kurtosis 84.5 and skew -5.4 show the 30-day SOL spot(Binance)-vs-perp(Hyperliquid) basis swings are larger than the carry they are meant to net, the same credited-but-negative delta-neutral funding-carry signature as the BTC/SOL spot-perp carries abandoned this session (carry < round-trip + basis tracking error). The developer's own docstring pre-registers this verdict: 'the correct call at backtest review is ABANDON... because the hypothesis's premise overstates the real feed by one to two orders of magnitude.' No tuning of entry_gate/min_hold_days conjures a premium the feed does not contain, and lengthening the hold only adds basis risk. Failure pattern: fee_edge/no_edge delta-neutral funding carry, premise falsified.

Implementation

Delta-neutral cross-venue funding carry on SOL, 4H bars: LONG SOLUSDT.BINANCE_SPOT (cash leg) and SHORT SOLUSD.HYPERLIQUID (the funding-collecting perp leg), sized to equal USD notional so directional SOL exposure cancels and the P&L is the funding cash flow minus fees. The continuous decision variable, returned every bar, is the trailing mean of Hyperliquid's realized hourly funding on SOL over funding_lookback points; the pair is opened when that mean is at or above entry_gate and closed when it decays to exit_gate — but only after min_hold_days, because the carry clears the ~0.29% all-in round trip (Binance spot 0.20% + HL perp 0.09%) by ACCRUING rather than by being large: at the shipped gate break-even is 12.1 days, so a 21-day floor gives ~1.7x coverage. A hard max_hold_days timeout and a naked-leg guard (any single open leg is closed immediately) bound the risk, and the hold clock is calendar time taken from the bar's own timestamp so it is identical across restarts, backtests and paper replay. The funding series is parsed once into sorted arrays; per-bar cost is one searchsorted. If the funding series is unavailable the strategy stays flat and never substitutes a price or basis signal.

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

Funding loaded and credited (22,291 events, 52 trades) — genuine economic read, not a data wall; delta-neutral, no liquidation

Backtest Review

Computationally clean (O(log n) funding lookup), fills under-weight HL/cross-venue buckets

Backtest Review

avg_trade_return_pct 0.074% — below the 0.15% viability floor; PF 1.096, total_return -1.48%, Sharpe -0.29 (CI [-1.32,1.01]), PSR 0.32; avg_loss > avg_win

Backtest Review

Premise false: real SOL HL funding baseline ~1.25e-5/hr (max ~0.03%/day) vs the claimed 0.12-0.72%/day — 1-2 orders of magnitude overstated; no rich regime exists

Backtest Review

Basis noise dominates: return_kurtosis 84.5, skew -5.4 — 30-day spot-vs-perp basis swings exceed the carry they net

Backtest Review

Developer pre-registered ABANDON in the docstring on exactly this evidence

Iteration History

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['min_bars', 'exit_gate', 'entry_gate', 'capital_frac', 'min_notional', 'max_hold_bars', 'qty_precision', 'min_funding_pts', 'funding_lookback', 'spot_instrument_id', 'supplementary_data'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690740000) - steady_downtrend: TypeError: SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690740000) - flat_ranging: TypeError: SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690740000) - volatility_spike: TypeError: SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690740000) - zero_volume: TypeError: SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690740000) - price_gap: TypeError: SolCrossVenueFundingCarryShortHlLongBinanceSpotNeutral4H._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690740000)

Iteration History

Verification failed (Layer 4 — QA review): - entry_gate default/config = 1.0e-5 per hour, but the hypothesis explicitly defines the tradeable 'structurally RICH' regime as 0.005-0.03% PER HOUR (i.e. 5.0e-5 to 3.0e-4). The coded gate is 5x to 30x BELOW the hypothesis's own stated rich band, and is in fact BELOW Hyperliquid's resting/neutral funding level (HL's interest-rate component alone is 0.01%/8h = 1.25e-5 per hour). The gate therefore admits ordinary baseline funding, not a rich-carry regime — it is an 'always on' filter, not a selectivity filter. Backtest confirms: exposure_pct=105.27%, 50 round trips over 169 days, avg hold 8d 9h — the book is essentially permanently in the market. Fee math at the coded gate: 1e-5/hr x 24 = 0.024%/day of carry vs an all-in round trip of ~0.29% (BINANCE_SPOT 0.20% RT + HYPERLIQUID perp 0.09% RT) = 12.1 days just to break even, against an observed 8.4-day average hold. The strategy is structurally below break-even at this threshold, which is exactly what the sandbox shows (total_return -2.06%, profit_factor 0.96, commission 4.22% of gross). At the hypothesis's own stated gate (5e-5/hr = 0.12%/day) break-even is ~2.4 days and the carry clears fees with real margin. The code implements a different, non-viable version of the stated edge. - exit_gate = 0.0 means the pair is held until the trailing HL funding mean goes outright NEGATIVE. The hypothesis says to exit when 'the carry has dried up'. Zero is not 'dried up' — any funding in (0, 5e-5) is positive-but-below-break-even carry, and with exit_gate=0.0 the book sits through arbitrarily long stretches of near-baseline funding paying the ~0.29% round trip while earning less than fees. Combined with max_hold_bars=180 (30 days), a position can bleed for a month before the timeout fires. This is the direct mechanism behind the observed profit_factor of 0.96. - The naked-leg guard sets self._entry_bar = None after submitting exits, but the exits do not fill until the next bar. If both legs are still open on the following bar, the pair branch computes held = 0 (because _entry_bar is None) and max_hold_bars can never fire for that pair — the timeout is silently disabled until the next clean entry. The carry_gone check still applies, so it is not fatal, but the stated time-stop is not guaranteed. - calculate_signal wraps the entire _manage() call in a bare `except Exception: pass`, and _positions() swallows all cache exceptions the same way. Any systematic failure in order submission, sizing, or position lookup presents as 'the strategy simply never traded' rather than as an error, which makes both Layer-3 and live debugging blind.

Iteration History

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

Iteration History

Verification failed (Layer 4 — QA review): - The hypothesis's defining premise is empirically false, measured by the developer on the real feed (hl_funding_rates for SOL, 8,550 hourly points, 2025-06..2026-08): mean -3.9e-7/hr, MAX 6.18e-5, 99th pct 1.91e-5, with the 75-95th percentiles pinned at HL's 1.25e-5 baseline. The hypothesis's stated 'rich' band of 0.005-0.03%/hr (5.0e-5..3.0e-4) is unreachable -- its top is ~5x above the all-time maximum, and nothing ever reaches 3.0e-4. The premise of 0.12-0.72%/day of carry overstates the real feed by one to two orders of magnitude; SOL HL funding has no rich regime, only a baseline ~1.25e-5/hr. The edge the strategy was proposed to harvest does not exist at the claimed magnitude. - Fee/edge failure dominated by uncontrolled cross-venue basis risk (checklist #7). With no rich gate reachable, the design shifts the fee margin entirely onto a 21+ day minimum hold that accrues only BASELINE funding to clear the ~0.29% all-in round trip. But over multi-week holds the Binance-spot-vs-HL-perp BASIS swing dominates: the sandbox shows avg_win $6,247 vs avg_loss $6,389 -- swings orders of magnitude larger than the fractional-percent carry -- netting total_return -0.998%, PF 0.978, avg_trade_return_pct -0.021% over 20 trades (avg hold 25.7 days). The book is delta-neutral to SOL DIRECTION but NOT to the cross-venue basis, which is the dominant PnL. The developer's engine-free +0.151%/trade simulation is optimistic precisely because it charges fees against funding only and ignores this basis PnL, which the real backtest captures -- and the real backtest is net-negative. - Unmeasurable (L16/L26). At 5-9 trades/year with 21-30 day holds the strategy cannot populate the 3 walk-forward OOS windows or the 15-day holdout -- the developer states this explicitly. Even the sandbox's 20 trades over 364 days are multi-week holds, so downstream DSR/OOS/holdout gates have no usable sample.
Strategy report

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