EthHyperliquidDualTimeframeMomentumConfluenceLS
Hypotheses
ETH Hyperliquid Dual-Timeframe Momentum Confluence, Long-Short (Single-Instrument ETHUSD.HYPERLIQUID Perp, 4H Primary Momentum + 1D Confirm, Directional ONLY When Both Timeframes Agree / FLAT on Disagreement, ATR-Trailing Winners, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument, pure-OHLCV strategy that is a FAITHFUL PORT of this factory's ONLY optimization survivor — the BTC Dual-Timeframe Momentum Confluence (Sharpe ~1.99, now in paper) — onto the under-represented HYPERLIQUID venue and the second-most-liquid asset (ETH). This is a deliberate, evidence-driven design choice: the recent wave of single-name Hyperliquid momentum attempts that invented NEW bespoke gates (e.g. the AVAX Kaufman-efficiency-ratio gate — just abandoned, no edge, -0.28%/trade) died precisely because bespoke signals overfit or have no real edge, while the ONE thing that demonstrably works is the plain two-timeframe momentum-sign confluence with flat-on-disagreement and trailing-stop winners. So instead of inventing another filter, this replicates the winning recipe EXACTLY and changes only the instrument+venue — the standard, robust way a real desk diversifies a proven system across markets. It is materially different from the ETH-Hyperliquid strategy already in the pipeline (EthHyperliquidTrendPullbackContinuation, which buys RSI pullbacks within a single daily-EMA regime): THIS one takes a position only when the 4H momentum SIGN and the 1D momentum SIGN AGREE, sits flat whenever they disagree, and trails winners — the exact confluence mechanism, not a pullback-reversion entry. Fills the most under-represented data-safe buckets: HYPERLIQUID venue (6.1% vs 20% quota) and long_short direction (13.7% vs target). Single instrument, HYPERLIQUID 4H + 1D bars (4H ~2.3 years usable, 1D full history — both above the sub-hourly wall); same venue so NO cross-venue price_precision schema-merge landmine, NO spot-lookup timing bug. Pure OHLCV, no supplementary feed (best-surviving tag family). Avoids every recent death mode: no options-expiry cadence, no funding fee-floor/carry, no 90-day liquidation-feed wall, no COIN-M booking defect, and — by reusing the proven generic momentum signal rather than a fitted one — directly targets the overfit failure (250x, the #1 killer) that sank the bespoke-gate siblings.
Hypotheses
The first optimization pass established that the edge is statistically real — deflated Sharpe 0.9842 clearing the 0.95 gate, Sharpe CI low 1.3845, consistent OOS and a clean sensitivity surface — so I changed nothing in the signal, entry, exit or sizing mathematics. Both changes target the search surface the analyst identified. First, I confirmed the mechanism in the engine before acting: WalkForwardOptimizer builds its space from the config's parameters dict, giving every numeric entry a ±50% range, which means risk_pct, max_notional_frac, min_notional and size_precision were being optimized as four additional dimensions despite measuring completely inert in sensitivity — four free dimensions of pure multiple-testing cost, which is what pinned PBO at 0.5027. They are now locked class constants, removed from both the config and every p.get() call, so the optimizer searches a genuinely 3-D surface; locking in both places matters because the config drives the search while the code guarantees a stale stored config cannot reintroduce a dimension. Second, on constraining the edge params: the ±50%-of-base bound rule is engine-wide and cannot be narrowed from strategy code, so I enforced the robust region by clamping inside the strategy — fast_lookback to [10,14], slow_lookback to [16,24], trail_atr_mult to [2.7,3.6]. This achieves the intent directly: a trial proposing fast=6 now evaluates identically to fast=10, which flattens the objective outside the robust band, collapses out-of-region trials into duplicates and effectively confines the search to the region the heatmap showed uniformly strong at Sharpe 1.8-2.0 with no cliff. All three inherited defaults (12/20/3.0) already sit inside these bounds, so the validated configuration is untouched and Phase-1's ±20% probe now falls entirely within the robust region as well. One honest note on what this can and cannot do: shrinking the surface from seven to three dimensions and removing the short-lookback corner should lower both the PBO and the expected-max-Sharpe bar, but the 15-day holdout ratio of 0.457 is a small-sample statistic on a very short window, and while a more robust parameter region should improve it, part of that number is simply noise that no code change can control. Given this is the final optimization attempt, that residual holdout variance is the main risk to passing.
Hypotheses
Overfit at the iteration limit (attempt 2 of 2) with two UNWAIVABLE hard-gate failures: PBO 0.8651 > 0.5 and holdout FAILED (Sharpe 0.495 vs WF-OOS 1.653, ratio 0.30 < 0.70). Strong full-sample metrics (Sharpe 2.10, PF 2.60, deflated_sharpe 0.9893) are the in-window-strong / holdout-collapse overfit signature — is_significant=false. Iteration 1 targeted these exact blockers (PBO 0.5027, holdout 0.457); the clamp/lock 'fix' pushed BOTH the wrong way (0.8651 / 0.30), proving the surface is intractably overfit. Per the overfit-vs-dead-premise rule this is abandon not revise: porting this recipe already died on BTC-HL (fee_edge), ETH-Binance (overfit), BNB-Binance (overfit) — only the original BTC-Binance survived.
Implementation
Long-short dual-timeframe momentum confluence on the ETHUSD Hyperliquid perpetual — a faithful port of the factory's validated BTC survivor. The fast leg is the sign of the trailing 12-bar return on 4H bars; the slow leg is the sign of the trailing 20-bar return on daily bars. It goes long only when both agree up, short only when both agree down, and sits flat on disagreement. Positions exit when the daily regime flips against the held side or on a 3x-ATR trailing stop from the position's running extreme. Sizing risks a locked 1% of equity across the trailing-stop distance, capped at 50% of equity in notional, with a 10 USD Hyperliquid minimum. Leverage 1.0. The optimizer surface is exactly three parameters (fast_lookback, slow_lookback, trail_atr_mult), each clamped in-strategy to the robust region measured in the first optimization pass — fast [10,14], slow [16,24], trail [2.7,3.6]; risk fraction, notional cap, minimum notional and size precision are locked class constants.
Verification Results
Optimization engine/analyst: verify the re-optimized PBO clears on its own (the legitimate 4-inert-dimension removal alone should help), and that reported 'optimal' params are not clamped values masquerading as searched ones. If PBO only clears via clamp collapse, treat the pass as fragile.
Verification Results
ROBUST-REGION CLAMPS ADDRESS A MARGINAL PBO — validate on merit, not surface collapse. The 3 edge params are clamped in-strategy (fast [10,14], slow [16,24], trail [2.7,3.6]) so the walk-forward's engine-wide ±50% search collapses out-of-region trials (e.g. fast=6 -> 10) into duplicates, confining the effective search to the region the first-pass heatmap showed uniformly strong (Sharpe ~1.8-2.0, no cliff). Defensible anti-overfit technique — region is principled/cliff-free, the edge is already established (deflated Sharpe 0.9842 > 0.95, Sharpe CI low 1.38, consistent OOS), self-consistent (clamps apply in backtest and live) — BUT the region was identified AFTER the first pass and the change targets the marginal PBO (0.5027), a mild in-sample-selection concern.
Verification Results
Weight the full ~2.3-year walk-forward and expect holdout variance; do not fail on a single noisy 15-day holdout if WF OOS and deflated Sharpe remain strong.
Verification Results
RESIDUAL HOLDOUT NOISE is the main risk to passing re-optimization (developer's own honest flag). The first pass had a 15-day holdout ratio of 0.457 — a small-sample statistic on a very short window. Shrinking the surface and removing the short-lookback corner should help, but part is irreducible noise. The single-year sandbox, while strong (+16.6%, Sharpe 1.17, PF 1.71, +0.995%/trade), has a Sharpe CI lower bound of -0.56 dipping below zero.
Verification Results
No code fix needed; legitimate anti-overfit engineering on an already-validated signal.
Verification Results
The signal/entry/exit/sizing mathematics is UNCHANGED from the iteration that already passed QA (strong sandbox, real edge), and both changes are legitimate surface-reduction: (1) locking the 4 inert sizing params (risk_pct, max_notional_frac, min_notional, size_precision) as class constants removed from BOTH config and every p.get() call — correctly stopping them from being optimizer dimensions, locked at the inherited survivor values so no new choice is baked in; (2) the robust-region clamps above. Both correctly and self-consistently implemented. No code defect, NO L17 signature (win 0.45, Sharpe 1.17, PF 1.71).
Backtest Review
Developer implemented both requested fixes exactly: four inert sizing params locked off the optimizer surface (genuinely 3-D now), and the 3 edge params clamped to the robust region (fast 10-14, slow 16-24, trail 2.7-3.6)
Backtest Review
Signal logic untouched, so the strong backtest is preserved: Sharpe 1.797 with CI [0.912, 2.708] (lower bound > 0), PF 2.13, max_drawdown 5.0%, PSR 0.9999
Backtest Review
181 two-sided trades (86 long / 95 short), avg_trade_return_pct 1.74% (~11x fee floor), positive all 3 years; edge already proven real in the prior optimization (DSR 0.9842, Sharpe CI low 1.38)
Backtest Review
Only ~2.5yr HL history with some outlier-day dependence (kurtosis 10.3); the fixes are aimed squarely at the marginal PBO (0.5027) and noisy holdout — the post-opt review MUST confirm PBO now drops below 0.5, else abandon
Backtest Review
This is the second and final optimization attempt; no further iteration budget
Analysis
The edge here is statistically real (deflated_sharpe 0.9842 PASSES 0.95, sharpe_ci_low 1.3845, consistent OOS, clean sensitivity) — the ONLY blockers are a marginal PBO (0.5027, a hair over 0.5) and a noisy 15-day holdout (ratio 0.457). Two concrete code changes should bring both under the gates on the second optimization attempt:
1. SHRINK THE OPTIMIZER SURFACE TO THE 3 DECLARED EDGE PARAMS. The hypothesis declared exactly 3 tunables (fast_lookback, slow_lookback, trail_atr_mult), but the strategy reads risk_pct, min_notional, max_notional_frac, and size_precision from `self.parameters` via p.get(), so the walk-forward optimized 7 dimensions (all four appear in best_params). The sensitivity analysis shows all four are INERT (flat Sharpe: min_notional/size_precision/max_notional_frac identical across variations, risk_pct 1.710-1.727). Optimizing over inert dimensions inflates the 225-trial multiple-testing surface and is the primary driver of PBO landing at exactly 0.5027. FIX: convert risk_pct (0.01), min_notional (10.0), max_notional_frac (0.50), and size_precision to LOCKED class constants — remove them from p.get() so the optimizer searches only the 3 real edge params. A genuinely 3-D surface materially lowers PBO and the expected-max-Sharpe bar.
2. CONSTRAIN THE EDGE PARAMS TO THE ROBUST REGION. The optimizer reached for short lookbacks (fast_lookback 6, slow_lookback 10 vs the validated 12/20), which overfit the ~2.5yr HL window and tipped PBO over. The sensitivity heatmap shows the conservative region is uniformly strong (slow_lookback 16-24 x trail 2.7-3.6 all Sharpe ~1.8-2.0, no cliff). Narrow the optimizer bounds to fast_lookback [10,14], slow_lookback [16,24], trail_atr_mult [2.7,3.6]. This keeps the genuine edge (Sharpe ~1.8-2.0) while improving OOS/holdout generalization.
Expected effect: fewer effective trials + a robust parameter region should push PBO < 0.5 and lift the holdout ratio above 0.70 without sacrificing the confirmed edge. This is the second and final optimization attempt — if PBO/holdout still fail after locking the surface to 3 robust dimensions, abandon.
Outcome Summary
EthHyperliquidDualTimeframeMomentumConfluenceLS was a deliberate cross-market port of the factory's only optimization survivor — the BTC dual-timeframe momentum confluence — onto Hyperliquid's ETH perp, keeping the mechanism, defaults, exit rule and sizing identical and changing only the instrument and venue. Its backtests were consistently strong (Sharpe 1.80 pre-opt, 2.10 post-opt, PF 2.60, deflated Sharpe 0.989, positive in all three years), and a second iteration locked four inert sizing dimensions off the optimizer and clamped the three edge parameters to a robust band specifically to fix the marginal PBO and noisy holdout from iteration 1. But those fixes moved both blockers the wrong way — PBO climbed to 0.865 and the holdout collapsed to a 0.30 ratio — the textbook in-window-strong, out-of-sample-weak overfit pattern. Having reached the two-iteration limit and with the same port already dead on BTC-HL, ETH-Binance and BNB-Binance, the analyst abandoned it, concluding the winning recipe survives only on its original BTC-Binance market.
Outcome Summary
Iteration 2's parameter-clamping and dimension-locking 'fixes' pushed both blockers the wrong way (PBO 0.503→0.865, holdout 0.457→0.30), showing that shrinking the optimizer surface cannot rescue an intractably overfit port — and that this recipe generalizes only on its original BTC-Binance market, not across venues and assets.
Outcome Summary
The analyst abandoned it at the iteration limit (attempt 2 of 2) on two unwaivable hard-gate failures — PBO 0.8651 > 0.5 and a failed holdout (ratio 0.30 < 0.70) — the classic in-window-strong / holdout-collapse overfit signature, with is_significant=false.
Outcome Summary
A faithful port of the factory's one optimization survivor (the BTC dual-timeframe momentum confluence) to the Hyperliquid venue and ETH, going long or short only when 4H and daily momentum signs agree, sitting flat on disagreement, and trailing winners with an ATR stop — changing only the instrument and venue, not the mechanism.
Outcome Summary
The clamped-parameter backtest looked strong: +84.5% return, Sharpe 1.797 (CI lower bound positive at 0.912), profit factor 2.13, 5.0% max drawdown and avg trade return 1.74% of notional across 181 two-sided trades (86 long / 95 short); optimization lifted the in-window Sharpe to 2.10 with PF 2.60 and deflated Sharpe 0.989, but PBO rose to 0.865 and the 15-day holdout collapsed to Sharpe 0.495 versus walk-forward OOS 1.653 (ratio 0.30).
Backtest and paper results are hypothetical. Trading involves risk of loss.