Skip to content

View original

BtcDailyFundingExtremeContrarianReversionLS

Hypotheses

BTC USD-M Daily Funding-Extreme Contrarian Reversion, Long-Short (Single-Instrument BINANCE Perp, Multi-Year Funding History, Fade Crowded Positioning at Funding Extremes with Price-Exhaustion Confirmation, Funding-Normalization Exit, Favorable Payoff Geometry, Low-Parameter)

Hypotheses

A LONG-SHORT, SINGLE-INSTRUMENT, DAILY contrarian strategy on BTCUSDT.BINANCE (USD-M perpetual) that fades EXTREME perpetual funding — a direct, mechanically-driven measure of leveraged-positioning crowding — using funding ONLY as a SIGNAL (not as carry/PnL), so there is no funding-accrual, cross-account, or hedge-leg issue. This is the DELIBERATE, analyst-endorsed REVISION of the Hyperliquid funding-extreme contrarian run that failed PURELY on the ~155-day HL data wall: the analyst's own meta-note said 'the funding-as-signal contrarian-reversion mechanism is reasonable and was cleanly implemented... if this mechanism is pursued, it needs a venue/instrument with multi-year history so walk-forward and holdout span real regimes.' Binance USD-M BTC funding history is multi-year (2020+), directly removing the root cause of that failure. It is engineered around every other confirmed landmine: SINGLE-INSTRUMENT / SINGLE-VENUE / SINGLE-ACCOUNT (no multi-instrument equity/return aggregation artifact); DAILY bars (NOT the intraday fee-bleed horizon that wiped the SOL VWAP and ETH taker fades); and — critically — it is explicitly designed with FAVORABLE PAYOFF GEOMETRY to avoid the small-TP/large-stop inversion that sank the SOL VWAP fade: the winner is allowed to run to funding-NORMALIZATION (a potentially large reversion), while the loss is a bounded ATR stop, so avg_win is structurally >= avg_loss rather than the destructive opposite. It is distinct from the existing EthPerpDailyFundingConfirmedTrendLS (which trades WITH the trend when funding CONFIRMS); this FADES funding EXTREMES (opposite logic), on BTC. It is also NOT a single-name price-trend re-expression (the analyst asked to stop those) — it is an orthogonal, crypto-native, positioning-based mechanism. Low parameter count to resist overfitting; moderate thresholds so entries fire adequately (avoiding the taker-flow no-trade failure).

Hypotheses

Iteration 2 fix (Layer 2 failure): the previous code called self._bar_ts(bar), but the base class _bar_ts() takes no positional argument, raising TypeError on every synthetic scenario. Replaced the single call site in calculate_signal with int(bar.ts_init) — the documented, already-integer nanosecond bar timestamp — which is exactly the value _funding_zscore expects for searchsorted against the funding timestamp array. This is the minimal change; all signal, entry/exit, sizing, imports, and structure (which already passed Layer 1) are untouched. The strategy retains favorable payoff geometry (normalization take vs. bounded ATR stop) and stays single-instrument/single-venue/daily per the hypothesis.

Hypotheses

The mechanism got its fair multi-year test (the revision correctly removed the HL data wall) and the result is a marginal, crisis-concentrated edge unlikely to survive optimization. Profit lives entirely in two systemic de-leveraging events — 2022-11 (FTX, +4.67% on 11/12) and 2023-03 (SVB, +7.12% on 3/17) — with 5 of 7 calendar years negative (2020/2021/2024/2025/2026 all red), return_kurtosis 61 and skew 3.4 confirming outlier-carry. The base is sub-significant: profit_factor 1.13, Sharpe 0.28, sharpe_ci_low -1.42 (CI straddles 0), PSR 0.65, and fee-fragile (impact 9.5%, commission 5.4% of gross). The hypothesis's defining premise — favorable payoff geometry (winner runs to funding normalization >> bounded ATR loss) — did not materialize (avg_win 733 ≈ avg_loss 700, 1.05:1). The recent regime is broken (rolling Sharpe -2 to -4 through 2024-2026), so walk-forward OOS and a final holdout would land in negative, non-crisis windows and a best-of-225 sweep would select the crisis-fit config that collapses out-of-sample — the classic deflated-Sharpe failure this review gate exists to avoid. Not iterate: the deficiency is structural (fading funding extremes only pays during systemic de-leveraging; in normal trends the fade is run over), not a fixable parameter/logic bug, so a developer round-trip would thrash. Not worth 2 hours of optimization.

Implementation

