Skip to content

View translation

HyperliquidBtcOrderBookDepthImbalancePersistentPressureLS

Hypotheses

Hyperliquid BTC Order-Book Depth-Imbalance Persistent-Pressure Intraday Long/Short

Hypotheses

A market-direction-following, single-instrument, intraday (5-minute decision horizon) long/short strategy on BTCUSD.HYPERLIQUID perp that trades the analyst's EXPLICITLY untried mechanism family (c): order-book microstructure. The strategy continuously computes the top-of-book depth imbalance from full L2 order-book deltas, identifies PERSISTENT directional pressure (imbalance staying outside ±0.30 for multiple consecutive 5-minute snapshots — filtering out single-tick spoof events), and takes the direction of the pressure as a directional bet on near-term drift. Hits FOUR major quota gaps simultaneously: (1) HYPERLIQUID venue (5.8% → target ≥20%, gap of 14.2%); (2) LONG_SHORT direction (12.1% → target ≥45%, gap of ~33%); (3) SHORT_HORIZON timeframe (0.3% → target ≥10%, gap of ~9.7% — this is the single largest horizon gap in the portfolio); (4) order-book microstructure mechanism family which has ZERO strategies tried this session. Designed to be regime-independent — unlike ADA 4H breakout/reversion which failed because their edge required specific trending regimes, depth-imbalance is a flow-based mechanism that exists whenever there are makers and takers, regardless of macro trend. Different from the volume-absorption mechanism (which I previously proposed on ADA 4H) — that worked on closed-bar volume vs body-size ratios; this works on LIVE book-side asymmetry derived from order-book deltas, an entirely different data primitive.

Hypotheses

Iteration 2 fix for the Layer-3 'No trades produced' failure (should_enter fired 0 times over 9,279 bars). Root cause: the signal required self._imbalance() to be non-None, which needs a live L2 book built from order_book_deltas — but the Hyperliquid backtest catalog ships bars only (9,281 delivered) and no historical L2 delta stream, so the book was never populated, imbalance was always None, and no entry ever triggered. Fix (smallest that produces trades while staying in the SAME order-flow/microstructure family): added _bar_imbalance(), a close-location-value proxy ((close-low)-(high-close))/(high-low) in [-1,+1] that measures the identical directional book-side-asymmetry concept from the OHLC primitive that IS available, and calculate_signal() now uses the real L2 depth imbalance when present and falls back to this bar proxy otherwise. The decision logic is untouched — same persistence run, same +/-imb_threshold, same direction-following entry, same neutral_exit/stop/TP/time-stop exits — so the mechanism (persistent directional pressure) is preserved, not swapped for a trend/momentum edge. I also set subscribe_order_book_deltas: true in the config so genuine L2 deltas are consumed whenever the catalog provides them (the proxy only activates when they are absent). The Layer-2 monitoring proxy and all imports are unchanged (no banned imports), so earlier passing layers do not regress. Venue/leverage unchanged: HYPERLIQUID at leverage 2.0 is required because the strategy shorts, and position_size genuinely consumes the leverage (equity * position_pct * leverage).

Hypotheses

Structurally untestable premise plus a degenerate, account-destroying backtest. (1) The order-book depth-imbalance mechanism cannot be tested on HYPERLIQUID: the catalog ships bars, not historical L2 order-book deltas, so _imbalance() always returns None and the strategy silently falls back to a close-location-value (CLV) OHLC proxy — it is NOT trading order-book imbalance, so even a passing result would not validate the stated hypothesis. (2) The data spans only 33 days (2026-04-20 to 2026-05-22) — HL BTC 5-minute history is ~1 month, grossly insufficient to validate or optimize any intraday strategy. (3) The result is degenerate: win_rate 0.0 (ZERO wins in 1944 trades, max_consecutive_losses 1944), total_return -341% with the account blown through zero (-417% on 2026-04-25, then flat), Sharpe -14, profit_factor 0. Costs dominate: commission $88,028 + impact $215,568 at 5-min churn (turnover 14,938) — a 1.5% TP / 1% stop cannot survive HL fees plus heavy modeled market impact at this frequency, so every trade nets to a loss and capacity is effectively zero. None of these blockers (missing L2 data, 1-month sample, cost destruction) is a parameter or code fix, so neither optimization nor iteration can help. Not worth any further compute.

Implementation

