Skip to content

View translation

EthSpot4hDualEmaVolTargetTrendLong

Hypotheses

ETH Spot 4H Dual-EMA Trend-Following Long with Volatility-Targeted Capital-Capped Sizing (ATR Trailing Stop)

Hypotheses

A long-only, single-instrument, single-venue, OHLCV-ONLY trend-following strategy on ETHUSDT.BINANCE_SPOT (CASH account, hard leverage-1 cap) using 4-HOUR bars. This is the ANALYST-SANCTIONED clean re-proposal of the abandoned ETH golden-cross strategy, whose abandon note explicitly recommended: 're-propose fresh with a new hypothesis_id and capital-capped sizing + faster EMAs.' That strategy failed for two reasons that are fixed here BY CONSTRUCTION, not by hope: (1) a >100%-exposure / impossible-single-day-return sizing bug that the factory engine could not cap on a FUTURES venue (confirmed structural across multiple basket/single-asset strategies this session) — moving to BINANCE_SPOT (CASH, leverage-1) makes summed exposure >100% of equity impossible by construction, exactly as the analyst recommended; (2) thin 7-trade event-sparsity at DAILY cadence — moving to 4H with faster EMAs lifts the cross frequency to dozens per year so all three walk-forward OOS windows and the holdout are populated. The mechanism is time-series momentum (trend premium): crypto exhibits strong, persistent trends, and a dual-EMA regime captures multi-week ETH up-moves. The distinguishing, deliberately under-represented element is VOLATILITY-TARGETED sizing (inverse-realized-vol position scaling toward a target portfolio vol, hard-capped at 100% equity) — a managed-futures construction that normalizes risk across regimes, smooths the equity curve, and improves Sharpe/drawdown, complementing the portfolio's fixed-fractional longs and my own spot mean-reversion seed (trend + MR diversify regime exposure within the same under-represented spot venue). Simple (5 core parameters), OHLCV-only, deep ETH spot history (~2017-present), no options/HL/COIN-M/cross-venue/supplementary dependencies (all confirmed unvalidatable).

Hypotheses

Iteration-2 fix for the frozen backtest (bars_seen stuck at 67, 1 entry, 0 round-trips) while the engine processed all 17,487 bars. Root cause: entries_submitted increments in the base template BEFORE _submit_entry, so a raise inside _submit_entry faulted the strategy on the entry bar (NautilusTrader swallows the handler exception and stops routing on_bar). The trigger was sizing at max_fraction=1.0 (100% of equity) on a CASH spot account, where notional + 0.1% taker fee exceeds the USDT balance (order rejected/errored), compounded by a fragile floor-quantized Decimal fed to make_qty. Minimal fixes that keep every earlier layer green: (1) max_fraction default lowered to 0.95 so the spot BUY is always fillable by construction; (2) position_size switched to the proven Decimal(str(round(qty, prec))) format used by passing spot strategies; (3) all four interface methods wrapped so no strategy-code exception can fault the run; (4) EMAs seeded from their SMA so fast/slow are cleanly separated. The trend mechanism, continuous EMA-spread signal, volatility-targeted sizing, regime-flip + ATR-trailing exits, and bearish re-arm are unchanged; over ~8 years of 4H ETH the regime cycles dozens of times, so exits fire and dozens of round-trips complete, populating all walk-forward OOS windows and the holdout.

Hypotheses

