Skip to content

View original

SolHyperliquidVolRegimeDonchianBreakoutLS

Hypotheses

SOL Hyperliquid Volatility-Regime-Gated Donchian Breakout, Long-Short (Single-Instrument SOLUSD.HYPERLIQUID Perp, DAILY Bars — Trade Genuine Range-Expansion Breakouts ONLY in Active-Volatility Regimes, ATR-Trailing Winners, Pure OHLCV, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument, pure-OHLCV directional strategy on SOLUSD.HYPERLIQUID that trades range-EXPANSION breakouts of a Donchian channel, but only when a volatility-REGIME gate confirms the market is in an active (expanding) regime rather than a chop regime. It intentionally reuses the ONLY robustness template that has survived in this factory — single-instrument, pure-OHLCV, long-short, simple incremental indicators, wide trailing exit (the paper-stage BTC dual-TF momentum survivor) — but is MATERIALLY different from it and from everything in my own pending queue: different venue (HYPERLIQUID, not Binance), different asset (SOL), a different signal (Donchian range-breakout + realized-vol regime gate, NOT dual-timeframe MA-momentum confluence), and a TREND/breakout direction that is the opposite of my three pending contrarian/mean-reversion ideas (SOL-liquidation reversal, ETH-HL funding-contrarian, BTC/ETH short-strangle) — so it diversifies the mechanism mix, not just the wording. It deliberately avoids every demonstrated death mode this session: NO multi-leg options (developer implementation keeps failing — whole-strategy swaps, chain-scan timeouts), NO tick/book microstructure (timeout/no-trades/instrument-swap), NO supplementary feed (avoids data_unavailable), NO tight relative-value spread (fee_edge). Uses DAILY bars specifically so Hyperliquid's ~5000-candle history cap is a non-issue (1d = full history back to 2020). It fills the two biggest structural gaps after options: HYPERLIQUID venue (6.4% vs a ≥20% quota — genuinely shifting the mix off Binance's 71%) and LONG-SHORT direction (13.5% vs an 86%-long-only book). Only 3 parameters, and the regime gate is designed to keep it out of the choppy ranges where naive breakouts whipsaw and bleed fees.

Hypotheses

The Layer-4 blocker was frequency, not correctness — 7 trades in 363 days, with a Sharpe CI straddling zero and a 3-long/4-short split that was a single-regime artifact — so the smallest fix that actually addresses it is to raise the observation rate, and nothing else. I changed exactly two things: the bar type (1-DAY → 4-HOUR) and the four window constants that define the observation horizon (donchian_lookback 20→30, atr_window 14→30, vol_short 5→12, vol_long 20→60), which re-anchor the channel to ~5 days, ATR to ~5 days, and the vol-regime ratio to 2-day-vs-10-day — i.e. the signal keeps the same calendar meaning while being sampled six times as often. Every line of logic that passed Layers 1-3 (the continuous channel signal, the entry threshold semantics of 1.0, the regime gate, the flip/trail exits, the module-level `_std` that fixed the Layer-2 proxy rebinding crash, and the risk-anchored sizing with its independent notional cap) is byte-for-byte unchanged, so no earlier layer can regress. I chose the timeframe lever deliberately: shortening the daily lookback alone tops out near 15-25 trades/year and would still be unmeasurable, whereas 4-HOUR 5-day-range breaks confirmed by vol expansion should give ~40-70 entries/year, ~100-160 over the ~833 days (2.3 years) that Hyperliquid's ~5000-candle cap allows at this timeframe — and that window spans the 2023 rally, 2024 chop and 2025 drawdown, so the sample is no longer one directional regime, which also answers the benchmark_correlation -0.44 / 100%-short-win-rate artifact. This does depart from the hypothesis's stated 1-DAY choice; that choice existed only to dodge the candle cap, and 4-HOUR still clears it with years of history, so the departure costs nothing the hypothesis was protecting. Fee viability is unaffected: a 3 × 4H-ATR trail is ~1.3 daily ATRs (~5-6% on SOL) against ~0.09% Hyperliquid round-trip taker cost. On the second QA note, I agree and made no change: max_drawdown 3.62 with leverage 1.0, 2% risk per trade, a 0.5×equity notional cap and liquidated=false is a metric normalized to initial rather than peak equity on a compounding curve — a platform reporting matter that no strategy code can affect. I'll also flag honestly that pure-OHLCV Donchian breakout is a zero-survivor family per L7; the regime gate is a real differentiator but a measurable sample may well confirm no edge — that call belongs to the Analyst, and this iteration's job is to make the sample large enough for that call to mean something.

Hypotheses

