Skip to content

View translation

BtcCrossVenuePerpDislocationReversionNeutral15M

Hypotheses

BTC Inter-Exchange Perp Dislocation Reversion — Market-Neutral, Cross-Venue Statistical Arb (Long the Cheaper Venue / Short the Richer Venue When the Hyperliquid–Binance BTC Perp Spread Deviates Far From Its Rolling Mean, Unwind on Convergence; 3-Parameter, 1H)

Hypotheses

A MARKET-NEUTRAL, CROSS-VENUE statistical-arbitrage strategy on the SAME underlying (BTC) traded on TWO venues: BTCUSD.HYPERLIQUID (thinner, USD/USDC-margined) and BTCUSDT.BINANCE (deep USD-M perp). Because both track the identical asset, their price spread is tightly cointegrated and mean-reverts, but during volatility bursts and one-sided liquidity events the thinner Hyperliquid book leads or lags Binance, opening a transient dislocation of tens of basis points. The strategy measures the log spread, normalizes out any persistent stablecoin/funding offset with a rolling mean, and trades ONLY large z-score deviations: LONG the cheaper venue's perp + SHORT the richer venue's perp in equal notional (net delta ≈ 0), unwinding both legs on convergence back toward the rolling mean. This is deliberately NOT single-name momentum/trend (0/213 OHLCV — dead), NOT a single-name mean-reversion fade (L53 — dead), NOT a non-price feed gate (L46 — dead), NOT cross-sectional rank momentum (L52 — dead), NOT options (L50) or COIN-M (L51). It is distinct from the two ETH cross-venue items already pending (a funding-differential CARRY and a spot-perp basis): different asset (BTC), different pair of venues (HL vs Binance, both perps), and a different signal (transient price dislocation vs its own rolling mean, not continuous funding harvest). It fills THREE of the most under-represented buckets at once: cross-venue (6.8% vs ≥15% target), long-short/market-neutral (13.2% vs the ≥45% implied by the ≤55% long-only cap), and Hyperliquid (6.4% vs ≥20% target).

Hypotheses

The Layer-3 failure was not a threshold or a data problem — it was structurally impossible code, and I traced it to the base template rather than guessing. FactoryStrategy buffers primary bars in self._bars and trims that list to self._max_bars = 500, then refuses to run the signal while len(self._bars) < min_bars_required(). Iteration 3 returned lookback + 5 = 1349, so the buffer saturated at 500 while the gate demanded 1349 and calculate_signal() was never invoked once across all 12,576 primary bars, exactly matching the reported '0 evaluated bars'. The fix is the smallest one that removes that gate: min_bars_required() now returns a small warmup_bars (default 20, bounded 5-400, safely under the 500 cap) instead of the lookback. This does NOT weaken the statistical warm-up, which never lived in self._bars anyway — it lives in this strategy's own synchronised _spread_hist buffer (capped separately at 4032), and the full 14-day window is still strictly enforced before any trade by the pre-existing act_valid = len(self._spread_hist) >= self.lookback gate and by _update_stats returning a flat 0.0 until the window fills. Every other line, including the one-bar execution lag, the typical-price spread, the dual z + bps gate and the neutral two-leg submission, is carried over unchanged from the version that passed Layers 1-2. I verified the data first: HL 15m runs 2026-03-16 to 2026-09-02 and Binance 15m spans 2019-12-31 to date, giving 12,576 contemporaneous aligned bars — a number that matches the diagnostic's primary-bar count exactly, confirming the cross-leg alignment barrier was already working and the warm-up gate was the sole blocker. I then replayed the coded rule on those aligned bars: 11,233 bars clear the lookback, 324 arm the default entry gate, and the simulation produces 85 completed round trips, so the zero-trade failure is genuinely resolved rather than merely loosened.

Hypotheses

L57/L44 cross-venue same-asset perp-spread reversion whose premise is falsified by the developer's own measurement and confirmed by the engine — not worth 2 hours of optimization. The HL-Binance BTC spread has sigma 2.0 bps and median deviation 1.1 bps (99.9th pct 12.6 bps, all-time max 28.3 bps) against a ~19 bps four-leg round trip, so the tradable dislocation is 25-60x smaller than its cost — the two venues track to within a couple of bps because arbitrageurs already police it. The backtest bears this out: avg_trade_return_pct 0.0027% (~370x below the 0.15% floor), Sharpe -3.12 with CI [-5.83, -0.35], profit_factor 0.55, total_return -3.84%, expectancy -$52.8/trade over 144 trades, and commission at 49.85% of gross. The book is genuinely delta-neutral and cleanly built (not a code defect — the warm-up fix worked), but there is no edge, and no threshold/hold/timeframe recovers a spread this tight. It is also structurally single-regime: HL 15m data begins 2026-03-16 (~172 days), so it could never populate walk-forward/holdout. benchmark_meaningful is correctly false. Failure pattern: no_edge/fee_edge cross-venue same-asset spread reversion, spread too small to clear multi-leg round trip (L57/L44).

Implementation

