Skip to content

View translation

BtcOrderFlowIgnitionBurstContinuationLS

Hypotheses

BTC Perp Order-Flow Momentum Ignition — Long-Short, Tick-Level (BTCUSDT.BINANCE USD-M, trade_ticks — Enter WITH an Extreme, Multi-Print Burst of One-Sided Aggressive Taker Volume That Carries Permanent Price Impact, Ride the Informed Continuation with a Volatility Trailing Stop, Flat Between Bursts; 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument, EVENT-DRIVEN strategy that trades the PERMANENT-IMPACT (informed-flow) component of aggressive order flow on the most liquid crypto perp, BTCUSDT.BINANCE USD-M — using TRADE TICKS (aggTrades), a data primitive that is almost entirely unused in a 2321-experiment, OHLCV-dominated portfolio. It is deliberately NOT any of the exhausted families: NOT bar-level momentum/trend-confluence (0/213 OHLCV, class-prior-abandoned), NOT a mean-reversion fade (L53), NOT a squeeze breakout (L54), NOT a cross-venue basis/carry (that family is now saturated in the pipeline), NOT a non-price-feed GATE on a bar impulse (L46 — this uses the raw executed-trade tape itself as the PRIMARY driver, at tick granularity, not a supplementary feed gating a 4H candle). Market-microstructure theory (Kyle/VPIN, trade informativeness) says large one-sided aggressive flow has a PERMANENT price-impact component: price does not fully revert after informed sweeping, leaving a persistent continuation. The strategy fires only on EXTREME, sustained one-sided taker-volume bursts (informed accumulation/distribution over a few minutes) and rides the persistent leg with a volatility trailing stop so winners run past the fee hurdle. It fills two genuinely under-represented buckets — long-short direction (13.2% vs the ≥45% implied by the ≤55% long-only cap) and short horizon (9.1% vs ≥10%) — and, more importantly, diversifies the portfolio into a new data primitive and a new alpha source (execution-tape microstructure) rather than adding another OHLCV or basis clone.

Hypotheses

Single, surgical fix for the Layer-2 failure; no logic touched. All six synthetic scenarios died with the same TypeError — `_row_imbalance() takes 1 positional argument but 2 were given` — before a single signal was produced. The cause is environmental, not a bug in the signal: `_StrategyProxy` (src/verification/strategy_verifier.py) detaches the strategy instance onto a plain wrapper and re-binds EVERY callable via `types.MethodType(val.__func__ or val, wrapper)`. That rebinding turns a `@staticmethod` into a BOUND method, so `self._row_imbalance(row)` arrives as `(self, row)` and blows up on the first supplementary row in `_build_flow_series`. I removed `@staticmethod` from `_row_imbalance` and from the two other helpers that share the identical latent defect and would have failed on the very next line (`_to_ns`, called immediately after it, and `_mean_std`, called once per bar in `calculate_signal`), converting all three to ordinary instance methods taking `self`. Fixing only the one named in the traceback would just move the crash one call forward and burn another iteration. This is a known recurring trap in this codebase — `AdaFourHourParabolicSarTrendFollowingLong_v2` carries the same note in its docstring for the same reason. Everything that already passed Layer 1 is untouched: identical imports (no banned additions), identical class structure, identical z-score/entry/exit/sizing bodies, identical config and parameters, so the iteration-2 data-source fix (5-minute exchange-aggregated taker tape with ~6 years of history instead of the 1-day tick series), the removed chase gate, and the de-amplified risk all carry forward unchanged.

Hypotheses

No risk-adjusted edge and structurally capacity-limited: Sharpe -0.017 (CI straddles zero), Sortino/IR/omega all ≤0 or <1, PSR 0.48 — the +20.6%/6yr return is lumpy outlier noise (kurtosis 139). What little gross edge exists is destroyed by market impact (impact_cost_pct 42.3% of gross, capacity only $557K), and avg_trade_return_pct 0.204% barely clears the fee floor with PF 1.14. Only 240 bursts over 6 years at an already-extreme z=4 threshold, with inconsistent yearly results — tuning 3 parameters would fit noise, not find an edge. Failure pattern: fee_edge / capacity-constrained microstructure signal with zero risk-adjusted edge.

Implementation

Long-short order-flow ignition continuation on BTCUSDT.BINANCE USD-M perp, 15-minute bars. Each bar's aggressive-taker imbalance ((buy-sell)/(buy+sell)) is read from the exchange-aggregated executed-trade tape (metrics.taker_long_short_vol_ratio, with taker_ratio buy/sell volumes as the same-quantity alternate source), volume-weighted into a Kyle-style signed order flow, and z-scored as a k-bucket sum against a rolling 96-bar mean/std. An EXTREME sustained burst (|z| >= burst_z over ignition_buckets = 6 bars = 90 minutes of one-sided aggression) opens a position WITH the flow — long on informed accumulation, short on distribution. The position is ridden with a volatility trailing stop (trail_vol_mult x rolling bar-return std, floored at min_trail_pct) plus a 24-bar (6h) time stop and a cooldown, and is sized so a stop-out costs ~1.8% of equity with gross notional capped at 1x equity. When the tape feed has no rows for a bar the strategy stays flat rather than falling back to a price-only proxy.

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.

Verification Results

None required for correctness. If tick-fidelity is essential, note it cannot be tested on current data (raw TradeTick ~1 day); the 5-min aggregated tape is the honest testable proxy.

Verification Results

The data primitive is the exchange-aggregated 5-min taker-volume series from supplementary_data on 15-min bars — not the tick-level aggTrades tape the hypothesis centers on. The edge source (signed aggressive-taker imbalance → continuation) is faithfully the PRIMARY driver (not a gate), and the pivot is justified by testability and zero-latency realism, so not a blocking mismatch — but a real deviation from the stated tick granularity worth surfacing.

Verification Results

Lower the gross cap or raise min_trail_pct so risk-based sizing governs notional; let the optimizer choose.

Verification Results

Sizing drives most trades to the 1x-equity cap (avg_position_pct 96.5%): when the vol trail sits near min_trail_pct (0.004), the risk term (0.018/0.004 = 4.5x) clamps to 1x, so the book runs near-full-equity single-name BTC exposure per burst. Within the leverage-1.0 gross cap (no blowup), but the intended small per-trade risk is overridden by the cap in low-vol regimes.

Backtest Review

Genuinely novel data primitive (executed taker-tape microstructure) and thoughtful, verification-safe implementation using the historied 5-min taker series

Backtest Review

Positive expectancy ($86/trade) and PF 1.14; balanced long/short with low benchmark correlation (0.09) — real diversification intent

Backtest Review

Modest max drawdown (14.9% point estimate)

Backtest Review

No risk-adjusted edge: Sharpe -0.017 (CI [-0.65, 0.60]), Sortino -0.007, information_ratio -0.70, omega 0.989 (<1), PSR 0.48 — the +20.6% return is lumpy outlier noise (kurtosis 139, tail_ratio 0.14)

Backtest Review

Capacity-constrained / impact-dominated: impact_cost_pct 42.3% of gross and capacity_usd only $557K — the edge only exists at toy scale

Backtest Review

avg_trade_return_pct 0.204% barely clears the 0.15% futures fee floor after impact; PF 1.14 is fee-fragile

Backtest Review

Only 240 trades over 6 years at an already-extreme burst_z=4; annual returns inconsistent (2023 -7.4%, 2026 -3.2%) — no stable cross-regime edge to optimize toward

Outcome Summary

BtcOrderFlowIgnitionBurstContinuationLS ventured into an unused data primitive — the executed aggressive-taker tape — betting that extreme, sustained one-sided bursts carry permanent price impact and a rideable continuation. The developer had to move off raw ticks (only one calendar day of history) to Binance's exchange-aggregated 5-minute taker-volume series with ~6 years of data, and removed a displacement/chase gate that had produced a catastrophic PF of 0.009. Even so, the rebuilt 4-sigma burst rule on 15-minute bars stayed net-negative and sub-fee (avg trade 0.034%, total return -4.18%, Sharpe -0.91, PF 0.775 over 44 trades). QA abandoned it before backtest review, concluding that transient impact dominates and the continuation thesis is simply absent for BTC taker flow across two data sources and two gate configurations; it never reached optimization, analysis, or risk review.

Outcome Summary

The permanent-impact continuation from one-sided aggressive taker flow is dominated by transient impact at tradeable (15-minute) granularity on BTC, so an ignition-burst continuation rule cannot clear even the low ~0.10% futures round trip — a new data primitive does not guarantee a new tradeable edge.

Outcome Summary

QA abandoned it in the verification loop at iteration 3 on a falsified premise: entering with an extreme sustained taker burst does not produce continuation that clears the ~0.10% round trip because transient impact dominates and the permanent-impact continuation is not measurable here. Removing the chase gate improved PF from 0.009 to 0.775 but never crossed into profitability, indicating the continuation thesis itself is absent for BTC taker flow.

Outcome Summary

A long-short, single-instrument order-flow strategy (3 parameters) on BTCUSDT.BINANCE USD-M that entered WITH an extreme, sustained one-sided aggressive-taker volume burst — betting on the permanent-impact (informed-flow) continuation from Kyle/VPIN microstructure theory — and rode it with a volatility trailing stop, flat between bursts.

Outcome Summary

It never reached a formal backtest report; on the now-testable exchange-aggregated taker-volume series (~6y history, 15-minute bar-close execution) the edge was negative and sub-fee — avg_trade_return_pct 0.034% (below the 0.15% futures floor), total return -4.18%, Sharpe -0.91, profit factor 0.775, PSR 0.127, skew -1.82 over 44 trades. An earlier tick-level version with a displacement/chase gate was catastrophic at PF 0.009.

Iteration History

Verification failed (Layer 4 — QA review): - UNTESTABLE — trade-tick data for BTCUSDT.BINANCE is only ~1 calendar day (2026-05-06), per the developer's own caveat. The strategy is 100% tape-driven, so all 46 trades cluster in that single day; data_days=363 is the bar series, not the tape. The Phase-3 15-day holdout and walk-forward OOS windows will contain ZERO tick data (unless they straddle 2026-05-06) — the mechanism cannot be validated at all, and the entire sandbox result is one day's tape. - Catastrophic loss with a code-defect-grade signature — likely wrong-sided entries. total_return -28.5%, profit_factor 0.009, win_rate 0.13, avg_win 43 vs avg_loss 719 (16x), skew -7.98, kurtosis 139. A PF ~0 at 13% win rate is not a fee miss; a correctly-signed continuation trade with a symmetric trail should not win only 13% of the time. Most likely the continuation thesis is backwards for BTC 10s buckets (transient impact dominates, bursts revert), so entering WITH the burst after price has already displaced (impact_ok) buys tops and sells bottoms — amplified by a wide vol trail (8x bucket-return std) on 2.58x leverage. - Latency-dependent by construction: ~8-minute holds off tick entries at ~2.58x leverage assume execution the zero-latency backtest cannot represent. Moot here since it loses even with optimistic fills, but a live-viability blocker even if the sign were corrected.

Iteration History

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['burst_z', 'risk_pct', 'min_notional', 'vol_lookback', 'cooldown_bars', 'max_hold_bars', 'min_trail_pct', 'size_decimals', 'trail_vol_mult', 'ignition_buckets'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: BtcOrderFlowIgnitionBurstContinuationLS._row_imbalance() takes 1 positional argument but 2 were given (bar timestamp: 1735695780000) - steady_downtrend: TypeError: BtcOrderFlowIgnitionBurstContinuationLS._row_imbalance() takes 1 positional argument but 2 were given (bar timestamp: 1735695780000) - flat_ranging: TypeError: BtcOrderFlowIgnitionBurstContinuationLS._row_imbalance() takes 1 positional argument but 2 were given (bar timestamp: 1735695780000) - volatility_spike: TypeError: BtcOrderFlowIgnitionBurstContinuationLS._row_imbalance() takes 1 positional argument but 2 were given (bar timestamp: 1735695780000) - zero_volume: TypeError: BtcOrderFlowIgnitionBurstContinuationLS._row_imbalance() takes 1 positional argument but 2 were given (bar timestamp: 1735695780000) - price_gap: TypeError: BtcOrderFlowIgnitionBurstContinuationLS._row_imbalance() takes 1 positional argument but 2 were given (bar timestamp: 1735695780000)

Iteration History

Verification failed (Layer 4 — QA review): - PREMISE FALSIFIED on the now-testable data source. With the strategy moved to the exchange-aggregated taker-volume series (~6y history) and 15-minute bar-close execution, the order-flow ignition continuation edge is negative and sub-fee: avg_trade_return_pct 0.034% (below the 0.15% futures floor), total_return -4.18%, Sharpe -0.91, PF 0.775, PSR 0.127, skew -1.82 over 44 trades. Entering WITH an extreme sustained one-sided taker burst does not produce continuation that clears the ~0.10% round trip — transient impact dominates and the permanent-impact continuation the hypothesis relies on is not measurable here. - Second data source and second gate configuration to reject the same mechanism. The earlier tick version with the displacement/chase gate was catastrophic (PF 0.009); this version removes it and uses a 4-sigma sustained burst on aggregated tape, improving PF to 0.775 but still net-negative. Removing the chase gate helped but did not cross into profitability, indicating the continuation thesis itself is absent for BTC taker flow rather than a fixable entry detail.
Strategy report

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