Fails deflated Sharpe and, decisively, the forward holdout on optimization attempt 1. The untouched time-ordered HOLDOUT is NEGATIVE: holdout_sharpe -1.99, passed=false, ratio -2.65 vs a WF-OOS baseline of 0.75 — the recent window loses money, the realization of the 2025-2026 trend decay flagged at pre-optimization review (optimized annual 2025 -13.3%, 2026 -7.7%; rolling Sharpe negative from 2026-01). The walk-forward is is_overfitted=TRUE with avg IS Sharpe 5.31 collapsing to avg OOS 0.75 and OOS windows [-3.38, 0.18, 5.46] (first window deeply negative, average carried by a single lucky window), PBO 0.7632 (>0.5). It fails multiple-testing deflation: DSR=0.5269 (<0.95), is_significant=false, the optimized Sharpe 2.88 only marginally clears the 225-trial expected-max luck bar of 2.80, and sharpe_ci_low=0.0174 hugs zero — probabilistic_sharpe 0.9934 vs DSR 0.5269 is the textbook selection-inflation trap. The clean 0-cliff sensitivity surface and the flattering optimized full-refit (Sharpe 2.88, max_dd 24.8%) measure consistency, not significance, and do not survive a forward window where the strategy is net negative. Not iterate: the binding failure is forward non-generalization — a NEGATIVE holdout plus an overfit walk-forward — driven by genuine 2025-2026 trend decay, not an under-searched parameter region, so a second best-of-225 sweep re-overfits the same 2019-2021 bull-run trends (overfit case: high IS, negative/near-zero OOS -> abandon). Not revise_hypothesis: single-asset ETH spot dual-EMA vol-targeted trend-following is not a proven mechanism stranded on a dead instrument (ETH is fine; no promoted sibling exists), so there is nothing validated to re-target. FAILURE PATTERN: moving the abandoned ETH golden-cross to BINANCE_SPOT 4H successfully fixed its exposure-blowup and trade-sparsity failures and produced a genuine, non-overfit-at-base trend edge with a clean sensitivity grid — but the edge is modest and regime-decayed: best-of-225 selection overfits (IS 5.31 -> OOS 0.75, PBO 0.76), the optimized Sharpe sits at the luck bar (DSR 0.53), and the untouched recent holdout is NEGATIVE (-1.99). Structural fixes to sizing/frequency do not manufacture a significant, forward-generalizing edge when the underlying trend premium has decayed in the recent regime.

Implementation

ETH spot (BINANCE_SPOT, CASH, leverage-1) 4H long-only dual-EMA (20/50) trend-following strategy. Enters long once per bullish regime (fast EMA > slow EMA), sizes inversely to realized volatility toward a per-bar target vol, hard-capped at 95% of equity so notional + taker fee never exceeds the USDT balance. Exits on regime flip (fast EMA < slow EMA) or an ATR(14) trailing stop (close <= running high - 4*ATR), re-arming only after the regime cycles bearish.

Backtest Review

Functioning strategy, NOT liquidated (liquidated=false) — the parent's >100%-exposure blow-up is structurally fixed by the BINANCE_SPOT CASH/leverage-1 venue (exposure_pct 34.58, position never exceeds equity)

Backtest Review

Ample sample: 159 trades (~20/yr) over 2018-2026 — the parent's 7-trade sparsity is fixed; all 3 walk-forward windows + holdout will populate

Backtest Review

Trades match the hypothesis: long-only (0 shorts), one entry per bullish regime run — genuine time-series-momentum behavior, not a mechanism mismatch

Backtest Review

Coherent trend-following edge: Sharpe 1.53, Sortino 6.97, profit_factor 1.22, tail_ratio 2.57, omega 1.40, positive skew 3.3, positive alpha 0.13 over a meaningful buy-hold benchmark

Backtest Review

No artifact signature — noisy 33% win rate with fat-right-tail winners is exactly what a real trend edge looks like

Backtest Review

max_drawdown 55% is deep for a construction that claims to SMOOTH the curve — avg_position_pct 99% means the vol-target pins at max_fraction 0.95 most of the time, so inverse-vol scaling rarely binds (target_vol likely too high)

Backtest Review

Edge concentrated in 2019-2021; recent years decaying/negative (2022 -20%, 2023 +2.5%, 2025 -11%, 2026 -15% partial) — the recent holdout window is where trend-following is weakest

Backtest Review

Market impact eats 15% of gross PnL (impact_cost_pct 15.08, commission_pct_of_gross 5.07, turnover 3410%)

Analysis

The parent's two failure modes stayed fixed: no liquidation, exposure bounded (CASH/leverage-1), and ample sample (159 base / 116 optimized trades) — walk-forward and holdout all populated

Analysis

Clean sensitivity: cliff_count=0, all 9 parameters stable across +/-20%

Analysis

Faithful long-only time-series-momentum implementation on the correct venue

Analysis

Untouched forward HOLDOUT is NEGATIVE: holdout_sharpe -1.99, passed=false, ratio -2.65 vs WF-OOS 0.75 — the recent window loses money

Analysis

Walk-forward is_overfitted=true: avg IS Sharpe 5.31 collapses to avg OOS 0.75, OOS windows [-3.38, 0.18, 5.46] (first deeply negative, average carried by one window); PBO 0.7632

Analysis

