BtcLeverageExtremeDeleveragingReversionLS
Hypotheses
BTC Leverage-Extreme Deleveraging Reversion, Long-Short (Single-Instrument BTCUSDT.BINANCE Perp, 4H Bars — Fade Short-Term Overextensions ONLY When Funding Confirms an Over-Leveraged Crowd in the Same Direction, ATR-Stopped, 3-Parameter)
Hypotheses
A LONG-SHORT, CONTRARIAN single-instrument strategy on BTCUSDT.BINANCE USD-M perpetual that fades short-term price overextensions ONLY when the funding rate confirms the extension is driven by an OVER-LEVERAGED crowd — i.e. it trades the forced-deleveraging reversion, not generic mean-reversion. It is deliberately different from everything in my pending queue (which is entirely momentum/trend: BTC momentum survivor + taker-flow/OI/premium confirms + lead-lag + ETH breakout) and is the mechanical OPPOSITE — a contrarian fade. It directly targets why generic mean-reversion has failed this session (BTC-HL pure-price range-MR was decisively negative): pure-price MR fades noise with no mechanism behind the reversion. This strategy only fades when there is a genuine CAUSE — a crowded leveraged position at risk of being squeezed: price stretched UP while funding is richly POSITIVE (over-leveraged longs paying to be long) → fade short, betting the long crowd gets deleveraged back toward the mean; symmetric on the downside. It stays on BTC — the ONE instrument this session has proven directionally tradable (every alt directional variant across price/volume/structure/ADX died 'no edge') — and keeps the developer-safe recipe: SIMPLE, single-instrument, ONE supplementary scalar (funding rate), same instrument traded, standard incremental indicators (avoids the whole-strategy-swap and timeout deaths). It is measurable (extension + funding-extreme co-occurrences recur ~100-180 times over multi-year 4H history) and fee-viable (BTC reversion legs of ~1.5-3% clear the ~0.10% fee), with a favorable-RR exit (revert-to-mean target larger than the ATR stop). It fills the under-target LONG-SHORT bucket (13.3% vs an 86.7%-long-only book) and adds a genuinely different EDGE and MECHANISM to the book. Only 3 parameters.
Hypotheses
Zero entries over 2151 bars was a parsing bug, not a threshold problem, and I found it. `funding_rates` is documented as a flat {nanoseconds: rate} dict carrying BOTH int and str spellings of each timestamp, and iteration 1 wrote `if isinstance(k, str): continue` to avoid double-counting — but this dict reaches the strategy through the config/parameters layer, and any JSON or msgspec round trip converts every mapping key to a STRING, because JSON object keys cannot be integers. On a string-keyed dict that filter discarded EVERY sample: the series was empty, _funding_z returned None on every bar, license_dir stayed 0 forever, and the (correct) no-substitution rule kept the book flat for the entire run. That is silent, total, and exactly consistent with 0 entries while momentum-style siblings on the same instrument and window traded normally. Both key spellings are now accepted and de-duplicated by the COERCED nanosecond value, so dual keys collapse onto a single sample and neither spelling can be lost; a list-of-row-dicts funding payload is also accepted (same measurement, defensively parsed). I made exactly one small loosening alongside it — the crowding floor eased from 0.5 to 0.35 sigma (confirm_frac, a locked constant) — and deliberately did NOT touch the 2.0-ATR entry extension threshold, because that threshold sets the reversion target (0.25 x 2.0 = 0.5 ATR) and therefore the ~1.5-ATR target against a 1.5-ATR stop that gives this fade its favourable reward:risk; lowering it would buy trade count by degrading the payoff, which is the wrong trade and the mistake that inverted the geometry on sibling strategies. Diagnostics now make the next review decisive rather than speculative: the build logs how many int-keyed vs str-keyed samples were accepted, the series span, and the funding mean/sd in bps, and on_stop reports funding_missing_bars vs crowded_bars plus the long/short fade split. Everything that passed Layers 1-2 is untouched: same imports, same class, same continuous contrarian signal and its clipped non-confirming branch, same entry cross, same three structural exits including the calendar-anchored max hold, same O(log n) prefix-sum funding reads and index-based bar access, same risk-anchored sizing, still exactly 3 tunables. Honest bound: if this run still produces no trades, the log will say whether the funding series is genuinely absent from the sandbox — in which case a funding-gated hypothesis is not testable in this pipeline and should be abandoned rather than iterated a third time.
Hypotheses
Decisive negative edge, not an optimization candidate. Now that the funding series parses (819 events, 174 trades), the genuine result is a net loser: profit_factor 0.904, expectancy -$87.3/trade, total_return -21.4%, Sharpe -0.134, avg_trade_return_pct 0.147% (below the fee floor), losing in 4 of 7 years. The failure is structural and contradicts the hypothesis's central claim: despite a 56.3% win rate, realized reward:risk is INVERTED (avg_win $1454 < avg_loss $2074), so break-even (~58.8%) is not met. Funding confirmation did not add a genuine reversion mechanism — when the fade is wrong the over-leveraged crowd keeps getting squeezed and losses run bigger than the modest reversion wins (kurtosis 16.9, largest_loss -$6697). This is the contrarian-fade-with-inverted-RR pattern that has died repeatedly this session; optimizing ext_lookback/funding_thresh/stop_atr_mult cannot flip a negative-expectancy payoff geometry across a decisive 7-year, 174-trade sample. Abandon rather than spend 2 hours optimizing.
Implementation
Contrarian long/short fade of 4H BTCUSDT.BINANCE perp overextensions, taken only when the funding rate confirms an over-leveraged crowd on the stretched side. Extension is (close - SMA(ext_lookback)) / ATR; crowding is the 24h mean funding rate standardized as a rolling z-score against its own trailing 30 days. The signal is the crowding-weighted contrarian extension -ext * min(1, |zf|/funding_thresh) when funding points the same way as the stretch, and a clipped residual otherwise, so a stretch on flat or opposing funding can never trip an entry; weaker crowding demands a proportionally larger stretch. Entry is a fresh cross of +/- entry_thresh_atr (2.0 ATR) in the direction the paying crowd licenses: crowded paying longs -> fade short, crowded paying shorts -> fade long. Exits are the reversion target (extension back inside 0.5 ATR of the mean), a hard stop_atr_mult ATR stop from the entry price, or a 96-hour calendar max hold. If funding is missing or stale the strategy takes no position — it never degenerates into pure-price mean reversion. Sizing risks a locked 2% of equity to the hard stop, capped at 1x equity notional and floored at BTC's 0.001 step and the $100 minimum. Three tunables: ext_lookback, funding_thresh, stop_atr_mult.
Verification Results
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSDT.BINANCE-4-HOUR-LAST-EXTERNAL, Bars processed: 2182
Diagnostics: should_enter() returned a side 0 times over 2151 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
At BACKTEST_REVIEW verify on the full multi-year sample (>=~80 trades) that win_rate stays clearly above the ~55% the inverted RR requires for breakeven, and that avg_trade_return_pct stays above the fee floor with the worst 1-2 tail losses removed (skew/kurtosis say the result leans on the tail not blowing up). This is the fragility to stress-test, not a QA blocker.
Verification Results
REALIZED RR IS INVERTED AND THE LEFT TAIL IS FAT -- the edge depends entirely on the high win rate holding, so the analyst must verify it on the full sample. Despite the hypothesis's 'favorable-RR' pitch (1.5-ATR target vs 1.5-ATR stop), realized avg_win $1806 < avg_loss $2182 (RR 0.83), with return_skew -1.84, return_kurtosis 29.9, and largest_loss -$5681 vs largest_win $3350. That is the classic mean-reversion-fade geometry: many contained wins, occasional large loss when a dislocation keeps extending (the fade fails and price gaps past the bar-close hard stop). The strategy is net-positive ONLY because win_rate is 0.630 (0.63 x 1806 - 0.37 x 2182 = +$330/trade); if that hit rate regresses even a few points on the full sample the inverted RR flips expectancy negative fast. The 27-trade sandbox Sharpe (0.486) also has a CI of [-1.01, 2.19] that straddles zero.
Verification Results
Risk officer: consider lowering max_notional_frac (so the 2% risk-based size binds instead of the notional cap) or acknowledge the gap-through tail; confirm the realized worst-case per-trade loss is acceptable for the book. The sizing code is correct; this is a cap/stop-interaction and 4H-close-stop gap-risk observation.
Verification Results
HOT EXPOSURE / REALIZED PER-TRADE RISK EXCEEDS THE NOMINAL 2% -- for the risk officer. avg_position_pct is 90.99% (vs 25-50% on the session's other single-instrument strategies): the tight 1.5-ATR stop makes the risk-based size (equity*risk_pct/(1.5*ATR)) hit the 1.0x notional cap, so the cap binds and the strategy runs near-full-equity notional. When the cap binds, a stop-out is ~2.25%+ of equity rather than the nominal 2%, and because the hard stop is evaluated on the 4H CLOSE it can gap (largest_loss -$5681 is ~5.7% of a ~$100k account -- ~3x the intended risk unit). Not a blow-up (leverage 1.0, liquidated=false, bounded), but a tail-prone fade running at 91% notional with a gap-through stop is aggressive.
Verification Results
Confirm the drawdown/VaR normalization engine-side; note the ~$17M capacity for sizing.
Verification Results
IMPLAUSIBLE RISK-METRIC UNITS + moderate capacity -- verify (engine-side). max_drawdown 9.69 (969%, CI [3.98, 21.73]), cvar_95 1.67 are >100% despite leverage 1.0 / liquidated=false -- the session-wide metrics-normalization convention, not a sizing bug. capacity_usd $17.4M with impact_cost_pct 7.6% is moderate (better than the ETH-volume sibling's $476k, well below the lead-lag transfer's $100M) -- deployable at modest size, worth the PM's note.
Backtest Review
Iteration-2 funding-parsing fix worked: 819 funding events loaded, 174 two-sided trades (69 long / 105 short) — the strategy is now genuinely testable, not zero-trades
Backtest Review
High win rate (56.3%) and correct implementation of the funding-confirmed fade mechanism
Backtest Review
Decisive negative edge across 174 trades / 7 years: profit_factor 0.904 (<1.0), expectancy -$87.3/trade, total_return -21.4%, Sharpe -0.134
Backtest Review
INVERTED realized reward:risk — the opposite of the hypothesis's core claim: avg_win $1454 < avg_loss $2074 (~1.43:1 against), so the 56.3% win rate is below the 58.8% break-even and it bleeds
Backtest Review
Fat adverse tails (kurtosis 16.9, largest_loss -$6697 vs largest_win $4787): when the fade is wrong the crowd keeps being squeezed and the move runs hard against the position — funding confirmation did not create a real reversion mechanism
Backtest Review
avg_trade_return_pct 0.147% is below the 0.15% futures fee floor; loses in 4 of 7 years; max_drawdown 33.8%; avg_position_pct 76.6% (heavy exposure)
Outcome Summary
This strategy tried to make mean-reversion work by fading BTC price extensions only when funding confirmed an over-leveraged, squeeze-prone crowd behind the move, an explicit attempt to give the reversion a genuine cause. Once an iteration-2 dual-key funding-parsing bug was fixed, it became testable with 174 two-sided trades over 7 years — but the result decisively contradicted its own thesis: reward:risk was inverted (avg_win $1454 vs avg_loss $2074), so the 56.3% win rate sat below break-even and it lost 21.4% with fat adverse tails. The analyst abandoned it at the pre-optimization backtest-review gate, noting this is the contrarian-fade-with-inverted-RR pattern that has died repeatedly this session and that optimization cannot flip a negative-expectancy payoff geometry. It was abandoned after two iterations without reaching optimization, analysis, or risk review.
Outcome Summary
Adding a plausible causal 'mechanism' (funding-confirmed crowding) to a contrarian fade does not fix the inverted reward:risk that kills mean-reversion — fading a leveraged extreme means the tail runs against you when the squeeze continues, so a high win rate still bleeds when losers dwarf winners.
Outcome Summary
It was abandoned at the backtest-review gate (iteration 2): the analyst ruled it a decisive negative edge, not an optimization candidate, because the funding confirmation did not create a real reversion mechanism — despite a 56.3% win rate, the inverted reward:risk left it below the ~58.8% break-even, and when the fade was wrong the over-leveraged crowd kept getting squeezed and losses ran large.
Outcome Summary
It faded short-term price overextensions on BTCUSDT.BINANCE 4H bars (long-short, contrarian) only when the funding rate confirmed an over-leveraged crowd in the same direction — fading rich-positive-funding rallies short and rich-negative-funding selloffs long to trade the forced-deleveraging reversion, with an ATR stop and a revert-to-mean target.
Outcome Summary
After the iteration-2 funding-parsing fix made it testable (819 funding events, 174 two-sided trades over 7 years), it was a decisive net loser: profit_factor 0.904, expectancy -$87.3/trade, total_return -21.4%, Sharpe -0.134, avg_trade_return_pct 0.147% (below the fee floor), with an inverted realized reward:risk (avg_win $1454 < avg_loss $2074) and fat adverse tails (kurtosis 16.9, largest_loss -$6697).
Backtest and paper results are hypothetical. Trading involves risk of loss.