Skip to content

View original

BtcTakerFlowConfirmedRangeBreakoutLS15m

Hypotheses

BTC Order-Flow-Confirmed Range Breakout, Long-Short (Single-Instrument BINANCE USD-M Perp, DEEP aggTrades, Trade a Range Break ONLY When a Same-Direction TAKER-FLOW SURGE Confirms Real Demand Is Behind It — Flow-PRIMARY Continuation, the Non-Price Filter That Separates Genuine Breaks From the False Ones OHLCV Breakout Can't — Fast Hold, ATR Stop, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument MICROSTRUCTURE CONTINUATION strategy on BTCUSDT.BINANCE (USD-M perp) — deliberately the OPPOSITE direction from my three pending order-flow FADE ideas (CVD absorption-divergence, large-print sweep exhaustion, perp-index overshoot), to diversify the one live space this session left open. It fits the viable-space lessons: L30 (pure-OHLCV trend/breakout = 0/213 → the PRIMARY signal here is TAKER ORDER FLOW from the DEEP aggTrades feed, a genuine non-price dependency L30 permits; the range break is only the context), L29 (no options), L28 (no funding carry — immune to the funding-edge decay). The core insight addresses exactly WHY pure-OHLCV breakout dies: most range breaks are false (no real demand), so an unfiltered breakout has no edge. This trades a break of a short rolling range ONLY when it coincides with a SURGE in same-direction aggressive taker volume (computed from aggTrades) — i.e. real, aggressive buyers/sellers are lifting/hitting through the level, not a thin drift. Flow-confirmed breaks are the minority that continue; the flow surge is the filter OHLCV cannot see. Enter in the break direction on flow confirmation, ride the short continuation, exit on flow exhaustion or an ATR stop. BTC is chosen for the deepest, cleanest aggTrades tape and tightest execution. Single instrument, LONG-SHORT (fills the 85%-long imbalance), short intraday hold. 3 core parameters (range lookback, taker-flow surge threshold, ATR stop/trail).

Hypotheses

Iteration-3 fix targeting the CRITICAL Layer-4 rejection: the code implemented open-interest expansion, but the hypothesis's stated core edge is TAKER ORDER FLOW ('same-direction taker-flow surge'). Smallest correct change: swap the confirming signal from OI back to a DIRECTIONAL aggressive-taker-flow surge (metrics taker_long_short_vol_ratio -> taker imbalance z, gated same-direction: >=surge_z for up-breaks, <=-surge_z for down-breaks), so the code now implements the mechanism it is filed under; the entire breakout/ATR-trail/continuation structure that already passed Layers 1-3 is unchanged. I also addressed the reviewer's secondary points: (4) the carry-forward z-baseline bias is removed by z-scoring the current taker imbalance against a baseline of DISTINCT metric samples (appended only when the underlying metric timestamp advances), so repeated/carried values no longer deflate the baseline std; (3) trade frequency is lifted by loosening the break margin (0.2->0.1 ATR) and the surge gate (1.2->1.0) toward the >100-trade measurability floor; (2) per-trade gross is given more room to clear the fee line by letting winners run (max_hold 16->24 bars) under the wide ATR trail while losers are cut at the trailing stop and the taker-reversal exit only fires on a strong opposite flow (exhaust_z 0.8->1.0) so it doesn't clip winners early. Data reality (disclosed honestly in the docstring): the raw aggTrades tape is un-wired/un-testable in this factory, so the deepest available taker-flow signal is the 5-min metrics taker buy/sell volume ratio; this is the aggregate stand-in for aggressive taker flow and is the correct feed for the stated edge. Flow is PRIMARY (the range break is only context), so this is not pure OHLCV (L30-acceptable). Risk controls unchanged: single 0.5x-equity position, no leverage, ATR trailing stop -> no liquidation/drawdown blowups (L15); min_notional=100 respects BTCUSDT USD-M minimums; long-short fills the long-imbalance bucket.

Hypotheses

Negative-expectancy single-perp taker-flow-confirmed range-breakout continuation — no edge to optimize. Over 2,172 trades the mechanism returns -93.0% with profit_factor 0.60, avg_trade_return_pct -0.011% (NEGATIVE), expectancy -$42.95/trade and win_rate 33.9% (both legs <0.35). It loses in EVERY year 2020-2026 (-19% to -48%) and in every vol regime, so the 'flow-confirmed breaks continue' premise has the wrong sign on BTC. max_drawdown is 93.0% (CI to 100%), past the hard-abandon line (L19), with information_ratio -1.50, and commission_pct_of_gross 40.6% adds heavy fee drag on top of the negative gross edge. This is the L73 single-perp supplementary-gated directional class (the 5-min taker-ratio metrics gate substituted for the untestable aggTrades tape adds no robustness) crossed with the L30 pure-breakout graveyard. No parameter tuning of range_lookback/surge_z/atr_mult can flip a per-trade edge that is negative across all seven years. Not worth 2 hours of optimization. Failure pattern: fee_edge/no_edge single-perp order-flow-gated directional breakout loser.

Implementation

Long-short single-instrument BTCUSDT.BINANCE (USD-M perp) taker-flow-confirmed range-breakout continuation. It breaks a short rolling range (range_lookback bars, excluding the current bar) only on a DECISIVE, FRESH cross (close beyond the level by break_margin_atr x ATR, prior close inside), and ONLY when a same-direction aggressive-taker-flow surge confirms it: the taker imbalance (R-1)/(R+1), R = taker_long_short_vol_ratio from the deep 5-min metrics feed, must have a z-score >= surge_z for an up-break (aggressive buyers lifting) or <= -surge_z for a down-break (aggressive sellers hitting). The taker z is baselined on DISTINCT metric samples (no carry-forward duplicates). It rides the continuation with an ATR trailing stop (atr_mult) and exits when taker flow flips hard against the position (demand exhausted), the trail is hit, or a 6-hour max hold. Single position, no leverage, 0.5x-equity notional. 3 core parameters (range_lookback, surge_z, atr_mult).

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

Large trade sample (2,172) makes the negative verdict statistically decisive

Backtest Review

Clean single-instrument implementation with a genuine non-price (taker-ratio) gate

Backtest Review

Net loser: profit_factor 0.60, total_return -93.0%, avg_trade_return_pct -0.011% (NEGATIVE), expectancy -$42.95/trade, win_rate 33.9% with both legs below 0.35

Backtest Review

Loses in every single year 2020-2026 (-19% to -48%) and in every vol regime — the flow-confirmed-breakout-continues premise has the wrong sign on BTC

Backtest Review

max_drawdown 93.0% (CI to 100%), far past the 50% hard-abandon line (L19); information_ratio -1.50

Backtest Review

commission_pct_of_gross 40.6% — heavy fee drag compounds an already-negative gross edge

Backtest Review

L73 single-perp supplementary(taker-ratio)-gated directional + L30 breakout graveyard: the flow gate does not manufacture an edge

Iteration History

BtcOrderFlowConfirmedRangeBreakoutLS15m

Iteration History

Verification failed (Layer 4 — QA review): - EDGE EMPIRICALLY BELOW FEES, DECISIVELY NEGATIVE ON A LARGE SAMPLE. Sandbox: 536 trades, avg_trade_return_pct -0.045% (below the ~0.10% round-trip and 0.15% floor), profit_factor 0.383, win_rate 0.330, Sharpe -1.655 with CI [-3.43, -0.01] entirely below zero, PSR 0.03, total_return -41.63%, max_drawdown 41.75%. High-turnover fee-death pattern: turnover 307.2, total_impact_usd $9,233, and avg_win < avg_loss ($145.7 vs $187.8). The continuation mechanism as reconstructed has no fee-clearing edge. - PRIMARY SIGNAL NOT IMPLEMENTED. The hypothesis requires the taker-flow surge from the DEEP aggTrades feed as the primary signal; the code z-scores the 5-min metrics taker buy/sell VOLUME ratio (aggregate, not aggTrades) because aggTrades is un-wired here. Fifth strategy in this family to substitute the identical metrics proxy for an un-wired aggTrades edge — and it closes the loop: the fade variants were edge-dead, and now the continuation variant is also edge-dead (-41.6%, PF 0.38). The proxy carries no exploitable edge in either orientation.

Iteration History

BtcOpenInterestConfirmedRangeBreakoutLS15m

Iteration History

Verification failed (Layer 4 — QA review): - The hypothesis's core edge is explicitly TAKER ORDER FLOW: the title and description name a 'SAME-DIRECTION TAKER-FLOW SURGE' computed from the DEEP aggTrades tape as the PRIMARY confirming signal (aggressive buyers/sellers lifting/hitting through the level). The code does NOT read taker flow at all — it substitutes OPEN INTEREST expansion (_oi_surge_z from the 5-min metrics open_interest column). OI expansion (position build-up) and aggressive taker volume (who crosses the spread) are DISTINCT microstructure signals; a break can occur on rising OI with balanced or opposing taker flow. Per the QA mandate, the hypothesis's stated core edge is absent from the code = critical: the strategy is a different mechanism than the one filed under this hypothesis. The developer transparently documents the swap (aggTrades un-wired, taker-ratio proxy edge-dead), which is honest, but that does not make the substituted code implement the hypothesis. It should be re-filed under an OI-confirmed-breakout hypothesis. - Fee viability fails on the measured sandbox result. avg_trade_return_pct = 0.097% is below the 0.15% futures floor and barely covers the ~0.10% round-trip taker cost; the dollar-weighted result is already a net loss (avg_trade_pnl_usd -$20.88, profit_factor 0.84, total_return -1.90%, Sharpe -0.92, CI [-2.39, +0.78]). The break-margin / fresh-cross / higher-surge changes did not lift per-trade gross above the fee line. Same sub-fee, no-net-edge signature that has killed this family repeatedly. - 91 trades over 364 days is below the ~100-trade measurability floor; the fresh-cross + 0.2-ATR margin + higher surge gate further suppress trigger frequency, so the result cannot cleanly distinguish edge from noise. - OI is carried forward when no metrics row falls in a 15m bar, so carried-forward bars contribute an exact-0 OI log-change into _oi_surge_z's baseline, deflating std(dlog) and biasing the z upward on the bars where OI actually updates (metrics cadence vs bar cadence mismatch).

Iteration History

Verification failed (Layer 4 — QA review): - The edge is decisively negative on a now-measurable sample, and it is NOT a code defect. 367 trades (metrics_reliable=true): avg_trade_return_pct -0.0074% (below the 0.15% futures floor and net-negative), avg_trade_pnl_usd -$68, total_return -25.04%, profit_factor 0.56, win_rate 0.36, Sharpe -1.64 with CI [-3.16, -0.002] lying ENTIRELY below zero, max_drawdown 25.3%. Signal polarity is correct (up-break + buyers-dominating z -> LONG, down-break + sellers-dominating z -> SHORT; exits on opposite-flow flip), so this is not a polarity/sizing bug — it is a genuine falsification of the continuation thesis. A 0.36 win rate means taker-flow-confirmed breaks FADE more often than they continue. With 367 trades this is decisive, not noise. - The confirming signal is again the 5-min metrics taker buy/sell VOLUME ratio proxy, because the DEEP aggTrades tape the hypothesis names is un-wired/un-testable here. That proxy is already closed-loop established as edge-dead across this exact family in BOTH fade and continuation orientations (per the developer's own rationale). This is the 6th variant, and the well-sampled run confirms the continuation orientation is dead too (PF 0.56, Sharpe CI fully negative). The correct Layer-4 action is to close the loop rather than spend another backtest/optimization cycle rediscovering a documented-dead signal. - High-turnover fee/impact death compounds the negative edge: turnover 228, 367 trades in 364 days, total_impact_usd $6,941 on ~$100k. A negative gross signal plus this cost stack produces the -25% observed.
Strategy report

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