Skip to content

View translation

AvaxPathEfficiencyGatedTsMomLS4H

Hypotheses

AVAX USD-M Path-Efficiency-Gated Time-Series Momentum, Long-Short (AVAXUSDT.BINANCE 4H — take the trend ONLY when the Kaufman Efficiency Ratio says the path is directional enough for the move to clear fees; stand flat in chop, chandelier trailing exit, 3-parameter, pure OHLCV)

Hypotheses

A LONG-SHORT, single-instrument, pure-OHLCV directional trend follower on AVAXUSDT.BINANCE (USD-M perpetual), 4H bars, ~6 years of history (2020-09-23 -> today, ~13,000 bars). It stays inside the ONE mechanism family that has actually survived in this factory (directional Binance USD-M time-series momentum on liquid majors with a single orthogonal confirmation gate, long-short, ATR trailing exit) but replaces the confirmation gate with one that has never been tried here and that attacks the exact failure mode that kills these strategies. Every dead sibling in the failure store (XRP OI-expansion momentum avg_trade 0.051%, SOL OI-confirmed Donchian 0.177% with PF 0.96, LINK/DOGE variants) died the same way: the gate (open interest, liquidations, funding) filtered on a DERIVATIVES-positioning variable that is only loosely related to whether the subsequent PRICE PATH is tradeable. The strategy kept entering during choppy, high-noise advances where the net displacement per unit of price travel is small, so the average trade return landed at or below the 0.10% round-trip fee. Trend-following PnL is not proportional to the size of the move, it is proportional to NET DISPLACEMENT MINUS PATH TRAVEL (you pay for every whipsaw through the stop and every re-entry). The Kaufman Efficiency Ratio, ER(n) = |C_t - C_{t-n}| / sum_{i=t-n+1..t} |C_i - C_{i-1}|, measures exactly that ratio directly from the bars: ER near 1 = a clean one-way move, ER near 0 = a random walk that happens to have drifted. Gating entries on ER is a direct, mechanical filter on expected per-trade capture, i.e. on avg_trade_return_pct itself — the metric that has killed 490 hypotheses as fee_edge. Symbol choice is deliberate: AVAXUSDT, a liquid Binance USD-M major listed 2020-09-23 that has ZERO prior experiments in the corpus, while BTC (44% of all corpus experiments) and the already-promoted ETH/ADA/BNB names are avoided. The venue stays BINANCE USD-M despite its 70% corpus share because lessons L94 and L100 state explicitly that this mechanism family is Binance-USD-M-specific and that Bybit / Hyperliquid / COIN-M reroutes are themselves the reason the clones die; moving venue to satisfy a quota would be knowingly proposing a death. Direction is LONG-SHORT (14.8% of corpus vs 85.2% long-only), which is the most under-represented dimension I can fill without breaking the mechanism. FEE ARITHMETIC (mandatory). AVAX 4H ATR(14) runs ~1.4-1.8% of price. The ER gate at er_min ~0.35 fires on roughly the top quintile of 5-day windows by path efficiency; in those windows the 30-bar (5-day) net displacement averages ~8-11% of price with the trailing exit typically extending the hold to 6-12 days. A 3xATR chandelier gives back ~4.5% at the exit, so winners realise ~4-6% and stopped trades lose ~4.5%, at a trend-follower hit rate of ~35-40%. Conservatively the honest expectation is ~0.40-0.50% of notional per trade versus a 0.10% USD-M round-trip = 4-5x the fee floor. Cadence is ~35-55 entries/year (the ER gate is off roughly 80% of the time), i.e. ~1 trade per week, ~250 trades over the 6-year history — far from the >5 trades/day fee-drag zone, and enough sample for walk-forward and a holdout to be powered. Three parameters only (lookback n, er_min, atr_mult); ER and ATR are both O(1) rolling updates so there is no per-bar rescan of history (the sandbox_timeout failure mode does not apply — no supplementary series are read at all).

Hypotheses

