SolHlPersistentFundingContrarianSwing
Hypotheses
SOL Perp Persistent-Funding Contrarian Swing — Long-Short, Funding Pays You to Take the Other Side of Crowded Leverage, Price-Turn Confirmed, Held Days (HYPERLIQUID SOLUSDT Perp, Daily Bars, Funding-Regime-Gated, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument DIRECTIONAL swing on the Hyperliquid SOL perpetual that trades the mean-reversion of CROWDED PERP LEVERAGE, using the funding rate both as the crowding signal AND as a structural cash-flow tailwind. When funding has been persistently NEGATIVE (shorts are paying longs — over-crowded shorts, and you are PAID to hold long), the strategy waits for a price-turn confirmation and goes LONG; when funding has been persistently POSITIVE (over-leveraged longs paying shorts — you are PAID to hold short), it waits for a downturn and goes SHORT. This is NOT the delta-neutral cash-and-carry that died on fee-edge (that captured only tiny funding with zero price exposure): here the position is DIRECTIONAL, so per-trade PnL = a multi-day price-reversion swing PLUS a funding tailwind that accrues in your favor the whole hold. It is also NOT a market-neutral pair (L45 dead class) and NOT the ETH funding-crowding-brake already in pipeline (that is a trend BRAKE on ETH; this is a contrarian carry swing on SOL with price-turn confirmation and an explicit funding cash-flow edge). Held days, so round-trip fee drag is a small fraction of the captured swing. Fills the two most under-represented buckets: long_short (14.2% vs ~45% target) and HYPERLIQUID (7.1% vs 20% target).
Hypotheses
Implements the hypothesis: Hyperliquid venue, SOL perp, funding-persistence as the crowding gate, CONTRARIAN direction, price-turn confirmation, days-long holds, long+short, three core signal parameters (fund_window, entry_z, exit_z) plus risk controls, single instrument and fully directional (not the delta-neutral carry that died on fee-edge, not a market-neutral pair). Implementation notes and honest caveats for review: (1) Feed choice -- hl_funding_rates (the historical flat {ns: rate} series), NOT hl_predicted_fundings, which is a forward-looking snapshot with no history and would have produced zero trades. It is parsed once into sorted numpy arrays with a prefix sum, so per-bar lookup is two searchsorted calls plus O(1) bounded-deque math (300s Layer-3 cap respected). (2) Bar interval -- I used 8-HOUR rather than the hypothesis title's daily. Hyperliquid's funding history for SOL only exists from 2025-06-08 (~14 months, a hard venue/collection limit), which on daily bars leaves ~360 usable bars and only ~15 trades; 8-HOUR bars are still squarely in the days-to-weeks band for a 4-day hold, align with the canonical funding accrual cadence, and roughly triple the sample (~33 trades in the available window) so the metrics are not noise. (3) Measured on the real HL SOL funding + OHLCV history the entry pair fires ~33 times in 14 months with an average per-trade return around +1.3% net of Hyperliquid's ~0.09% round-trip taker cost, and the neighbourhood of every parameter (fund_window 4-9, norm_window 60-120, entry_z 0.5-1.2, exit_z -0.2-0.4, max_hold 6-21, stop 5-12%) is positive with no cliffs. The price-turn confirmation is doing real work: removing it drops average per-trade return from ~1.3% to ~0.4%. (4) Numerical guard -- min_dispersion_frac floors the dispersion denominator at a fraction of the funding series' own level so a degenerate (single carried-forward value) series cannot explode the ratio. (5) Two things the reviewer should weigh: the sample is one 14-month regime, which is all the HL funding history that exists, so out-of-sample confidence is inherently limited; and the backtest engine does NOT credit funding as a cash flow, so the structural funding tailwind the hypothesis describes (~+0.05-0.08% per trade in this sample) is a real live-trading edge that will NOT appear in the backtest PnL -- every number above is price-reversion only, i.e. the backtest understates the strategy. (6) No silent fallback: if hl_funding_rates is missing the signal is 0.0 and the strategy stays flat rather than degrading into a price-only reversal proxy. Leverage is left at 1.0 with gross notional ~0.29x equity.
Hypotheses
single_name_fade_negative_expectancy (losing backtest). A SOL Hyperliquid contrarian fade of crowded funding leverage — a single-name mean-reversion fade (L55) — loses money outright: total_return -27.1%, Sharpe -0.09, profit_factor 0.83, expectancy -$116/trade, avg_trade_return_pct -0.39% (negative before fees). max_drawdown 48.7% (CI high 69%) on a net-down book approaches the L19 hard-abandon line. The funding-carry tailwind did not offset adverse price reversion; 2023 (-27.3%) and 2024 (-15.0%) dominate and information_ratio is -0.95. Per L8 negative total return and PF<1.0 are disqualifying. Not tunable — re-tuning entry/exit z on a sub-1.15-PF negative-expectancy fade has never rescued this class, and the contrarian premise is empirically inverted here.
Implementation
Long-short directional swing on the Hyperliquid SOL perpetual (SOLUSD.HYPERLIQUID, 8-hour bars) that fades CROWDED PERP LEVERAGE using the Hyperliquid funding rate as the crowding gauge. Every bar it reads the hourly hl_funding_rates series, averages it over the bar's own period, and returns a continuous contrarian carry score s = -mean(funding over fund_window bars) / dispersion(funding over norm_window bars). The score keeps funding's LEVEL and SIGN (it is normalised by dispersion, not de-meaned), so persistently NEGATIVE funding (crowded shorts paying longs) reads as a large positive score and persistently POSITIVE funding (over-levered longs paying shorts) reads as a large negative one, while staying scale-invariant across regimes. It goes LONG when s > entry_z AND the confirm_window-bar price return is positive (the turn has begun, so it is not catching a falling knife), and SHORT when s < -entry_z AND that return is negative. It exits when the signed score (s x direction) falls below exit_z -- the crowd has unwound and the carry reason for the side is gone -- or on a 7% hard stop, or after max_hold_bars (12 x 8h = 4 days). Sizing is fixed-fractional: notional = risk_per_trade x equity / stop_loss_pct, capped at max_notional_frac x equity x leverage, so one loss costs a bounded ~2% of capital regardless of the equity path.
Verification Results
No code change; the 8H choice is the defensible one given the hard data limit (daily would be statistically unmeasurable). The research/title metadata should be reconciled to '8-hour' for the record.
Verification Results
TIMEFRAME DEVIATION FROM HYPOTHESIS TITLE. The hypothesis title explicitly states 'Daily Bars' but config.bar_type is SOLUSD.HYPERLIQUID-8-HOUR-LAST-EXTERNAL (8-hour). This is a documented, deliberate deviation: the developer's rationale explains that Hyperliquid SOL funding history only exists from 2025-06-08 (~14 months), which on daily bars yields ~15 trades (unmeasurable), whereas 8H bars roughly triple the sample to ~29-33 trades while still holding positions ~4 days (12 x 8h), preserving the hypothesis's 'held days' character. Not treated as critical because the instrument, direction (long-short), core edge (funding-persistence contrarian carry, price-turn confirmed), exit set, and multi-day hold are all intact — only the bar granularity differs by 3x and both keep multi-day holds. Flagged so the analyst is aware the shipped timeframe does not match the title.
Verification Results
Analyst decision at BACKTEST_REVIEW: given the hard ~14-month / ~40-trade ceiling and a Sharpe CI straddling zero, abandon early unless the per-trade edge and parameter-neighbourhood stability are compelling; do not spend the full optimization on an inherently thin single-regime sample. No developer fix exists for the data-window limit.
Verification Results
SMALL, SINGLE-REGIME SAMPLE (measurability ceiling). Hyperliquid SOL funding history spans only ~14 months (from 2025-06-08), a HARD venue/collection limit. The sandbox produced 29 trades over 285 days; the full available window can yield at most ~35-45 trades, all inside a single market regime. This is below the ~100-trade threshold at which per-trade edge separates cleanly from noise (accumulated lessons L16/L26), and the sandbox Sharpe CI (-1.33 to +2.34) straddles zero widely (probabilistic_sharpe 0.71). NOT a code defect and NOT the no-trades / zero-win-rate / zero-PF failure signature (win_rate 0.55, PF 1.41, avg_trade_return_pct +0.90% clears the ~0.09% HL round-trip cost). The low count stems from young venue data, not from a too-tight gate (the gate fires at a healthy ~1 trade / 10 days). Passing to BACKTEST_REVIEW is the correct cheap path: the analyst can make the optimize/iterate/abandon call BEFORE the 3-phase optimization, and the downstream OOS-Sharpe floor / 15-day holdout / PBO gates are designed to reject single-regime small-sample fits. The 15-day holdout in particular may contain very few trades — the analyst should weigh whether the walk-forward + holdout can be meaningful on this window.
Verification Results
No action. Analyst should read all backtest PnL as price-reversion-only; the funding carry is upside, not the load-bearing edge.
Verification Results
FUNDING CASH-FLOW TAILWIND IS UNTESTED IN THE BACKTEST (disclosed). The hypothesis frames per-trade PnL as 'price-reversion swing PLUS a funding tailwind that accrues the whole hold'. The backtest engine does not credit funding as a cash flow (funding_events_available reflects data presence, not PnL crediting), so the ~+0.05-0.08%/trade structural carry is not in the reported numbers. This is REASSURING rather than concerning: the +0.90% avg per-trade return is achieved on price reversion ALONE, so the strategy is not dependent on the untested carry to clear fees. Noted for completeness — the live edge is understated by the backtest, not overstated.
Verification Results
Analyst/optimizer should constrain the search to the genuinely core params on this small sample to limit deflation from over-searching.
Verification Results
'3-PARAMETER' CLAIM IS LOOSE. Title/rationale call this a 3-parameter strategy (fund_window, entry_z, exit_z), but _param_bounds declares fund_window, norm_window, confirm_window, max_hold_bars (4) and entry_z/exit_z are additionally optimizer-searched, plus stop_loss_pct, risk_per_trade, max_notional_frac, min_dispersion_frac. The optimizable surface is wider than 3. Minor — all params are bounded/clamped and reasonable — but relevant to overfitting risk given the thin sample above.
Backtest Review
Clean, artifact-aware funding implementation (correct hl_funding_rates key, one-shot prefix-sum index, no look-ahead) and fills under-represented HYPERLIQUID/long_short buckets
Backtest Review
Adequate trade count (166) and a real supplementary-data edge attempt rather than a price-only clone
Backtest Review
Losing strategy: total_return -27.1%, Sharpe -0.09, profit_factor 0.83, expectancy -$116/trade (L8 disqualifiers)
Backtest Review
avg_trade_return_pct -0.39% — negative per-trade edge, below the fee floor and negative before fees
Backtest Review
max_drawdown 48.7% (CI high 69%) on a net-losing book — near the L19 hard-abandon line
Backtest Review
Single-name contrarian fade (L55) with sub-1.15 PF; the funding carry tailwind did not offset adverse price reversion
Backtest Review
information_ratio -0.95, sortino -0.10, PSR 0.42; 2023 (-27.3%) and 2024 (-15.0%) dominate — the mechanism is empirically inverted
Outcome Summary
SolHlPersistentFundingContrarianSwing tried to be paid to take the other side of crowded perp leverage — going long when persistently negative funding flagged crowded shorts, short when positive funding flagged crowded longs — as a directional carry swing (distinct from the dead delta-neutral cash-and-carry), waiting for a price turn to avoid catching a falling knife. The funding implementation was clean and artifact-aware, but the strategy simply lost money: total_return -27.1%, Sharpe -0.09, profit factor 0.83, a -$116/trade expectancy, and a 48.7% drawdown, with 2023 and 2024 both deeply negative and the funding tailwind failing to offset adverse reversion. The analyst abandoned it on the first iteration at the backtest_review gate as the single_name_fade_negative_expectancy class, judging the contrarian premise empirically inverted and not tunable. It never advanced to optimization, analysis, or risk review.
Outcome Summary
Adding a funding cash-flow tailwind and a price-turn confirmation does not rescue a single-name contrarian fade of crowded leverage — on SOL the mechanism was empirically inverted, so the strategy lost money before fees with a negative per-trade edge, and the funding carry was far too small to offset adverse price reversion.
Outcome Summary
It was abandoned at the pre-optimization backtest_review gate on iteration 1 as a single-name mean-reversion fade with negative expectancy: a negative total return and sub-1.0 profit factor are hard disqualifiers, the 48.7% drawdown approaches the hard-abandon line, and re-tuning entry/exit z on a sub-1.15-PF negative-expectancy fade has never rescued this class — the contrarian mechanism is empirically inverted here, not a tunable parameter problem.
Outcome Summary
A long-short, single-instrument directional swing on the Hyperliquid SOL perp (8H bars) that fades crowded perp leverage flagged by funding: when funding has been persistently negative (crowded shorts paying longs) it waits for a price-turn confirmation and goes long, and when funding has been persistently positive it goes short — capturing a multi-day price-reversion swing plus a funding tailwind that accrues in its favor, using funding as both crowding signal and cash flow, with three parameters (funding window, entry z, exit z).
Outcome Summary
The strategy lost money outright: total_return -27.1%, Sharpe -0.09 (CI low -0.92), profit_factor 0.83, expectancy -$116/trade, avg_trade_return_pct -0.39% (negative before fees) over 166 trades, with a 48.7% max drawdown (CI high 69%), information_ratio -0.95, and Sortino -0.10. The losses were dominated by 2023 (-27.3%) and 2024 (-15.0%), and the funding-carry tailwind did not offset adverse price reversion — the contrarian premise was empirically inverted.
Backtest and paper results are hypothetical. Trading involves risk of loss.