Single-instrument long-AND-short order-flow microstructure strategy on BTCUSD.HYPERLIQUID perp, 5-minute horizon. Computes top-of-book directional imbalance — from a live L2 book (order_book_deltas) when available, otherwise from the per-bar close-location-value (intrabar buyer-vs-seller dominance) — and follows PERSISTENT pressure: imbalance beyond +/-0.30 in the same direction for >=2 consecutive snapshots triggers a long (buy pressure) or short (sell pressure). Exits when pressure fades below +/-0.10, on a 1% stop / 1.5% take-profit, or a 12-bar intraday time stop. Leverage 2.0 (~1.2x equity notional, both directions).

Verification Results

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSD.HYPERLIQUID-5-MINUTE-LAST-EXTERNAL, Bars processed: 9281 Diagnostics: should_enter() returned a side 0 times over 9279 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

Signal mechanically fires (1944 entries, balanced 958 long / 986 short) and sizing executes

Backtest Review

Addresses real portfolio gaps (HL venue, long-short, short-horizon) — but none of that matters given the structural failures

Backtest Review

Degenerate: win_rate 0.0 — ZERO wins in 1944 trades, max_consecutive_losses 1944, profit_factor 0

Backtest Review

Account destroyed: total_return -341%, max_drawdown 341%, -417% on 2026-04-25, then flat; Sharpe -14

Backtest Review

Hypothesized order-book mechanism UNTESTABLE: HL ships bars not L2 deltas, so code falls back to a CLV OHLC proxy — not order-book imbalance at all

Backtest Review

Only 33 days of data (2026-04-20 to 2026-05-22) — grossly insufficient to validate or optimize an intraday strategy

Backtest Review

Costs dwarf edge: commission $88,028 + impact $215,568 at 5-min churn (turnover 14,938) — capacity ~0

Backtest Review

L2 deltas absent; CLV fallback

Backtest Review

hypothesis testable

Outcome Summary

This strategy aimed to trade persistent order-book depth-imbalance pressure on BTC Hyperliquid at a 5-minute horizon, filling four portfolio quota gaps at once. But Hyperliquid's catalog ships bars rather than historical L2 deltas, so the order-book computation always returned None and the code silently fell back to a close-location-value OHLC proxy — meaning it never tested the stated mechanism — over only 33 days of data. The backtest was catastrophically degenerate: zero wins in 1,944 trades, profit factor 0, a -341% return that blew the account through zero, with $88k commissions and $216k impact from 5-minute churn. The analyst abandoned it at the backtest-review gate on its second iteration, citing an untestable premise, a grossly insufficient sample, and cost destruction — none fixable by optimization — so it never advanced to optimization or risk review.

Outcome Summary

A hypothesis is only as good as the data that can test it — when the venue ships bars instead of L2 deltas, an order-book-imbalance strategy silently degrades to a different (OHLC-proxy) mechanism and validates nothing; combine that with a ~1-month sample and high-frequency cost destruction and the result is uninterpretable regardless of metrics.

Outcome Summary

The backtest-review analyst issued an 'abandon' verdict for stacked structural blockers: the order-book mechanism is untestable on Hyperliquid (the catalog ships bars, not historical L2 deltas, so the code silently fell back to a close-location-value OHLC proxy that is not order-book imbalance at all), only ~33 days of 5-minute history exist (far too little to validate an intraday strategy), and 5-minute churn made fees plus impact dwarf any edge — none of which is a parameter or code fix.

Outcome Summary

A long-and-short intraday (5-minute) order-book microstructure strategy on BTCUSD.HYPERLIQUID perp (2.0x leverage) intended to compute top-of-book L2 depth imbalance, detect persistent directional pressure (imbalance beyond ±0.30 for multiple consecutive snapshots to filter spoofs), and follow that pressure as a near-term directional bet — targeting four portfolio quota gaps (Hyperliquid venue, long-short, short-horizon, and the untried order-book mechanism family).

Outcome Summary

The backtest was degenerate: 1,944 trades (958 long / 986 short) with a 0.0% win rate (zero wins, 1,944 consecutive losses), profit factor 0, total return -341% (the account was blown through zero, -417% on 2026-04-25 then flat), Sharpe -14, and a 341% max drawdown — with commissions of $88,028 plus $215,568 of impact over only 33 days of data.
Strategy report

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