Iteration 2 - minimal fix of the QA-reported defects; signal logic, imports and structure untouched so Layers 1-3 stay green. (1) CRITICAL trail-state bug: the chandelier was keyed on pos.id, but all backtest venues run OmsType.NETTING where a single position id is reused across reopens, so _trail_high/_trail_low accumulated into run-wide all-time extremes and every position exited on its first checked bar (973 trades, 1.32-bar holds - a 1-bar ER flip, not a chandelier trend follower). The trail is now keyed on int(getattr(pos, 'ts_opened', 0) or 0) - the idiom already used across src/strategies/generated - and is cleared in on_position_closed, so each new position seeds its trail at its own entry price and holds should land in the intended 6-12 day band. (2) Same-bar trail/stop: extremes are now folded in from CLOSED bars only (bar t-1) and the stop is tested against bar t's close, so one wide bar can no longer both set the extreme and stop against it. (3) Capacity/impact warning: risk_pct 0.02 -> 0.01 and max_notional_frac 1.0 -> 0.4, roughly halving average position notional on a mid-cap 4H book; together with the trail fix (far fewer, much longer trades) this should pull impact well below the prior 267% of gross and lift capacity above $14k. Entry cadence should fall back toward the pre-registered 35-55/yr because positions are now held to a real 3xATR chandelier instead of flipping each bar. Honest note: if the post-fix backtest still shows avg_trade_return_pct at or below the 0.10% round trip, the ER gate has no capture edge on AVAX 4H and the right call is to abandon rather than tune er_min.

Hypotheses

failed deflated Sharpe: DSR=0.4165, expected-max=1.335 over 225 trials (63 effective) — the selected Sharpe of 1.256 sits BELOW the bar the search would clear by luck, and the candidate also fails programme-level FDR (p=0.584, BH q=0.10 keeps 4 of 289). This is paired with an unwaivable HARD failure, PBO=0.5648 > 0.50, so the selection is more likely than not overfit. Verified on the optimized detail file rather than inferred: the result is five trades, not an edge — the top 5 of 201 trades supply 93.2% of the $118.9k realized PnL (top 10 = 127.4%, so the remaining 191 trades are net negative), all five are 2021/2023/2024 LONGs, and recomputing the annual series shows that removing 2021 and 2023 turns +118.9% into -6.2% over the other five years. Decay is already inside the sample, not a prediction: realized PnL runs +$21.6k (2024), -$15.4k (2025), -$19.6k (2026), i.e. the 69 trades after the holdout window closes on 2025-03-16 lost $34.9k on a larger equity base, and rolling Sharpe ends at -6.64. Walk-forward OOS is carried by one window (1.327 / -0.099 / 2.002). Not a fee or sizing problem — per-trade return is 5.20% against a 0.10% round trip, commissions are 1.48% of gross and impact 1.93%. Not an iteration target either: the sensitivity heatmap is a flat 0.22-0.73 with no high-edge region, and the optimizer's own answer was to push er_min 0.35 -> 0.229 (below the whole grid) and exposure 38% -> 71%, i.e. to turn the Kaufman efficiency gate largely OFF and run near-always-in TSMOM — the hypothesis's central claim (that ER gating raises per-trade capture) is refuted by the search that was meant to confirm it. Not revise_hypothesis: this exact ER-gated long-short TSMOM mechanism has already been reframed onto four other targets and died each time — AVAX/HYPERLIQUID (overfit, sim 0.835), ETH USD-M (overfit, 0.753), BTC USD-M (overfit, 0.728), LTC dual-TF (fee_edge after 3 iterations, 0.729) — plus the AVAX dual-TF momentum sibling (fee_edge, 0.744); per the overfit->abandon rule, pointing the same gate at a fifth instrument would re-overfit. Recommend the Research Lead stop re-instantiating Kaufman-Efficiency-Ratio-gated single-name TSMOM on 4H crypto perps regardless of symbol or venue.

Implementation

