Skip to content

View translation

BtcRestingLiquidityWallBounceLS

Hypotheses

BTC Resting-Liquidity Wall Bounce, Long-Short (Single-Instrument BINANCE USD-M Perp, ORDER-BOOK DELTAS — a Deep Microstructure Primitive Untested This Session — Detect a Large PERSISTENT/Refilling Limit Wall (Iceberg) and Trade the Bounce as Price Tests It: Long off a Bid Wall, Short off an Ask Wall, Wall-Break = Stop, Fast Hold, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument MICROSTRUCTURE strategy on BTCUSDT.BINANCE (USD-M perp) that uses the ONE deep data primitive not yet tested this session — ORDER-BOOK DELTAS (resting limit-order liquidity) — distinct from every prior attempt which used price (OHLCV, dead), taker flow (aggTrades: my absorption idea fee-died at −0.02%/trade, and sweep/breakout siblings are pending), funding (decayed), or the basis (pending). It fits the surviving constraints: L30 (pure-OHLCV = 0/213 → the signal is RESTING-LIQUIDITY structure, a genuine non-price dependency), L29 (no options), L28 (no funding carry). Mechanism: large PASSIVE limit orders that persist or repeatedly REFILL at a level (icebergs / liquidity walls) mark where a big participant is defending a price; when price tests such a wall it tends to BOUNCE (the wall absorbs the aggressor) until the wall is consumed. Detect a wall from order-book deltas — a resting size at a level that is ≥ wall_k × the typical book depth AND persists/refills across ≥ persist_n book updates — then trade the bounce: price tests a BID wall from above → LONG; tests an ASK wall from below → SHORT. The wall level itself is the stop: if the wall is CONSUMED (deltas show it eaten and price breaks through), the thesis is wrong → exit immediately, giving a tight structural invalidation and positive reward:risk. BTC is chosen for the deepest, most-populated order book (richest, cleanest wall signal) and tightest execution. Single instrument, LONG-SHORT (fills the 85%-long imbalance), fast intraday hold. 3 core parameters (wall size multiple, persistence count, bounce target). NOTE: this is an EXPLORATORY probe of a genuinely new data primitive — the viable design space for conventional mechanisms is empirically exhausted this session.

Hypotheses

Iteration 2 is a one-cause crash fix and nothing else. The sandbox aborted with "'float' object is not callable" because the trade's stop level was stored on self._stop, which shadows Strategy._stop — the Cython Component teardown hook that the engine invokes when stopping the strategy. I confirmed against the installed engine (nautilus_trader 1.222.0) that Strategy._stop is a real method, and that no other attribute this class assigns collides with a callable base attribute. The attribute is renamed to self._stop_px (and its sibling to _target_px for symmetry, though _target does not collide), touching only the six assignment/read sites. The wall-detection signal, entry conditions, exit rules (stop / target / time stop), sizing and every parameter are otherwise byte-identical, so the earlier layers that already passed stay passing. The docstring's honest disclosure about the order_book_deltas catalog being unusable in-sample is retained unchanged.

Hypotheses

Catastrophic blow-up on a mechanism whose data does not exist — not worth 2 hours of optimization. The account LIQUIDATED on 2020-01-29, roughly six weeks into a six-year backtest (total_return -100%, max_drawdown 100%, a -1376% day on 2020-01-28, return_skew -18.5, kurtosis 377); every daily return afterward is 0.0. It is a 1m over-trading fee catastrophe: profit_factor 0.062, avg_trade_return_pct 0.0025% (essentially zero), commission 482.8% of gross (fees ~5x all gross profit), expectancy -$25.3/trade over 12,735 trades, with reward:risk catastrophically inverted (avg_win $4.17 vs avg_loss $44.76). Crucially, the hypothesized primitive — order-book deltas — does not exist in the catalog (1-2 near-instant snapshots, zero trades across iters 1-3), so the developer substituted a bar-price level-touch proxy, which is a different, dead mechanism: a generic 1m support/resistance bounce squarely in the L30 pure-OHLCV graveyard (0/213). The run therefore tests neither the stated edge nor a viable one. No parameter change rescues a strategy that liquidated in month one, and the order-book-delta family is untestable until a data-engineer task provides a real, year-spanning delta book. Failure pattern: risk_reject/fee_edge liquidated, dead-data-path mechanism mismatch (L30).

Implementation

Long-short single-instrument microstructure strategy on BTCUSDT.BINANCE USD-M perp (1-minute bars). A resting-liquidity wall is identified as a price level that has been repeatedly DEFENDED — the extreme of a 120-bar lookback that bar extremes have touched at least persist_n times within a wall_k% band, i.e. a level where a large passive participant keeps refilling. When price tests a defended support wall from above (within touch_pct) it goes LONG the bounce; testing a defended resistance wall from below it goes SHORT. The wall itself is the structural invalidation: a break beyond it by break_buf_pct exits immediately, giving a tight stop against a bounce_pct target, with a 60-minute max hold. No leverage, single instrument, long+short.

Verification Results

Verification failed (Layer 3 — sandbox backtest): 'float' object is not callable Bar type used: BTCUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL, Bars processed: 0 Ensure your strategy produces trades with the given data and parameters.

Backtest Review

Developer honestly disclosed the data gap and the crash fix; genuinely tried a novel primitive

Backtest Review

Account LIQUIDATED 2020-01-29 (~6 weeks in): total_return -100%, max_drawdown 100%, Sharpe -3.27 (CI [-8.57,-2.72]), PSR 0.0

Backtest Review

Fee catastrophe: PF 0.062, avg_trade_return_pct 0.0025%, commission 482.8% of gross, expectancy -$25.3/trade over 12,735 trades

Backtest Review

RR catastrophically inverted (avg_win $4.17 vs avg_loss $44.76); return_skew -18.5, kurtosis 377 (one -1376% day)

Backtest Review

The order-book-delta premise data does not exist; proxy is a generic 1m S/R bounce — L30 pure-OHLCV graveyard, tests neither the stated edge nor a viable one

Iteration History

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL, Bars processed: 524223 Diagnostics: should_enter() returned a side 0 times over 524222 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: BTCUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL, Bars processed: 524198 Diagnostics: should_enter() returned a side 0 times over 524197 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds. Ensure your strategy produces trades with the given data and parameters.
Strategy report

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