No-edge, capacity-dead single-perp Hyperliquid Donchian breakout — not worth 2 hours of optimization. profit_factor is 1.065 (dead flat), Sharpe 0.195 with bootstrap CI [-0.96, 1.36] straddling zero, PSR 0.592, and total_return is 8.2% over 2.6 years (CAGR 1.85%) with a 43.7% win rate — expectancy indistinguishable from zero. It is flat-to-declining across the whole window (2024 +2.7%, 2025 +1.75%, 2026 +0.23%, rolling Sharpe negative through most of 2026), so the last-20% holdout is weak. It is also capacity-dead: impact_cost_pct 25.3% (impact consumes a quarter of gross PnL) with capacity_usd only $1.56M, so the thin gross edge only survives at toy scale. This is the zero-survivor Hyperliquid single-perp OHLCV directional class (0/128, L82) crossed with the pure-breakout graveyard (L30/L63) — a realized-vol-regime gate does not add robustness the deflation strips, and prior SOL-HL breakout/MR/channel variants all died. avg_trade_return_pct 0.54% clears the HL fee so it is not strictly fee-dead, but the failure mode is absence of a significant, scalable edge, and no tuning of donchian_lookback/vol_regime_ratio/atr_trail_mult turns a PF-1.06, CI-straddles-zero, $1.56M-capacity breakout into a real edge. Failure pattern: no_edge/capacity single-perp HL breakout (L82/L63/L30).

Implementation

Long/short volatility-regime-gated Donchian breakout on the SOLUSD.HYPERLIQUID perpetual, now on 4-HOUR bars. Every bar it returns the continuous normalized channel position 2*(close - mid)/(high - low) of the prior 30-bar (5-day) Donchian range — 0 at the midpoint, ±1 at the channel edges, |x| > 1 only on a genuine range breakout — and enters long above +1 / short below -1 only when a realized-vol regime ratio (12-bar vol / 60-bar vol >= vol_regime_ratio) confirms volatility is expanding rather than contracting into chop. Exits are an ATR trailing stop at atr_trail_mult × ATR(30) from the post-entry extreme, or an opposite-side channel break that flips the trend view. Sizing is risk-anchored (equity × risk_pct / stop distance) with an independent 0.5×equity gross-notional cap, so losses cannot compound into position size; leverage stays 1.0. Three tunables: donchian_lookback, vol_regime_ratio, atr_trail_mult.

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

Timeframe drift: hypothesis explicitly specifies DAILY bars, config is 4-HOUR. Developer changed it in iter-3 to fix the unmeasurable 7-trades/year sample (DAILY existed only to dodge the HL candle cap; 4H still clears it with ~2.6y history). Same instrument/mechanism, documented measurability iteration → warning, not a critical mislink. Update the hypothesis record to 4H if promoted.

Verification Results

Core mechanism is Donchian range-breakout, a zero-survivor OHLCV class (L7/L81). Vol-regime gate differentiates it but sandbox edge is near-zero (Sharpe 0.19, CI spans zero, PF 1.11). Not a code fault and now measurable → edge determination for the analyst. Verify the gate is the actual return driver (gated vs ungated on full history) and require OOS survival; abandon if edge stays at the Donchian-family baseline.

Backtest Review

avg_trade_return_pct 0.54% clears the ~0.09% HL round trip, and the iteration-3 4H switch got the sample to 87 trades (borderline measurable)

Backtest Review

Clean single-instrument pure-OHLCV construction, risk-anchored sizing, drawdown contained at 20.1%, no liquidation

Backtest Review

No edge: profit_factor 1.065 (dead flat), Sharpe 0.195 with CI [-0.96, 1.36] straddling zero, PSR 0.592, CAGR 1.85%

Backtest Review

Capacity-dead: impact_cost_pct 25.3% with capacity_usd only $1.56M — a quarter of gross PnL is impact and the edge exists only at toy scale

Backtest Review

Flat-to-declining every year (2024 +2.7%, 2025 +1.75%, 2026 +0.23%); rolling Sharpe negative through most of 2026 — the holdout window is weak

Backtest Review

Zero-survivor class: HL single-perp OHLCV directional (0/128, L82) + pure-breakout graveyard (L30/L63); a vol-regime gate adds no robustness the deflation can't strip