AVAXUSDT.BINANCE USD-M perpetual, 4H bars, long-short time-series momentum gated by the Kaufman Efficiency Ratio. calculate_signal returns the SIGNED ER over `lookback` closes on every bar (sign = trend direction, magnitude = path efficiency). Entry fires when |ER| >= er_min, i.e. only when the recent path was directional enough that a trend capture can clear the ~0.10% USD-M round trip; otherwise the book stands flat through chop. Exit is a chandelier trailing stop at atr_mult x ATR(14) from the best excursion since entry. Sizing risks risk_pct of equity against the chandelier stop distance, capped at max_notional_frac x equity of gross notional.

Verification Results

Chandelier evaluated on 4H CLOSE only, no resting protective stop — gaps/wide bars can exceed the 3xATR risk that position_size() assumes.

Verification Results

Entry bar's own high/low never folded into the trail (seeded at entry on t+1, folds bars[-2] thereafter) — conservative, deliberate consequence of the same-bar-trail fix, not look-ahead.

Verification Results

PnL concentration + regime dependence: largest_win $28,608 ≈ 32% of total PnL (skew 3.99, kurtosis 45.7); 76.9% of return from the stressed-vol tercile while the normal-vol tercile is NEGATIVE (-3.79%). Sharpe CI 0.23-1.61, IR vs buy-hold -0.56. Realised avg_trade_return_pct 3.36% is ~7x the hypothesis's own 0.40-0.50% estimate — analyst should check survival with the largest trade removed and in WF windows lacking a 2021-style leg.

Backtest Review

Reliable, adequately powered sample: 190 trades over 2178 days (6.0y) of AVAXUSDT 4H, metrics_reliable=true, 190/190 signalled entries submitted (no size-zero or min-notional drops) — enough for walk-forward + a powered holdout.

Backtest Review

Per-trade edge is far above the BINANCE USD-M fee floor: avg_trade_return_pct 3.36% vs the 0.15% floor (22x); commissions are only 2.01% of gross and modeled impact 2.86% of gross, capacity ~$123M. This is NOT a fee-fragile result.

Backtest Review

Trades match the stated mechanism: long-short (82L/108S), entries on efficient directional paths, holds 2-22 days with chandelier exits, 40% win rate with avg_win/avg_loss 2.5:1 — the canonical trend-follower payoff profile the hypothesis pre-registered, not a disguised different signal. Leverage stays 0.02-0.32x, funding is credited and NEGATIVE (-$6.3k), so no sizing/accounting artifact.

Backtest Review

Risk profile is contained: max_drawdown 16.5%, PF 1.67, Sortino 1.33, tail_ratio 1.29, omega 1.26, PSR 0.958.

Backtest Review

Extreme PnL concentration — QA's concern is CONFIRMED and is worse than stated: the top 5 trades are 130% of total PnL ($108.7k of $83.5k), i.e. the other 185 trades lose money net. Largest single trade = 33% of PnL (skew 4.07, kurtosis 47.4).

Backtest Review

Three consecutive losing years to close the sample: 2024 -$9.8k, 2025 -$10.3k, 2026 YTD -$2.9k across 91 trades (48% of all trades). All profit comes from 2021 (+$58.7k) and 2023 (+$42.5k). Profitable calendar years = 3 of 7 (43%), below the 60% validity floor.

Backtest Review

Regime-dependent: 76.9% of return from the stressed-vol tercile, normal-vol tercile NEGATIVE (-3.79%), regime_spread 1.99. The four biggest winners are 2021/late-2023 AVAX vertical legs (pnl_pct 58-236%) — the ER gate captured a small-cap launch regime that may not recur.

Backtest Review

Sharpe 0.92 with CI [0.21, 1.58] — not distinguishable from a much weaker edge; IR vs buy-hold -0.56; max_drawdown_duration 997 days.

Backtest Review

The holdout (last ~20% ≈ mid-2025 onward) sits entirely inside the losing stretch, so the HARD holdout gate is at serious risk. That is a prediction, not a reason to stop here — but the 3-phase run should be read with it in mind.

Analysis

Clean implementation and clean sensitivity surface: 0 cliff parameters across all 7 params, risk_pct/atr_period/min_notional/max_notional_frac all behave sanely, and every pre-registered success criterion was met (6 of 6).

