DogeTakerFlowImbalanceContinuationLS15m
Hypotheses
DOGE USD-M Taker-Flow Imbalance Continuation, Long-Short (Single-Instrument BINANCE Perp, 15m Bars + Multi-Year TAKER BUY/SELL Aggressor-Volume Feed, Enter in the Direction of a Top/Bottom-Decile Aggressor-Flow Burst That Price Has NOT Yet Repriced, Flow-Leads-Price Continuation, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument microstructure strategy on DOGEUSDT.BINANCE (USD-M perpetual, 15m decision bars) that trades the direction of aggressive taker order flow BEFORE price fully reprices it. DOGE is deliberately chosen: it is one of the most retail-driven, aggressor-heavy perps on Binance, so its taker buy/sell volume imbalance carries an unusually strong short-horizon directional signal relative to majors. The traded instrument is the perp; the SIGNAL is the Binance taker buy/sell aggressor-volume ratio (supplementary `taker_ratio` feed, multi-year), NOT raw OHLCV. This fills the two furthest-from-target diversity buckets the current portfolio allows me to reach without landing in a known graveyard: short_1m_15m horizon (8.6% vs >=10% target) and long_short direction (14.3% vs a >=55% ceiling that long_only blows through at 85.7%). It also escapes the pure_ohlcv survival trap (1% of 80) by depending on a genuine microstructure feed, and it is NOT a Hyperliquid strategy (L11: 0/84 HL survival), NOT an options strategy (L23), NOT a cross-sectional basket (L12), NOT a funding-level signal on majors (L13), NOT liquidation-feed dependent (L3), and NOT a cross-venue carry (L1). Mechanism: at each 15m close compute the rolling taker-buy fraction TB = taker_buy_vol / (taker_buy_vol + taker_sell_vol) over a short window, and its percentile within a long trailing distribution. When aggressor flow reaches a decile extreme (heavy one-sided market-order pressure) AND the bar's realized price move over the same window is still SMALL (flow has accumulated but price has not yet repriced it -> the flow-leads-price edge), enter in the flow direction. Deliberately low-parameter (3 knobs) because overfit is the #1 cause of death here (233x).
Hypotheses
Iteration-3 fix targets ONLY the reported Layer-2 failure and nothing else. Layer 2 raised `TypeError: _num() takes 2 positional arguments but 3 were given` across all six synthetic scenarios: `_num` was a @staticmethod but is called as `self._num(...)`, and the Layer-2 verifier proxy rebinds callable attributes as bound methods, so `self` is passed as an extra positional argument. The code already fixed this identical pattern for `_to_ns` by making it a plain instance method; I applied the same minimal fix to `_num`. I also converted `_pctile` (the only other @staticmethod, likewise called via `self._pctile(...)`) to an instance method so the strategy does not merely re-loop on the next staticmethod once `_num` is past. No call sites changed (all already use `self.`), and no signal logic, imports, parameters, or config were touched — every earlier layer stays green and the passing signal path is preserved verbatim.
Hypotheses
Fee-death net loser that LIQUIDATED the account (total_return -100%, max_drawdown 100%, liquidation 2022-10-19; annual returns 2021 -14%, 2022 -127% then flat). Over 12,810 trades: profit_factor 0.46, Sharpe -0.77 (CI [-4.76, -0.01]), PSR 0.06, expectancy -$17.83/trade, win_rate 39.7%, avg_trade_return_pct 0.0069% (far below the 0.15% fee floor, L22). Commissions are 50.1% of gross ($99k commission + $131k impact) — the high-frequency 'flow-leads-price continuation' (12,810 trades on 15m, 66-min average hold) is dominated by trading costs, and with avg_loss ($55) > avg_win ($39), skew -4.1, kurtosis 627 and 19 consecutive losses it bled through costs into liquidation. Unlike the recent-only taker feeds elsewhere, the merged metrics+taker_ratio feed here spans 2021-2022, so this is not a data-wall case — it is a decisively edge-less, fee-dominated single-perp order-flow-gated strategy (L73 / L18 fee_edge extreme). No tuning of flow_window/flow_pct/price_move_pct lifts a 0.007%/trade edge above a ~0.10% round-trip or cuts the ~12.8k-trade turnover without abandoning the mechanism. Failure pattern: fee_edge/no_edge single-perp taker-flow continuation, liquidated. Not worth 2 hours of optimization.
Implementation
Long-short single-instrument microstructure strategy on DOGEUSDT.BINANCE USD-M perp (15m bars). Signal is the Binance taker buy/sell aggressor-volume imbalance (from the multi-year `metrics` series merged with the dense `taker_ratio` feed), NOT raw OHLCV. Each 15m close it smooths the signed imbalance (R-1)/(R+1) over flow_window bars and ranks it as a percentile in a trailing distribution. On a decile-extreme aggressor burst that price has NOT yet repriced (realized |return| over the same window is in the small tail), it enters in the flow direction to ride the continuation. Exits on take-profit, stop-loss, a hard time stop, or flow exhaustion (aggressor flow crossing back through neutral against the position). Stays flat when no fresh taker reading exists (no price-only fallback).
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
High-turnover fee-nonviability: 1552 trades/206 days, commission 96.78% of gross, avg_trade_return_pct -0.014% — dominant cause of -93%. flow_pct/price_move_pct are the optimizer's knobs, so a frequency/edge problem for the optimizer, not a code fault. Optimizer must constrain trade count and net-of-fee per-trade return; abandon if no viable operating point.
Verification Results
Inverted reward/risk + possible wrong-signed premise: avg_win $61 < avg_loss $132 despite TP>SL (flow-exhaustion exit caps winners), win_rate 0.37 suggests fading beats continuation on DOGE 15m. Code correctly implements the hypothesis as written, so this is a premise/edge question for analyst/research. A/B continuation vs reversal polarity.
Backtest Review
Multi-year taker feed coverage (trades span 2021-2022, not a recent-only data wall); genuine non-price signal; timeout-safe O(log n) lookups
Backtest Review
Account LIQUIDATED 2022-10-19: total_return -100%, max_drawdown 100% (CI to 100%), CAGR -100%
Backtest Review
Fee death: commission_pct_of_gross 50.1% ($99k commission + $131k impact), avg_trade_return_pct 0.0069% (far below the 0.15% floor) over 12,810 trades
Backtest Review
Negative expectancy: profit_factor 0.46, Sharpe -0.77 (CI [-4.76, -0.01]), PSR 0.06, expectancy -$17.83/trade, win_rate 39.7%, avg_loss > avg_win
Backtest Review
Picking-up-pennies blowup: skew -4.1, kurtosis 627, 19 consecutive losses; the continuation fires 12,810x and bleeds through costs into liquidation
Backtest Review
L73 single-perp order-flow-gated family / L18 fee_edge extreme
Iteration History
Verification failed (leverage_set_but_unused): config sets leverage=2.0 but the strategy never references leverage in sizing. Size positions on it — notional = equity * fraction * leverage / price (read self.config.leverage) — or set leverage=1.0. As written the leverage is inert and the backtest is identical to 1x.
Iteration History
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['dist_min', 'flow_pct', 'flow_window', 'min_notional', 'dist_lookback', 'max_lag_hours', 'stop_loss_pct', 'price_move_pct', 'time_stop_bars', 'take_profit_pct', 'position_fraction']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: DogeTakerFlowImbalanceContinuationLS15m._num() takes 2 positional arguments but 3 were given (bar timestamp: 1735691040000)
- steady_downtrend: TypeError: DogeTakerFlowImbalanceContinuationLS15m._num() takes 2 positional arguments but 3 were given (bar timestamp: 1735691040000)
- flat_ranging: TypeError: DogeTakerFlowImbalanceContinuationLS15m._num() takes 2 positional arguments but 3 were given (bar timestamp: 1735691040000)
- volatility_spike: TypeError: DogeTakerFlowImbalanceContinuationLS15m._num() takes 2 positional arguments but 3 were given (bar timestamp: 1735691040000)
- zero_volume: TypeError: DogeTakerFlowImbalanceContinuationLS15m._num() takes 2 positional arguments but 3 were given (bar timestamp: 1735691040000)
- price_gap: TypeError: DogeTakerFlowImbalanceContinuationLS15m._num() takes 2 positional arguments but 3 were given (bar timestamp: 1735691040000)
Iteration History
Verification failed (Layer 4 — QA review):
- Uncontrolled exposure / pyramiding causes a full account liquidation. should_enter() emits BUY/SELL on the flow/price condition and never checks whether a position is already open, so on consecutive 15m bars where aggressor flow stays decile-extreme and price stays 'small' it re-enters the same side and stacks position on position. The sandbox proves it: avg_position_pct = 463% of equity versus the ~30% the sizing intends (position_fraction 0.15 × leverage 2.0) — a ~15x overshoot that can only come from repeated adds. Outcome: liquidated=true (2026-05-02), total_return -100%, max_drawdown 100%. Critical risk-control defect.
- No edge / below fees. On a well-sampled run (2636 trades, turnover 720): avg_trade_return_pct -0.0225% (negative, far below the 0.15% futures floor and 0.10% round-trip), profit_factor 0.405, win_rate 0.39, avg_win $75 vs avg_loss $120 (inverted reward/risk), Sharpe -2.29 with CI [-10.68, -2.10] entirely negative. Matches the repeatedly-abandoned taker-flow/taker-ratio microstructure class. The signal does not clear fees.
- Signal depends on the merged metrics/taker_ratio supplementary series covering the window; the strategy silently goes inert (no price fallback) if a walk-forward window is data-starved. It produced trades here, but coverage should be confirmed.
Backtest and paper results are hypothetical. Trading involves risk of loss.