Strategies
Cross-Venue Funding-Differential Carry: Hyperliquid vs Binance USD-M on the SAME Coin — 8 Self-Hedged Delta-Neutral Pairs (Short the Rich-Funding Venue / Long the Cheap-Funding Venue), 4H Decisions, 7-Day Hold, One Shared Parameter Set (3 parameters)
Outcome: Abandoned
CrossVenueFundingDifferentialCarryHlBinance
Outcome Summary
This strategy attempted a genuinely market-neutral cross-venue funding carry, pairing each of eight alt perps against itself on Hyperliquid and Binance USD-M so that only the funding differential and inter-venue basis remained. The backtest confirmed the mechanism was real — the delta hedge cancelled price exposure to +0.0115% of leg notional, funding was credited across 18,732 events and delivered a statistically significant +0.223% per pair-trade, and the basis drift matched the pre-registered +0.025% almost exactly — but the gross edge of +0.246% could not cover the 0.457% of commissions plus spread/impact, leaving -1.84% total return, Sharpe -0.198, and a per-trade return of 0.0118% versus the 0.15% floor. The analyst abandoned it at the backtest-review gate before optimization, reasoning that the pre-registered carry was overstated 2.4x and that even at zero impact the edge sits about 5x below the viability floor, so neither re-parameterization nor smaller sizing could rescue it. The run ended after one iteration with no optimization, risk review or promotion stage reached.
Hypothesis
The mechanism is present but the framing cannot pay for itself. QA's concern is half borne out: impact WAS omitted from the cost budget and is now the largest single cost (1.4x commission) — but QA's remedy fails on full history, because it reconstructed +0.37% gross from the truncated sandbox while the real figure is +0.246%. Halving per_leg_frac to the declared 0.05 floor cuts impact to ~0.19% (dollars ×0.5, bps ×0.71), leaving costs 0.38% vs gross 0.246% — still negative. In the ZERO-impact limit the edge is +0.056% per pair-trade = +0.028% per leg, ~5x BELOW the 0.15% venue floor. No point in the declared grid (entry_diff_8h 4–30bp, hold 3–14d, per_leg_frac 0.05–0.15) closes a 5x gap, so this is neither optimizable nor a sizing fix.
Implementation
Market-neutral CROSS-VENUE funding-differential carry on 8 alt perps (SEI, ONDO, ENA, TIA, RUNE, LDO, AAVE, NEAR) listed on BOTH Binance USD-M and Hyperliquid. Every 4H bar each coin's own funding is compared at a common 8-hour scale: the sum of the trailing 8 HOURLY Hyperliquid observations minus the latest 8-HOURLY Binance stamp, both strictly point-in-time. When |diff| exceeds entry_diff_8h (default 8 bps/8h) the strategy opens a self-hedged pair in that coin: SHORT the rich-funding venue and LONG the cheap-funding venue in the SAME coin quantity, so price exposure cancels and the residual P&L is the funding differential plus a small inter-venue basis drift. Pairs are held hold_days (7d, anchored to the bar timestamp) then closed; at most 5 pairs run concurrently, each leg sized equity * per_leg_frac * leverage = 30% of the smaller of the two venue accounts (1.5x gross per venue inside leverage 3.0). No cross-sectional ranking across coins, so no alt-market beta. If either leg's funding series is missing or stale, that coin stays flat -- no price proxy is substituted.
Verification Results
Analyst: judge this strategy on total_return / PF / Sharpe / funding P&L, and treat avg_trade_return_pct as not-applicable for a delta-neutral cross-venue carry book (state it in a gate_waiver naming that floor). Engineering: extend apply_funding_to_report to also adjust `realized_return` (funding_pnl / position notional) so per-trade % is meaningful for every funding-driven archetype, or emit a separate avg_trade_return_pct_incl_funding field.
This faithfully implements the hypothesis's stated sizing so it is not a defect, but the sizing is the binding economic constraint. Let the optimizer search per_leg_frac across its full declared [0.05, 0.15] band and expect the optimum at/near 0.05; consider sizing the HL leg off that coin's own recent HL bar volume (participation cap, e.g. <= 0.25% of the trailing 4H volume) rather than a flat equity fraction, so thin coins get smaller legs than deep ones.
Per-leg notional is equity * per_leg_frac * leverage = 0.10 * 3.0 = 30% of the SMALLER venue account, with up to 5 concurrent pairs (150% gross per venue). Half the legs are Hyperliquid alt perps (SEI, ONDO, RUNE, LDO), whose 4H bar volume is a fraction of the Binance USD-M leg's. The implied participation rate (~0.8% of a 4H bar per fill, backed out of the 7.5bp/fill modeled impact) makes impact the largest single cost line in the book — larger than the commission the hypothesis actually budgeted for. capacity_usd $38,302 is below the notional the strategy deploys in a single leg.
Acceptable for backtest. Before any paper deployment, add a fallback so pair EXITS and the naked-leg flatten run on a primary bar even when a non-involved leg is missing (e.g. drive exits from on_bar/a timer rather than only from the barrier-gated calculate_signal), or drop a coin from the basket when its bar is stale instead of blocking the whole strategy.
The base class's cross-leg alignment barrier (base_template.py:_maybe_process_primary) defers _process_primary until ALL 15 same-timeframe extra legs publish a bar at the primary timestamp. Because _manage() is driven from calculate_signal(), that barrier gates EXITS and the naked-leg guard too, not just entries: a single missing 4H bar on any one of the 16 legs freezes management of all 8 pairs for that bar. In backtest this is benign (avg_holding_period is exactly 7d 0h 0m, so it did not bite on this window), but in paper/live a one-coin feed outage stalls every pair's 7-day exit and the naked-leg flatten.
Have _submit_entry_instrument return a bool (or check cache.orders_open / _inflight_entries immediately after each submit) and, if the second leg fails, immediately cancel/close the first leg in the same event rather than waiting a bar. At minimum log an ERROR when only one leg was accepted so a live operator sees it.
_open_pair submits the HL leg then the BN leg via _submit_entry_instrument, which can silently return without submitting (spot-short block, _market_ready false, _entry_order_inflight, instrument not in cache). If one of the two returns silently, the strategy is left with a single UNHEDGED leg at 30% of equity until the next 4H bar, when the naked-leg guard flattens it. entry_ts is also set unconditionally even if neither order was accepted. The guard is correct and the sandbox shows a clean 83 long / 83 short split, so it never fired here, but the exposure window is one full 4H bar.
Add a span check alongside the staleness check: reject the pair when hl_ts[i-1] - hl_ts[i - hl_window] exceeds, say, 10 hours, so a gapped window is treated as missing data rather than a valid 8h block.
_diff_8h builds the 8-hour-equivalent HL rate as hl_rate[i-8:i].sum() — the last 8 OBSERVATIONS at or before the bar, without checking they actually span ~8 hours. Verified against the catalog (data/supplementary/hyperliquid/funding_history/SEI/all.parquet, 26,854 rows at exactly 3600s spacing, rates ~1.25e-5/hr == Binance's 1e-4/8h) the series is dense, so this is correct in practice; but a collection gap would silently make the sum span 12-20 hours and compare a wider window against Binance's single 8h stamp, biasing the differential. The 6-hour _hl_stale_ns guard only bounds the MOST RECENT observation, not the span of the window.
Re-raise in backtest/verification (mirror the base's `if not _live_node(): raise` pattern) and keep the swallow only for live/paper, or at least count the swallowed exceptions and surface the count so a degraded run is visible.
calculate_signal wraps the whole of _manage() in a bare `except Exception` that only logs a warning. In a backtest this means a systematic bug in pair management (bad instrument id, missing extra instrument, cache error) would silently produce a zero-trade or partially-trading run rather than failing loudly — the base class deliberately re-raises on non-live nodes for exactly this reason (base_template.py: 'a crash must fail the run').
Backtest Review
- Sharpe
- -0.20
- Total return
- -1.84%
- Max drawdown
- 2.77%
- Trades
- 188
- Win rate
- 50.0%
- Profit factor
- 0.99
Delta hedge genuinely works: summed reference price move (exit-entry) over all 188 legs = +$401 on $3.48M leg notional (+0.0115%); legs 94 long / 94 short; vol 3.93%, DD 2.77%.
Funding differential is REAL and significant: +0.223% of one leg's notional per pair-trade (median +0.353%, t = +4.57, 74% positive), stable at +0.247% (2024) / +0.209% (2025).
Basis drift +0.023% vs the pre-registered +0.025% — the researcher's basis estimate was accurate.
Not concentration-driven, not an artifact: top 5 of 94 pair-trades are only 15% of the total, funding is credited (18,732 events), trades implement the hypothesis exactly (94 clean 2-leg groups, no naked legs).
Net -0.211% per pair-trade: gross (funding +0.223% + basis +0.023%) = +0.246% vs costs (commission -0.190% + folded spread/impact -0.267%) = -0.457%. price_pnl reconciles exactly (reference move − $3,304 commission − $4,646 impact = −$7,950).
Total return -1.84%, Sharpe -0.198, PF 0.985, avg_trade_return_pct 0.0118% vs 0.15% floor, negative in all three calendar years with trades.
Carry claim overstated 2.4x (0.539% pre-registered vs 0.223% delivered); only 13% of the naive 7-day accrual at an 8bp/8h trigger survives mean reversion.
capacity_usd $4,410, impact_cost_pct 476% — deployable only at toy scale.
Outcome Summary
Pre-registering a carry estimate from a raw funding-accrual scan overstated the realized differential 2.4x (0.539% claimed vs 0.223% delivered) and omitted spread/impact, which here exceeded commissions by 1.4x — future funding-carry hypotheses should budget the full two-leg round-trip cost including impact and validate the accrual survives mean reversion before coding.
The analyst returned an 'abandon' verdict at the pre-optimization backtest review, so the 3-phase optimization, risk review and promotion stages were never reached. The decisive finding was that even in a zero-impact limit the edge is +0.056% per pair-trade (+0.028% per leg), roughly 5x below the venue floor, and no point in the declared parameter grid closes that gap — with capacity_usd of only $4,410 and impact_cost_pct of 476% confirming it is deployable only at toy scale.
A delta-neutral cross-venue carry strategy running eight self-hedged same-coin pairs (SEI, ONDO, ENA, TIA, RUNE, LDO, AAVE, NEAR) that shorted the perp on the rich-funding venue and went long on the cheap-funding venue between Hyperliquid and Binance USD-M, holding 7 days on 4H decisions, so the payoff would be the funding differential rather than any directional or cross-sectional alt exposure.
Over 957 days and 5,736 primary bars it ran 188 trades (94 two-leg pair-trades) for a total return of -1.84%, Sharpe -0.198, Sortino -0.159, profit factor 0.985, max drawdown 2.77% and a 50% win rate, with avg_trade_return_pct of 0.0118% against the 0.15% viability floor. The hedge and the edge both worked mechanically — funding delivered +0.223% per pair-trade (t = +4.57, 74% positive) and basis drift +0.023% — but commissions (-0.190%) plus folded spread/impact (-0.267%) turned the +0.246% gross into -0.211% net per pair-trade.
Backtest and paper results are hypothetical. Trading involves risk of loss.