Analysis

Adequate sample and span: 201 trades over 2179 days, metrics_reliable=true, 201/201 signalled entries submitted, no size-zero or min-notional drops.

Analysis

Costs are not the problem: avg_trade_return_pct 5.20% vs a ~0.10% USD-M round trip, commissions 1.48% of gross, modeled impact 1.93% of gross, capacity $268M.

Analysis

Holdout Sharpe is positive (0.181 on 35 trades) so the HARD holdout gate passes, and z_vs_oos = -0.84 means it is not statistically distinguishable from the WF-OOS estimate.

Analysis

Drawdown is well inside the pre-registered 26% cap (14.9%) and Calmar 0.95 clears its floor.

Analysis

HARD gate failure, unwaivable: PBO = 0.5648 > 0.50 (CSCV) — the parameter selection is more likely than not overfit. Per-window PBO 0.41 / 0.73 / 0.56.

Analysis

The selected Sharpe is BELOW the best-of-N noise bar: optimized Sharpe 1.256 vs expected_max_sharpe_annualized 1.335 over 225 trials (63 effective). DSR 0.4165 (raw-count 0.1921), is_significant=false, and the candidate fails programme-level FDR (p=0.584; BH q=0.10 keeps 4 of 289).

Analysis

The P&L is 5 trades, not an edge. From the optimized detail file: total realized PnL $118.9k, of which the top 5 of 201 trades are $110.8k (93.2%) and the top 10 are 127.4% — i.e. the other 191 trades are net NEGATIVE. All five are LONGs in Jan/Aug 2021, Nov/Dec 2023 and Dec 2024.

Analysis

Year concentration: recomputing the annual series, dropping 2021 alone takes +118.9% -> +36.7%; dropping 2021 and 2023 takes it to -6.2% over the remaining five years. Positive in 4 of 7 calendar years (57%), below the 60% floor (the gate skipped this check).

Analysis

Live-forward decay is already visible in-sample: realized PnL 2024 +$21.6k, 2025 -$15.4k, 2026 -$19.6k — the last 69 trades (34% of the sample, and entirely after the holdout window closes on 2025-03-16) lost $34.9k on a LARGER equity base. Rolling Sharpe ends at -6.64.

Analysis

Walk-forward OOS is not consistent across windows: 1.327 / -0.099 / 2.002. The 1.077 average is carried by one window.

Analysis

The optimizer contradicted the hypothesis's own premise: it moved er_min 0.35 -> 0.2286, below the entire sensitivity grid (0.28-0.42), and exposure_pct went 38.2% -> 71.2%. The search's answer is to switch the efficiency gate largely OFF and run near-always-in TSMOM — so the ER gate is not the source of what edge exists.

Analysis

Funding is a net drag of -$9.2k across the book (credited), and information_ratio is -0.53 with beta 0.047 — no active edge versus its own benchmark despite benchmark_meaningful=true.

Analysis

HARD

Analysis

QUALITY

Analysis

advisory

Analysis

ECONOMICS

Analysis

HARD (unevaluated by the gate code)

Analysis

noise bar

Analysis

concentration

Analysis

Benjamini-Hochberg at q=0.10 over 289 programme candidates keeps 4. A candidate that does not survive here is not distinguishable from the programme's own noise, however good its individual statistics look.

Outcome Summary

AvaxPathEfficiencyGatedTsMomLS4H-80a6377b2a

Outcome Summary

The strategy proposed that gating AVAX 4H long-short momentum on the Kaufman Efficiency Ratio would raise per-trade capture above the ~0.10% USD-M round trip, on an instrument with no prior experiments in the corpus. The initial backtest cleared the pre-optimization gate (verdict: optimize) with Sharpe 0.92, 190 trades and avg_trade_return_pct of 3.36%, though the analyst already flagged that the top 5 trades exceeded total PnL and only 3 of 7 calendar years were profitable. Optimization lifted headline Sharpe to 1.256 and per-trade return to 5.20%, but PBO came in at 0.5648 — an unwaivable HARD failure — with DSR 0.4165 below the best-of-N noise bar, a failed programme FDR, a 0.181 holdout Sharpe, and 93.2% of PnL concentrated in five 2021/2023/2024 longs. After 2 iterations the run was abandoned, with the analyst noting the same ER-gated mechanism had already died on four other targets and recommending it not be pointed at a fifth.