Iteration History

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['risk_pct', 'atr_window', 'signal_clip', 'min_notional', 'atr_trail_mult', 'entry_threshold', 'vol_long_window', 'vol_regime_ratio', 'vol_short_window', 'donchian_lookback', 'max_notional_frac'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: SolHyperliquidVolRegimeDonchianBreakoutLS._std() takes 1 positional argument but 2 were given (bar timestamp: 1735690800000) - steady_downtrend: TypeError: SolHyperliquidVolRegimeDonchianBreakoutLS._std() takes 1 positional argument but 2 were given (bar timestamp: 1735690800000) - flat_ranging: TypeError: SolHyperliquidVolRegimeDonchianBreakoutLS._std() takes 1 positional argument but 2 were given (bar timestamp: 1735690800000) - volatility_spike: TypeError: SolHyperliquidVolRegimeDonchianBreakoutLS._std() takes 1 positional argument but 2 were given (bar timestamp: 1735690800000) - zero_volume: TypeError: SolHyperliquidVolRegimeDonchianBreakoutLS._std() takes 1 positional argument but 2 were given (bar timestamp: 1735690800000) - price_gap: TypeError: SolHyperliquidVolRegimeDonchianBreakoutLS._std() takes 1 positional argument but 2 were given (bar timestamp: 1735690800000)

Iteration History

Verification failed (Layer 4 — QA review): - UNMEASURABLE SAMPLE FROM A ZERO-SURVIVOR MECHANISM CLASS. The sandbox produced only total_trades=7 over 363 data_days, with a Sharpe of 0.576 whose CI is [-1.03, 2.18] -- straddling zero, i.e. the result is statistically indistinguishable from no edge. A single-instrument DAILY Donchian breakout is structurally very low frequency: 7 trades/year means even the FULL SOL history (2020->now, ~5-6 years) yields only ~35-45 trades, far below the ~100 needed to separate edge from noise (L16). Worse, the trade split is a textbook single-regime artifact: long_trades 3 with a 0% win rate and short_trades 4 with a 100% win rate, and benchmark_correlation -0.44 -- i.e. the entire 'edge' is 4 winning SHORTS in a falling-SOL window, not a demonstrated symmetric breakout edge. And per learning L7, pure-OHLCV 'Donchian / N-day-high breakout' is explicitly one of the re-parameterized mechanism classes with ZERO survivors across the session; the volatility-regime gate is a reasonable differentiator but does not change the base rate at a 7-trade sample. profit_factor 2.17 and avg_trade_return_pct 6.3% are meaningless at n=7 (return_skew 0.84, kurtosis 10.7 -- dominated by one or two trades). - IMPLAUSIBLE RISK-METRIC UNITS -- verify, do not trust at face value. max_drawdown is reported as 3.62 (362%, CI [2.06, 9.82]) despite leverage 1.0, risk_pct 0.02, and a 0.5x-equity notional cap, with avg_position_pct 15.8% and liquidated=false. A literal 362% drawdown is impossible without liquidation; this is the same >100% max_drawdown pattern seen on other HYPERLIQUID sandbox runs this session (663%, 321%, 183%), almost certainly a metric normalized to initial capital on a compounding equity curve rather than to peak equity. The sizing code itself is sound (risk-anchored qty with an independent gross-notional cap, no compounding blow-up path). Flagging so the number is not read as a genuine 3.6x loss.

Iteration History

Verification failed (Layer 4 — QA review): - NEGATIVE PER-TRADE EXPECTANCY, NOW CONFIRMED ON A MEASURABLE, CROSS-REGIME SAMPLE. The iteration-3 fix did exactly what I asked -- 1-DAY -> 4-HOUR lifted the sample from 7 to 35 trades over 364 days (metrics_reliable=true) and balanced the direction split to 17 long / 18 short across the 2023 rally / 2024 chop / 2025 drawdown, removing the prior single-regime artifact. The problem is that the larger, cleaner sample now CONFIRMS no edge rather than leaving it inconclusive: avg_trade_return_pct -0.201% (negative -- below zero and well below the 0.15% fee floor), profit_factor 0.877, Sharpe -0.238, win_rate 0.40, per-trade expectancy -$121.35, net-negative total return. This is the third pure-OHLCV breakout/trend strategy to fail identically this session (this SOL Donchian, the ETH weekly-ORB, and the BTC-HL EMA-envelope trend-ride) and it is the L7 zero-survivor family; the developer's own rationale concedes 'a measurable sample may well confirm no edge' -- which it now has. The regime gate is a genuine differentiator but does not create edge: 5-day SOL range breaks confirmed by vol expansion do not extend far enough to overcome the opposite-range/trail give-back (win_rate 0.40), so expectancy is negative net of costs. - IMPLAUSIBLE RISK-METRIC UNITS -- verify (unchanged from prior iterations). max_drawdown 20.44 (2044%, CI [8.38, 34.10]), var_95 1.41, cvar_95 1.81 are all >100% despite leverage 1.0, risk_pct 0.02, a 0.5x-equity notional cap (avg_position_pct 35.6%), and liquidated=false. This is the same metrics-normalization convention seen across every HL/Binance sandbox run this session (663%, 362%, 321%, 183%, 1905%...), almost certainly initial-capital vs peak-equity normalization on a compounding curve, not a per-strategy sizing bug -- the sizing code is correct (risk-anchored, independent notional cap). The developer already flagged and correctly declined to 'fix' this in strategy code.
Strategy report

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