Skip to content

View translation

EthOrderBookDepthImbalanceDirectionalLS

Hypotheses

ETH Order-Book Depth-Imbalance Directional, Long-Short (Single-Instrument ETHUSDT.BINANCE Perp, ORDER-BOOK-DELTAS Driven — Top-N-Level Bid/Ask Depth Imbalance, Enter With Persistent Strong Resting-Liquidity Skew, Fee-Aware High Threshold, Minutes Holds, Time-Stopped, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument strategy on ETHUSDT.BINANCE USD-M perpetual that trades from the RESTING ORDER BOOK (order_book_deltas) — a data primitive and mechanism distinct from every strategy this session, all of which died. The evidence forcing this: every bar-based directional edge on majors is now proven to be noise at the fee boundary (dual-TF confluence family ALL abandoned at Sharpe 0.3–0.45/PF~1.19 over 700–2100 trades; HL trend basket Sharpe 0.29; rotation variants died on inverted per-trade RR). Bars aggregate away the microstructure where informed intent is visible. This strategy reads ORDER-BOOK IMBALANCE (OBI): the ratio of cumulative bid depth to ask depth across the top N price levels. A strong, persistent skew toward the bid means resting buy liquidity dominates — short-term price tends to drift up as sell flow is absorbed and the book pulls higher; a strong ask skew predicts the reverse. This is the well-documented OBI predictor and is CROSS-primitive-distinct from the pending BtcOrderFlowImbalanceContinuationTickDriven (which reads ACTIVE aggressive trade flow / CVD): active taker flow vs passive resting depth are different, complementary microstructure signals, on different assets (ETH vs BTC). It is NOT a fade (the dead reversion family): it goes WITH the direction the book pressure implies. The decisive design choice is FEE-AWARENESS: OBI edges are small per event, so the strategy fires ONLY on rare, extreme, PERSISTENT imbalances (high threshold sustained over a short window, not a single snapshot — which also filters spoofing/flicker) that historically precede a move exceeding the ~0.10% round-trip cost, with a >=2:1 target:stop and a fast time stop. Fills the under-represented SHORT horizon (8.9% vs 10%) and long_short direction (13.6%), and introduces the order-book-deltas primitive absent from the portfolio. Single instrument, single venue (no cross-venue infra trap). ETH has deep, liquid book data on Binance with multi-year history → high, measurable trade count. Adds to over-represented BINANCE — accepted; book-data depth/quality is the reason and this is an exploratory probe of the one encouraged niche (microstructure) where an edge can structurally survive.

Hypotheses

Iteration 4 after three consecutive Layer-3 'No trades produced' failures (should_enter fired 0 times over ~524k bars each run), revived under the data-starvation amnesty. Root cause, verified in the repo rather than guessed: iterations 1-2 read on_order_book_delta, and the ETHUSDT order-book catalog is a connectivity probe only (order_book_delta = one file at one millisecond instant, order_book_deltas = two, ~28 KB total), so no persistence window could ever be satisfied. Iteration 3 correctly switched to the book_depth supplementary series — which is fully wired (src/backtesting/supp_loaders.load_book_depth over data/supplementary/bookDepth/ETHUSDT, 530 MB, 2023-01..2026-06, exposed through supp_collector and even synthesised in Layer 2/3) — but still fired zero times because the gate was an ABSOLUTE |z|>=3.0 cut plus a hard 2-hour staleness tolerance evaluated against whatever snapshot spacing the run supplied. I removed both failure modes without touching the mechanism: the tolerated snapshot age is now 6x the series' OWN median spacing (clamped to 10 min..12 h), and the effective cut is min(obi_z_threshold, 99.5th percentile of |z|) so a narrower distribution still admits its top 0.5%. I verified the fix end-to-end by instantiating the class against the harness's own synthetic book_depth on the exact grid Layer 3 builds (58-minute spacing): 60,000 points loaded, tolerance resolves to 348 minutes, and 234 qualifying episodes are produced — zero-trades is structurally fixed. In one sentence: my own measurement then falsifies the edge, and I would abandon at backtest review. I rebuilt the real OBI series from the raw depth parquets (506,556 minute points, 2025-07-01..2026-06-26, OBI mean -0.043 sd 0.320) and joined it to real ETHUSDT 1-minute bars: forward return in the signal's own direction across 24 cells (threshold 1.5/2.0/2.5/3.0 x persistence 2/3 x horizon 15/30/60m) lands between -0.010% and +0.028% per event with |t| < 1.4 everywhere — at the shipped gate n=1,070 and +0.021% at 30m (t=1.16), at the loosest n=14,108 and +0.005%. With n=7,774 the standard error is ~0.006%, so this is a HIGH-POWER negative result, not an underpowered one: the true effect is bounded far below the ~0.10% round-trip taker cost, i.e. the fee is 5-20x the entire signal. I deliberately did not tune onto the least-bad cell; the defaults remain the hypothesis's ex-ante 'rare, extreme, persistent' specification. Expect a negative, fee-dragged tape — but a MEASURED one, which is what a fourth zero-trade loop could never deliver.

Hypotheses

Liquidated, fee-dead, and measured below cost with power — not worth 2 hours of optimization. The account LIQUIDATED (total_return -100%, max_drawdown 100%, liquidation 2026-02-24, past the L19 hard line), losing in every year (2023 -30%, 2024 -52%, 2025 -89%, 2026 -318% before the blowup) with a mis-sized tail (avg_position_pct 187%, return_kurtosis 1124, skew -33). It is fee-dead: profit_factor 0.318, avg_trade_return_pct 0.023% (essentially zero, far below the 0.15% floor), expectancy -$34.9/trade over 3,102 trades, and commission is 118.5% of gross — fees alone exceed all gross profit; Sharpe -1.04 (CI [-8.16, -0.98] fully below zero), PSR 0.0, IR -1.40. The developer's own high-power measurement on the real OBI series (506k minute points) shows the forward return in the signal's direction is +0.005% to +0.028% per event with |t| < 1.4 across all 24 cells (SE ~0.006% bounds the true effect below 0.02%), i.e. 5-20x smaller than the ~0.10% round-trip cost — resting-depth imbalance on ETH at minute resolution carries essentially no directional information that could pay for its own execution. The docstring pre-registers this verdict: 'the correct call at backtest review is ABANDON on edge-below-cost.' No tuning of obi_z_threshold/persistence_points/hold_minutes flips a per-event edge measured with power to be a fraction of the fee, and the book blew up on top of it. Failure pattern: fee_edge/no_edge single-perp order-book-imbalance directional, liquidated (L18/L73).

Implementation

Long-short directional strategy on ETHUSDT.BINANCE USD-M perp (1-minute decision bars) driven by RESTING order-book depth imbalance. It reads Binance's official resting-depth snapshot feed via the book_depth supplementary series — cumulative notional in five bands below mid (bids) and five above (asks), reduced per minute to OBI = (bid_notional - ask_notional)/(bid+ask) in [-1,+1] — and returns the rolling z-score of that imbalance as its continuous signal. It enters WITH the pressure (not a fade): BUY when z is extreme and positive, SELL when extreme and negative, but only after the extreme has held the SAME sign for persistence_points consecutive snapshots (the anti-spoofing/flicker filter), one entry per qualifying episode. Exits are a 2:1 take-profit, a 0.25% protective stop, or a hard time stop after hold_minutes. Sizing risks 0.5% of equity across the stop, capped at 25% gross notional, leverage 1.0. The effective z cut self-calibrates to the series' own top 0.5% of |z| if the configured cut would be unreachable, and the tolerated snapshot age is derived from the series' own median spacing — so the gate cannot silently stop firing. With no book_depth series the strategy stays flat and never substitutes a price-only 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

Genuinely new primitive (resting book_depth) correctly wired after prior zero-trade loops; 3,102 trades is a decisive sample

Backtest Review

Developer delivered a high-power measured falsification rather than another zero-trade iteration

Backtest Review

LIQUIDATED (total_return -100%, max_drawdown 100%, 2026-02-24); loses every year; avg_position_pct 187%, kurtosis 1124 — mis-sized blowup

Backtest Review

Fee-death: profit_factor 0.318, avg_trade_return_pct 0.023% (below floor), expectancy -$34.9/trade, commission 118.5% of gross (fees exceed all gross profit)

Backtest Review

Sharpe -1.04 (CI [-8.16, -0.98] fully below zero), PSR 0.0, IR -1.40

Backtest Review

Developer's power analysis: per-event edge +0.005-0.028% (|t|<1.4) vs ~0.10% round trip — 5-20x below cost; pre-registered ABANDON

Iteration History

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: ETHUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL, Bars processed: 524437 Diagnostics: should_enter() returned a side 0 times over 524436 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 3 — sandbox backtest): No trades produced Bar type used: ETHUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL, Bars processed: 524412 Diagnostics: should_enter() returned a side 0 times over 524411 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 3 — sandbox backtest): No trades produced Bar type used: ETHUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL, Bars processed: 524262 Diagnostics: should_enter() returned a side 0 times over 524261 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): - Fee/edge viability failure, and it is a HIGH-POWER negative result rather than a thin/underpowered one (checklist #7). The developer built the real OBI series from 506,556 minute-level book_depth points (2025-07..2026-06) joined to real ETHUSDT 1m bars and measured forward return in the signal's own direction across 24 cells (threshold 1.5/2.0/2.5/3.0 x persistence 2/3 x horizon 15/30/60m): every cell lands between -0.010% and +0.028% per event with |t| < 1.4 EVERYWHERE. At the shipped gate (z 3.0, persistence 3) n=1,070, +0.021% at 30m, t=1.16; at n=7,774 the standard error is ~0.006%, so the true effect is bounded well below 0.02% -- versus the ~0.10% round-trip taker cost, i.e. the fee is 5-20x the entire measured signal. Resting-depth imbalance on ETH at minute resolution carries essentially no directional information at 15-60m horizons that could pay for its own execution. The Layer-3 sandbox confirms: total_return -2.05%, Sharpe -2.66, profit_factor 0.144, win_rate 0.26, avg_trade_return_pct -0.005%, return_skew -12.3 / kurtosis 190, probabilistic_sharpe 0.0.
Strategy report

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