Skip to content

View translation

AvaxTakerAggressorDominanceMomentumLong4H

Hypotheses

AVAX Taker Buy/Sell Ratio Aggressor Dominance Momentum Long (4H)

Hypotheses

A long-only single-instrument ORDER-FLOW MOMENTUM strategy on AVAXUSDT perpetual futures (Binance USD-M) triggered exclusively by sustained taker-buy aggressor dominance. The strategy uses the supplementary `taker_ratio` data (taker_buy_volume / taker_sell_volume) — a microstructural signal that is COMPLETELY UNUSED by any in-pipeline strategy. It deliberately AVOIDS every signal type already represented in the portfolio: no SMA/EMA crosses, no volume breakouts, no candlestick patterns, no daily timeframe, no funding rate, no liquidation events. Uses a new symbol (AVAX — not BTC/ETH/SOL/BNB/LINK already covered). Only 3 parameters total: ratio threshold, confirmation period, exit time stop. Maximally simple structure to avoid overfitting after the run of failed daily candlestick/pattern strategies.

Hypotheses

Iteration 4 fixes the Layer-3 'no trades produced' failure with the smallest possible change — parameter values only, no logic/imports/structure edits, so the already-passed static (L1) and synthetic (L2) layers cannot regress (looser entry only makes trades easier to fire). Diagnosis: the Binance taker_ratio series for AVAXUSDT covers only ~57 recent days (2026-03-23 → 2026-05-19), a tiny overlap with the 5.8-year 4H OHLCV backtest, so the strategy can only trade in that window. Reproducing the exact parse+entry logic on the real parquet data showed the prior gate (threshold 1.15 + 3 consecutive bars) produced just ~2 fragile bar-runs → 0 completed entries under real bar alignment. Loosening to 2 consecutive bars at threshold 1.10 yields ~20 robust entries in the data window while preserving the hypothesis exactly: still 3 parameters (ratio threshold, confirmation period, time stop), still pure taker-aggressor-dominance momentum, still long-only, still no price-only fallback. Two consecutive 4H bars of >=1.10 buy/sell dominance still represents genuinely 'sustained' (~8h) aggressor buying rather than a one-bar blip. Also hardened _to_ns to int(float(ts)) so JSON-normalized string timestamps parse cleanly.

Hypotheses

Negative-expectancy single-perp order-flow-gated momentum long — no edge to optimize. profit_factor 0.44, total_return -5.65%, Sharpe -0.78 (CI [-1.58, 0.03]), expectancy -$77/trade, and avg_trade_return_pct -0.216% (NEGATIVE, below the 0.15% Binance USD-M fee floor, L22). The sustained-taker-buy-dominance long is systematically on the wrong side — losing in every month of the traded window. Compounding it, the taker_ratio supplementary feed only covers a recent ~6-month slice of the 2170-day OHLCV history, so all 74 trades fall in that window and the effective sample cannot support a 3-window walk-forward plus holdout (same supplementary-gated data wall + no-edge signature as the abandoned BtcTakerAggressionPersistence, L73). No parameter tuning can flip a negative per-trade edge positive; the developer already burned 4 iterations just to produce trades. Not worth 2 hours of optimization. Failure pattern: fee_edge/no_edge single-perp order-flow-gated directional loser.

Implementation

Long-only order-flow momentum on AVAXUSDT.BINANCE 4H perp, triggered exclusively by the supplementary taker_ratio (taker buy/sell volume) stream. Goes long when aggressive-buy dominance (ratio >= 1.10) is sustained for 2 consecutive 4H bars (~8h), exits on a 12-bar time stop or when dominance flips to sellers (ratio < 1.0). No OHLCV pattern, MA cross, volume, funding, or liquidation signal is used; stays flat when taker data is absent.

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

Tighten taker_tolerance_s toward the 4H bar period so each bar samples a distinct observation.

Verification Results

taker_tolerance_s=21600 (6h) on 4H bars can match one taker observation to two adjacent bars, mildly reusing the same order-flow read and inflating streak counts near sparse data. Not a correctness failure.

Verification Results

No action needed.

Verification Results

Long-only, leverage 1.0 would normally route to BINANCE_SPOT, but futures is justified because the taker aggressor ratio is a perp-futures microstructure signal the hypothesis explicitly names. Noted for completeness.

Backtest Review

Mechanism is cleanly implemented (order-flow taker_ratio gate, no price-only fallback), max_drawdown modest at 5.87%

Backtest Review

Negative per-trade edge: avg_trade_return_pct -0.216% (below the 0.15% Binance USD-M fee floor and negative before fees)

Backtest Review

profit_factor 0.44, Sharpe -0.78 (CI [-1.58, 0.03]), expectancy -$77/trade, total_return -5.65% — a decisive net loser

Backtest Review

All 74 trades cluster in a single ~6-month window (2026-03 to 2026-09); the taker_ratio feed lacks history over the 2170-day OHLCV span, so effective sample is far too thin for walk-forward + holdout

Backtest Review

Loses in every month of the traded window; rolling Sharpe sits around -3 to -9 throughout

Backtest Review

Single-perp supplementary(order-flow)-gated directional pattern (L73), same coverage-wall + no-edge signature as the recently-abandoned BtcTakerAggressionPersistence

Iteration History

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['min_notional', 'notional_pct', 'time_stop_bars', 'confirm_periods', 'ratio_threshold', 'taker_tolerance_s'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689720000) - steady_downtrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689720000) - flat_ranging: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689720000) - volatility_spike: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689720000) - zero_volume: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689720000) - price_gap: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689720000)

Iteration History

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: AVAXUSDT.BINANCE-4-HOUR-LAST-EXTERNAL, Bars processed: 12617 Diagnostics: should_enter() returned a side 0 times over 12615 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): smoke test exceeded the 300s wall-clock limit. This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Strategy report

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