Long-short single-instrument daily contrarian on BTCUSDT.BINANCE USD-M perp. Computes a funding-rate z-score over a rolling window of funding observations (funding used purely as a positioning-crowding SIGNAL, never as carry/PnL). Fades funding extremes confirmed by RSI price exhaustion: high funding z + RSI overbought -> SHORT; low funding z + RSI oversold -> LONG. Exits on funding normalization (winner runs), a bounded ATR stop (capped loss), or a hold-time timeout.

Verification Results

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['exit_z', 'entry_z', 'risk_pct', 'atr_period', 'rsi_period', 'min_notional', 'rsi_oversold', 'max_hold_bars', 'stop_atr_mult', 'rsi_overbought', 'funding_lookback'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690680000) - steady_downtrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690680000) - flat_ranging: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690680000) - volatility_spike: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690680000) - zero_volume: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690680000) - price_gap: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690680000)

Backtest Review

Revision achieved its goal: multi-year Binance BTC funding history (1406 events, 2019-2026), single-instrument/single-account, no data wall and no aggregation artifact.

Backtest Review

Mechanism is correctly implemented and matches the hypothesis: 106 balanced trades (52 long / 54 short), funding-z-extreme fades with RSI confirmation, funding-normalization exit; funding used as signal only.

Backtest Review

Orthogonal, differentiated positioning-based mechanism (not a price-trend re-expression); it demonstrably works during systemic de-leveraging events (FTX 2022-11, SVB 2023-03).

Backtest Review

Profit concentrated in exactly two crisis events: all gains from 2022 (+10.2%) and 2023 (+6.8%), driven by 2022-11-12 (+4.67%) and 2023-03-17 (+7.12%); 5 of 7 calendar years are negative. return_kurtosis 61, skew 3.4.

Backtest Review

Central design premise FAILED: favorable payoff geometry did not materialize — avg_win 733 ≈ avg_loss 700 (1.05:1), not the promised avg_win >> avg_loss.

Backtest Review

Recent regime broken: rolling Sharpe runs -2 to -4 across 2024-2026; a final-window holdout sits in a negative regime.

Backtest Review

Marginal and fee-fragile: profit_factor 1.13, Sharpe 0.28 with sharpe_ci_low -1.42 (CI hugely straddles 0), PSR 0.65, impact_cost_pct 9.5%, commission 5.4% of gross, max_drawdown_duration 1019 days.

Backtest Review

Structural: fading funding extremes only pays in systemic de-leveraging; in normal trends the weak RSI 55/45 fade gets run over — not a tunable parameter region.

Outcome Summary

This iteration-2 revision successfully addressed the prior Hyperliquid run's fatal data wall by moving to Binance USD-M BTC, giving the funding-extreme contrarian mechanism a fair multi-year test (1406 funding events, 2019-2026) as a clean single-instrument, single-account book. The mechanism was correctly implemented and demonstrably worked during systemic de-leveraging events, but its profit was concentrated in just two crisis days while 5 of 7 years were negative, and its central design premise — winners running to funding normalization far beyond a bounded ATR loss — failed, with avg_win essentially equal to avg_loss (1.05:1). With Sharpe 0.28, a CI straddling zero, profit factor 1.13, fee-fragility (9.5% impact, 5.4% commission of gross) and a broken 2024-2026 regime, the backtest reviewer abandoned it before optimization, judging the deficiency structural rather than a tunable bug. The takeaway is that funding-extreme fades are a crisis-only edge that optimization would merely overfit to the two crisis events, so the mechanism should not be iterated further here.

Outcome Summary

Fading funding extremes is structurally a systemic-de-leveraging trade — it only pays during crises like FTX and SVB and gets run over in normal trends, so the edge is outlier-carry that can't be fixed by parameter tuning and the promised win/loss geometry never materialized.

Outcome Summary

The backtest-review gate returned 'abandon': the strategy failed Sharpe (0.28 vs 0.5), profit factor (1.13 vs 1.2), sharpe_ci_low (-1.42), positive-years fraction (0.29) and, decisively, its own defining premise of favorable payoff geometry (avg_win 733 ≈ avg_loss 700, a 1.05:1 ratio rather than the promised avg_win >> avg_loss).

Outcome Summary

A long-short, single-instrument daily strategy on BTCUSDT.BINANCE (USD-M perp) that fades extreme perpetual funding as a crowding signal, confirmed by RSI price-exhaustion, with a funding-normalization exit meant to let winners run against a bounded ATR stop.

Outcome Summary

Over a 2019-2026 multi-year backtest with 1406 funding events it took 106 balanced trades (52 long / 54 short) for a 0.60% total return, 51.9% win rate, Sharpe 0.28 (CI low -1.42), profit factor 1.13 and a 10.4% max drawdown, with profit concentrated almost entirely in two crisis events (2022-11-12 +4.67%, 2023-03-17 +7.12%) and 5 of 7 calendar years negative.
Strategy report

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