Fails deflated Sharpe: DSR 0.5269 (<0.95), is_significant=false, optimized Sharpe 2.88 only marginally above the 225-trial expected-max luck bar of 2.80, sharpe_ci_low 0.0174 hugging zero

Analysis

PSR 0.9934 vs DSR 0.5269 is the classic best-of-225 selection-inflation trap

Analysis

Realized recent-regime decay (flagged at review): optimized annual 2025 -13.3%, 2026 -7.7%, rolling Sharpe negative from 2026-01 — trend edge concentrated in 2019-2021 bull runs

Analysis

Do NOT send to optimization — the backtest produced ZERO completed trades and a non-functional equity curve (total_trades 0, data_days 0, all metrics null). The critical clue is the entry_diag: bars_seen=67 while bars_processed=17,487, with exactly 1 entry submitted and 0 round-trips closed. The signal/entry path effectively stopped after ~67 bars. Investigate, in order: (1) A SILENT EXCEPTION in a hot path: the base template likely swallows exceptions raised inside calculate_signal/should_exit after the position opens (e.g. in _atr / _realized_volatility / trailing-high handling), which would freeze further bar processing for the entry logic — wrap and log to confirm the loop runs all 17k bars. (2) THE POSITION NEVER CLOSES: if the one-entry-per-run flag (_entered_this_run) is set on entry but the regime-flip exit or ATR trailing stop never triggers (e.g. _trail_high/_cur_atr interaction, or the regime never flips bearish because the incremental EMAs are mis-seeded — both EMAs are seeded to the same first close, which can pin fast~=slow), then the strategy holds one position forever and the re-arm (which only resets on a bearish regime) never lets another trade fire. (3) Verify the dual-EMA actually crosses both ways over the full history by logging fast_ema/slow_ema and the regime flag periodically. Fix so the strategy produces dozens of trades over the sample (regime flips + trailing-stop exits both working), confirm metrics_reliable=true and total_trades is in the dozens, and re-run the backtest BEFORE any optimization. The mechanism is fine; this is an execution/state-machine bug.

Outcome Summary

This strategy was the analyst-sanctioned clean re-proposal of an abandoned ETH golden-cross, moving to BINANCE_SPOT 4H bars with volatility-targeted capital-capped sizing to fix the parent's exposure blow-up and thin-sample problems by construction. Those fixes worked: it ran without liquidation, generated 159 long-only trades and a base Sharpe of 1.53 with a clean zero-cliff sensitivity surface, earning an 'optimize' verdict despite a deep 55% drawdown. But optimization exposed the edge as regime-decayed and selection-inflated — the walk-forward was overfit (IS 5.31 → OOS 0.75, PBO 0.76), it failed the deflated Sharpe bar (0.53), and the untouched recent holdout was net negative at -1.99 Sharpe. The analyst abandoned it after two iterations, concluding the 2025-2026 trend decay was genuine forward non-generalization, not an under-searched parameter region.

Outcome Summary

Fixing structural sizing and trade-frequency bugs can produce a genuine, non-overfit-at-base trend edge, but it cannot manufacture a significant, forward-generalizing signal when the underlying trend premium has decayed — a best-of-225 sweep just re-overfits the same 2019-2021 bull-run trends.

Outcome Summary

The analyst returned an abandon verdict on the first optimization attempt: the strategy failed the deflated Sharpe test (DSR 0.53 vs 0.95, optimized Sharpe 2.88 barely clearing the 225-trial luck bar of 2.80) and, decisively, the forward holdout lost money — the realization of the 2025-2026 trend decay flagged at pre-optimization review.

Outcome Summary

A long-only, OHLCV-only dual-EMA time-series-momentum trend-follower on ETHUSDT.BINANCE_SPOT 4H bars, using volatility-targeted, capital-capped (CASH/leverage-1) sizing and an ATR trailing stop, re-proposed to structurally fix the parent golden-cross's >100%-exposure sizing bug and 7-trade sparsity.

Outcome Summary

The base backtest was healthy on paper — Sharpe 1.53, Sortino 6.97, 764% total return (CAGR 31.3%), 159 long trades over 2018-2026, profit factor 1.22 and no liquidation — but carried a 55.5% max drawdown, and after optimization the walk-forward was overfit (avg IS Sharpe 5.31 collapsing to OOS 0.75, PBO 0.76) with the untouched forward holdout net negative (holdout Sharpe -1.99, ratio -2.65).
Strategy report

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