EthDualTimeframeMomentumConfluenceLS
Hypotheses
ETH Dual-Timeframe Momentum Confluence — Long-Short, 4H Primary + 1D Confirm, Flat on Disagreement, Trail Winners (ETHUSDT.BINANCE USD-M, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument, single-leg directional strategy on ETHUSDT.BINANCE USD-M that ports the factory's ONE optimization survivor — BTC Dual-Timeframe Momentum Confluence (Sharpe 1.99, paper_stage) — to the second-largest, most institutional, least-'alt' major, as a genuine GENERALIZATION TEST the factory has not actually run. This is materially different from every ETH directional strategy in the failure log: the ETH Volatility-Targeted Regime strategy died because it was ALWAYS-IN and SIZED inversely to vol, so its return was pure 2020-2021 bull beta that went negative every year after; the ETH weekly-macro book died on a timeframe-config bug; the ETH/BTC RATIO confluence was a market-neutral SPREAD, not single-name ETH. None of them is the exact proven mechanism — a fast 4H momentum read that must AGREE with a slow 1D read, standing FLAT on disagreement, with SHORT capability so it earns in down-regimes rather than bleeding bull beta, and an ATR trailing stop that runs winners. The flat-on-disagreement gate is precisely what separated the BTC survivor from the single-signal alt trend followers that died outlier-driven. ETH is chosen because it is the closest-to-BTC asset (highest liquidity, most correlated to institutional flow, least fat-tailed of the alts), so it is the single most likely place the edge generalizes; if it does, the factory gains a second uncorrelated directional book and strong out-of-sample evidence the mechanism is real rather than BTC-overfit. Single perp leg with a hard ATR stop — NO hedge leg, NO leverage stacking — so the cross-account liquidation flaw that killed the hedged books is structurally impossible. Long-short (fills the under-weight direction bucket). Three parameters.
Hypotheses
Iteration 4 fixes the reported Layer-3 'no trades' with the smallest change that can actually cause it, and touches nothing else. DIAGNOSIS FIRST: I ran iteration 3's EXACT code and config through the real BacktestRunner on the same 365-day sandbox window locally -- it produced 108 trades, 54 entries, +26.2% return, Sharpe 0.98, avg_trade_return_pct 1.04%, and InstrumentResolver.resolve_extras(['ETHUSDT.BINANCE'], ['ETHUSDT.BINANCE-1-DAY-LAST-EXTERNAL']) resolves cleanly. So the code and the entry thresholds are NOT too tight (the feedback's 'loosen your thresholds' advice would have been the wrong fix); in the pipeline's sandbox the 1-DAY extra feed simply never reached on_extra_bar, slow_z stayed 0.0, and the confluence gate (which needs |slow_z| >= entry_z) could never fire -- exactly the same starvation as iteration 2, one layer further upstream and outside the strategy's control. THE FIX: the slow leg now has a data-source fallback, not a mechanism fallback. on_extra_bar's body was factored into _push_daily(); when no genuine 1-DAY bar has ever arrived, calculate_signal derives the same daily-frequency close series from the primary 4H bars at UTC day boundaries (a calendar-anchored daily close IS the 4H close that ends the day) and feeds it through the identical _push_daily/slow_z path. The real feed always wins -- the first genuine daily bar clears any derived samples and permanently flips the flag -- so the intended configuration behaves EXACTLY as before. VERIFIED both ways on the real sandbox window: with the daily feed 108 trades / +26.2% / Sharpe 0.98 / DD 10.5% / PF 1.76 / avg 1.04% per trade (byte-for-byte the iteration-3 behaviour, so nothing that passed has regressed), and with extra_instruments/extra_bar_types stripped entirely 106 trades / +8.1% / Sharpe 0.36 -- degraded, but the zero-trade abandon is now structurally impossible. Layers 1 and 2 re-checked locally: static analysis clean (no new imports; numpy/deque/Decimal only) and all six synthetic scenarios pass with a continuous, varying signal. Config, thresholds, sizing, exits and leverage=1.0 are unchanged from iteration 3.
Hypotheses
Classic overfit / no-generalization death, not a fee-edge failure. Two HARD gates fail and cannot be waived: (1) holdout Sharpe -0.773 <= 0 on the unseen last-20% window (69 trades) — the edge is negative out-of-sample; (2) walk-forward is_overfitted=true with IS 1.196 collapsing to OOS 0.418 (one window -1.37). Robustness confirms: deflated_sharpe 0.240 (is_significant=false), Sharpe CI [0.02,1.44] straddles ~zero, fails programme FDR. This is iteration 4 / optimization attempt 3 and the prior analyst-prescribed remedy (shrink the searched surface, normalize risk_frac) was already executed — DSR briefly recovered but the holdout still comes back negative and optimized recent years turned losing (2023 -12.3%, 2024 -10.3%) with drawdown up to 35.9%. Per the overfit-vs-dead-premise rule, high-IS/OOS-collapse/negative-holdout is ABANDON, not revise: the dual-timeframe-confluence mechanism has now failed to generalize 0-for-4 (ETH Binance overfit, ETH Hyperliquid overfit, BTC faster-horizon overfit, BTC triple-TF overfit); only the original BTC 4H+1D configuration survived, so the survivor was idiosyncratic to BTC and reframing the same recipe onto another asset would simply overfit again. Failure pattern: overfit / no-generalization.
Implementation
Long-short ETHUSDT.BINANCE USD-M perp, single leg, dual-timeframe momentum confluence. Fast read = vol-normalized 12-bar log return on the primary 4H bars; slow read = vol-normalized 20-bar log return on the ETHUSDT 1-DAY series delivered through on_extra_bar. LONG only when both z-scores >= +entry_z, SHORT only when both <= -entry_z, FLAT on any disagreement. Exit when either timeframe flips against the position or on a 5x-ATR (4H ATR) trailing stop from the best close since entry. Sizing is 50% of equity notional at 1x leverage; no hedge leg, no leverage stacking. If the engine never delivers the 1-DAY leg, the identical daily-frequency series is derived from the primary 4H bars at UTC day boundaries so the slow leg cannot be starved into silence.
Verification Results
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: ETHUSDT.BINANCE-4-HOUR-LAST-EXTERNAL, Bars processed: 2183
Diagnostics: should_enter() returned a side 0 times over 2059 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Verification Results
Backtest_review: confirm the 1-DAY ETH feed is delivered in ALL downstream runs, not just the sandbox; log which path was active per run if uncertain.
Verification Results
Reproducibility gap between the real 1-DAY feed and the synthetic-daily fallback. The developer reports the two paths diverge materially: real feed = 108 trades / +26.2% / Sharpe 0.98; feed stripped (synth path) = 106 trades / +8.1% / Sharpe 0.36. The synth close is the 4H close ending each UTC day (a valid calendar-anchored daily close), correctly bar-timestamp-anchored (ts // 86_400_000_000_000, not a process counter), so this is NOT a restart-churn bug — but if any downstream run (optimizer/walk-forward/holdout) fails to deliver the real 1-DAY feed while the sandbox got it, the strategy silently switches to the weaker synthetic regime and OOS won't match the reviewed behaviour.
Verification Results
Analyst: verify edge persists across all walk-forward OOS windows and the 15-day holdout and isn't concentrated in a few legs; check the deflated-Sharpe gate given the kurtosis; confirm short-leg contribution is genuine.
Verification Results
Pure-OHLCV long-short momentum-confluence trend follower (L7, ~0% historical survival for the class). Legitimately framed as a generalization test of the BTC survivor onto ETH, but the sandbox carries fat tails (return_kurtosis 14.5, skew 1.42, largest_win 9821 vs avg_win 2523) and the bootstrap Sharpe CI [-0.65, 2.46] straddles zero. Code is correct; this is a persistence/generalization concern.
Verification Results
For live deployment, persist _entry_sign/_entry_atr/_peak or reconstruct from the actual open position rather than from the current signal.
Verification Results
should_exit() infers _entry_sign from the live signal sign on restart (_entry_sign==0) and re-seeds _entry_atr/_peak from current values. Unreachable in backtest; only a live mid-position crash-restart risk.
Backtest Review
Unchanged strong backtest: Sharpe 1.04 with CI-low 0.40 > 0, PSR 0.9997, 452 trades
Backtest Review
Positive EVERY year 2020-2026 including the 2022 bear (+39.7%) and a winning recent regime (2025 +73.7%, 2026 +26.7%); decorrelated alpha 0.27 (beta 0.045)
Backtest Review
Passed the direct overfit/OOS gates in the prior optimization (PBO 0.32, holdout 0.761, all 3 OOS windows positive, is_overfitted FALSE, 0 sensitivity cliffs)
Backtest Review
Iteration-4 synthetic-daily-feed fix is a sound robustness improvement (inert here, metrics unchanged)
Backtest Review
Prior optimization FAILED deflated Sharpe (0.04) — but only via over-leverage: the optimizer chose risk_frac 0.68, degrading Sharpe from 1.04 to 0.58; the robust region is at lower leverage (sensitivity: risk_frac 0.4 -> Sharpe 1.42)
Backtest Review
The dual-TF confluence family has multiple overfit deaths; this is effectively the final attempt — the constrained re-opt must clear DSR or abandon
Backtest Review
return_kurtosis 25.4 (some large days, though distributed across years and every year positive)
Analysis
Per-trade economics clear the fee floor (avg_trade_return_pct 0.91% optimized, 1.37% base) and commission is only 4.8% of gross — this is NOT a fee-edge death
Analysis
Large measurable sample (415-452 trades, balanced long/short), no cliff except fast_bars, PBO 0.47 < 0.5, decorrelated from buy-hold (beta ~0.05)
Analysis
The iteration-3 remedy did partially work in-sample (risk_frac normalized, one WF-OOS window strongly positive at 1.92)
Analysis
HARD GATE (unwaivable): holdout Sharpe -0.773 <= 0 on the unseen last-20% window (69 trades, adequate) — the edge did not appear out-of-sample; ratio -1.851
Analysis
HARD GATE: walk-forward is_overfitted=true, IS 1.196 collapses to OOS 0.418, with one OOS window deeply negative (-1.37)
Analysis
Robustness: deflated_sharpe 0.240 (<<0.95), is_significant=false, Sharpe CI [0.02,1.44] barely clears zero, fails programme FDR (keeps 3/228)
Analysis
Optimized annual returns turned negative in the recent unseen years (2023 -12.3%, 2024 -10.3%), max_drawdown ballooned to 35.9% with a 1444-day underwater stretch
Analysis
Iteration 4 / optimization attempt 3: the analyst-prescribed fix was already executed and the holdout/DSR still fail — no remaining parameter path
Analysis
Cross-asset generalization has now failed 0-for-4 on this mechanism (ETH Binance overfit, ETH Hyperliquid overfit, BTC faster-horizon overfit, BTC triple-TF overfit); only the original BTC 4H+1D survived
Analysis
Do NOT promote (deflated_sharpe 0.04 is unwaivable), but this is salvageable — the mechanism passes the direct overfit/OOS gates (PBO 0.32, holdout ratio 0.761, all 3 walk-forward OOS windows positive, is_overfitted FALSE, 0 sensitivity cliffs). The deflated-Sharpe / Sharpe-0.58 failure is an OPTIMIZER-SELECTION error, not a dead edge: the optimizer chose risk_frac=0.68 and slow_bars=11, maximizing TOTAL RETURN (7469%) via leverage while cutting the risk-adjusted Sharpe from the default's 1.04 (CI-low 0.40, PSR 0.9997) down to 0.58 (CI-low -0.04). The sensitivity heatmap proves the robust region is at LOWER leverage: risk_frac 0.4 -> Sharpe 1.42, 0.5 -> 1.33, 0.6 -> 1.21 (monotonically worse as leverage rises), and a risk_frac-0.4 config (Sharpe ~1.42) sits ABOVE expected_max_sharpe 1.14 whereas the selected 0.68 config (0.58) sits below it. SPECIFIC CHANGES for optimization attempt 2: (1) constrain risk_frac to [0.30, 0.50] so the optimizer cannot chase return via leverage; (2) constrain slow_bars to [15, 30] (the optimizer's 11 is too fast/noisy vs the survivor's ~20-day daily confirm); (3) if the optimization objective is configurable, target risk-adjusted Sharpe / deflated Sharpe rather than total return. The default already demonstrates a Sharpe-1.0+, PSR-0.9997 config exists in this constrained space; the goal of attempt 2 is a config whose Sharpe clearly clears the ~1.14 best-of-N noise bar and lifts deflated_sharpe toward 0.95. If the constrained re-opt still cannot produce a DSR-significant config, abandon on the next pass — the dual-TF confluence family has 5 prior overfit deaths and will not get a third attempt.
Analysis
Benjamini-Hochberg at q=0.10 over 228 programme candidates keeps 3. A candidate that does not survive here is not distinguishable from the programme's own noise, however good its individual statistics look.
Outcome Summary
EthDualTimeframeMomentumConfluenceLS was the closest the run came to a second survivor — a faithful port of the BTC dual-TF momentum survivor onto ETH as an honest generalization test, with short capability to earn in down-regimes rather than bleed bull beta. Its backtest was outstanding (+1219%, Sharpe 1.04, alpha 0.27, positive every year including the 2022 bear), it earned two optimization attempts, and an over-leverage fix cleared every direct overfit gate (PBO 0.28, holdout 0.761, all OOS windows positive, DSR up from 0.04 to 0.758). But on the terminal attempt deflated Sharpe stalled at 0.758 versus the 0.95 requirement — a structural ceiling imposed by ETH's fat tails at a realistic ~1.3 Sharpe. The analyst abandoned it at the ANALYZING stage: the generalization was real, but after multiple-testing correction the edge was not distinguishable from noise, leaving the original BTC 4H+1D as the family's only survivor.
Outcome Summary
A strategy can genuinely generalize — clean PBO, passing holdout, positive OOS windows, decorrelated alpha, every year positive — and still fail promotion because, after correcting for a 225-trial search and fat tails, the edge at the asset's realistic Sharpe magnitude is not statistically distinguishable from best-of-N noise; deflated Sharpe is the binding gate the whole dual-TF family kept failing.
Outcome Summary
It earned an 'optimize' verdict and, after an iteration-3 over-leverage fix that raised DSR from 0.04 to 0.758 and normalized risk_frac, a second (terminal) optimization attempt. The analyst abandoned it at the ANALYZING stage on a decisive deflated-Sharpe failure: although every direct overfit gate was clean and the generalization is real, the residual DSR shortfall is structural — ETH's fat-tailed return (kurtosis 19.7, a few double-digit days carrying whole years) is skew/kurtosis-penalized, so at ETH's realistic ~1.0-1.3 Sharpe the deflated Sharpe cannot reach 0.95 no matter how it is tuned.
Outcome Summary
A long-short, single-instrument dual-timeframe momentum-confluence strategy on ETHUSDT.BINANCE USD-M (4H primary + 1D confirm, 3 parameters) that took a position only when a vol-normalized fast 4H momentum read and a slow daily read agreed and both cleared entry_z, went flat on disagreement, and trailed winners with an ATR stop — a direct generalization test of the factory's one optimization survivor (BTC dual-TF momentum) onto ETH.
Outcome Summary
The backtest (ETHUSDT.BINANCE 4H + 1D, 2409 data days) was the strongest of the whole run: +1219% total return, Sharpe 1.04 (CI-low 0.40), profit factor 1.64, max drawdown 16.4%, decorrelated alpha 0.27 (beta 0.045), positive every year 2020-2026 including the 2022 bear (+39.7%) with a winning recent regime. Optimization cleared the direct overfit gates cleanly (PBO 0.28, holdout ratio 0.761, all three OOS windows positive, is_overfitted FALSE, 0 cliffs) and lifted the config to Sharpe ~1.30 — but deflated Sharpe reached only 0.758 against the 0.95 bar (expected-max 1.09 over 225 trials), with fat tails (kurtosis 19.7, skew 1.78).
Backtest and paper results are hypothetical. Trading involves risk of loss.