Market-neutral cross-venue statistical arbitrage on the same underlying (BTC) traded as a perpetual on two venues: BTCUSD.HYPERLIQUID (primary, thinner, USD-margined) and BTCUSDT.BINANCE (deep USD-M), both on 15-MINUTE bars. Each bar the strategy builds the log spread between the two venues' typical prices (H+L+C)/3 in basis points, normalises out the persistent stablecoin/funding offset with a 1344-bar (14-day) rolling mean, and z-scores it against that window's standard deviation. When the previous bar's z exceeds entry_z AND the absolute deviation clears min_dev_bps, it LONGS the cheaper venue's perp and SHORTS the richer one in the SAME base quantity, so the book is delta-neutral from inception and carries no BTC direction. Both legs unwind together on convergence (|z| back inside exit_z), on a max_hold_bars cap, or on a divergence stop when the spread widens max_adverse_bps beyond the entry spread; a short cooldown prevents re-arming on the same event. All trade decisions read the PREVIOUS bar's z and deviation while fills happen on the current bar, so the engine can never fill at the print that produced the signal. Sizing is capital-relative (per_leg_pct of venue equity per leg, equal base quantity on both legs) and both legs must clear the venue minimum or neither is sent, so a one-legged naked position can never be created.

Verification Results

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSD.HYPERLIQUID-15-MINUTE-LAST-EXTERNAL, Bars processed: 13237 Diagnostics: calculate_signal() was never evaluated (0 evaluated bars) -> min_bars_required() = 1349 but only 12576 primary bars were available in the smoke window -> the warm-up can never complete here; lower the lookback/warm-up requirement or use a shorter bar type. Do NOT loosen entry thresholds — the entry logic never ran. Ensure your strategy produces trades with the given data and parameters.

Backtest Review

Faithful, cleanly-built market-neutral implementation; iteration-4 warm-up fix worked (144 trades executed, both legs delta-neutral)

Backtest Review

Correct execution realism: one-bar lag, typical-price spread, contemporaneous cross-leg alignment barrier, absolute bps floor plus z-score

Backtest Review

Developer honestly pre-registered the negative verdict rather than flattering it with a rare-event sample

Backtest Review

Same-asset spread is structurally too small: sigma 2.0 bps / median dev 1.1 bps vs a ~19 bps four-leg round trip — dislocation is 25-60x smaller than trading cost

Backtest Review

avg_trade_return_pct 0.0027% — ~370x below the 0.15% floor; net edge is essentially zero

Backtest Review

Negative and significant: Sharpe -3.12 (CI [-5.83, -0.35]), PF 0.55, total_return -3.84%, expectancy -$52.8/trade, PSR 0.11

Backtest Review

Commission is 49.85% of gross flow — fees consume half the gross, classic sub-cost-spread signature

Backtest Review

HL 15m data starts 2026-03-16: ~172 days, single-regime (only_one_regime true) — cannot populate walk-forward/holdout

Iteration History

BtcCrossVenuePerpDislocationReversionNeutral1H

Iteration History

Verification failed (Layer 4 — QA review): - FEE/EDGE VIABILITY FAILURE in the optimistic (zero-latency) backtest. Sandbox loses: total_return -0.12%, Sharpe -0.76, PF 0.95, PSR 0.197, avg_win 134 < avg_loss 174 over 58 trades; avg_trade_return_pct 0.133% is below the 0.15% futures floor and USD expectancy is negative. Best case (no latency/slippage) and it still fails to clear costs. - Edge is a ~1-bar cross-venue sampling/latency artifact, non-viable live. Average hold is 1h 4m ~= ONE 1H bar. The developer explicitly measured this class of edge flips from +13 bps to -18 bps/trade with a single-bar execution delay and that dislocations essentially never persist to the next bar. The zero-latency engine fills at the decision price; live cross-venue execution on the thin HL book cannot. - Negligible capacity / enormous impact + unmeasurable, regime-concentrated sample. capacity_usd ~$57K, impact_cost_pct 132%, total_impact_usd $1000 (already folded into -0.12%). BTCUSD.HYPERLIQUID history starts 2025-10-11 (~300 days), dislocations cluster in July 2026, only 58 trades (below the ~100 floor), so walk-forward windows are short and the 15-day holdout near-empty.

Iteration History

Verification failed (Layer 4 — QA review): - PREMISE FALSIFIED under realistic execution. Iteration 2 correctly hardwires the one-bar execution lag I asked for (decisions read the previous bar's completed z/dev, fills execute at the current bar), and with the zero-latency fill artifact removed the edge disappears: sandbox total_return -0.65%, Sharpe -1.45, PF 0.56, win_rate 0.40, PSR 0.049, avg_trade_return_pct 0.013% (~zero) over 30 trades with ~1-bar holds. The developer's event study confirms it: across the 15 events reaching 20 bps in HL BTC's entire history, the dislocation decays 29.5 -> 2.7 bps (91% gone) within the hour, so a lagged fill lands after the reversion (-16 bps/trade at min_dev 20; no threshold recovers it). The iteration-1 'edge' was entirely the fill-at-decision-price artifact. - Structurally unmeasurable and unfixable in code: BTCUSD.HYPERLIQUID has only ~300 days of 1H history and only 15 bars in the whole sample reach a 20 bps deviation. 30 trades over 298 days is below the measurability floor and the 15-day holdout is near-empty regardless of parameters (PSR 0.049, Sharpe CI [-3.11, 0.48]).
Strategy report

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