Outcome Summary

A path-efficiency gate did not create per-trade edge here — the optimizer pushed er_min from 0.35 down to 0.229 (below the entire sensitivity grid) and exposure from 38% to 71%, effectively switching the gate off, which refutes the hypothesis's own premise and argues against re-instantiating ER-gated single-name TSMOM on 4H crypto perps.

Outcome Summary

The analyst abandoned it after optimization on an unwaivable HARD failure, PBO = 0.5648 > 0.50, compounded by a deflated Sharpe of 0.4165 against an expected-max Sharpe of 1.335 over 225 trials (63 effective) and a failed programme-level FDR check (p = 0.584). Verification of the optimized trade file showed the top 5 of 201 trades supplied 93.2% of the $118.9k realized PnL, with realized PnL of +$21.6k (2024), -$15.4k (2025) and -$19.6k (2026).

Outcome Summary

A long-short 4H time-series momentum strategy on AVAXUSDT.BINANCE USD-M perpetuals that entered only when the Kaufman Efficiency Ratio showed the recent price path was directional enough for the move to clear fees, exiting on a 3xATR chandelier trailing stop.

Outcome Summary

The initial backtest over 2,178 days returned +89.9% with Sharpe 0.92, 190 trades, 40% win rate, profit factor 1.67, max drawdown 16.5% and avg_trade_return_pct 3.36%; after optimization it showed +128.2% with Sharpe 1.256, 201 trades, PF 1.82 and avg_trade_return_pct 5.20%, but holdout Sharpe was only 0.181 on 35 trades and walk-forward OOS Sharpes were 1.327 / -0.099 / 2.002.

Iteration History

Verification failed (Layer 4 — QA review) [class=code_defect]: - [edge_concern] Even after the trail bug is fixed: capacity_usd $13,982 with impact_cost_pct 267% of gross and avg_position_pct 25.7% says AVAX 4H cannot absorb this book; and realised cadence (163 entries/yr) is ~4x the pre-registered 35-55/yr, so re-check avg_trade_return_pct vs the 0.10% round trip after the fix — the 0.40-0.50%/trade claim rested on 6-12 day holds. - [critical] Chandelier trail state is keyed on `pos.id`. All backtest venues use `oms_type=OmsType.NETTING`, where NautilusTrader reuses a SINGLE position ID per instrument across reopens (docs/nautilus/concepts/execution.md:83; reports.md:182 — HEDGING is the mode where 'each position has a unique ID and is never reopened'). So `self._trail_pos_id != pos.id` is True only for the FIRST position of the run; `_trail_high` is only ever max()'d and `_trail_low` only ever min()'d, never cleared on flat, so they become the run's all-time high/low. Both exit tests then fire on the first bar a position is checked. Sandbox confirms: avg_holding_period 5h16m = 1.32 bars (a 3xATR ~4.5% stop cannot trigger in one bar), exposure 9.9%, 973 trades vs the hypothesis's ~250. The tested mechanism is a 1-bar ER flip, not the chandelier trend follower. (line 112) — fix: Key on `int(getattr(pos,'ts_opened',0) or 0)` (the idiom already used across src/strategies/generated/) and clear the trail when flat via on_position_closed. Then confirm holds land in the 6-12 day band. - [warning] risk_pct 0.02 vs a 4.5% stop → ~0.44x equity notional; impact 267% of gross, capacity $13,982. (line 143) — fix: Re-measure impact after the fix; lower risk_pct/max_notional_frac if still >50% of gross. - [warning] Trail is updated with the current bar's high/low before that same bar's exit test, so one wide bar can both set the extreme and stop against it. (line 116) — fix: Trail on bars up to t-1, test the stop on bar t's close.
Strategy report

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