Skip to content

View original

AvaxFundingExtremeCrowdFadeLS

Hypotheses

AVAX Funding-Extreme Crowd-Fade, Long-Short (AVAXUSDT.BINANCE USD-M, 4H Bars): Fade the Over-Leveraged Perp Crowd When 8h Funding Reaches a Trailing Percentile Extreme, ATR Stop + Time Exit, 3-Parameter

Hypotheses

A LONG-SHORT, single-instrument, DIRECTIONAL strategy on AVAXUSDT.BINANCE (USD-M perp). Trigger: 8h funding at a TRAILING-90d percentile EXTREME, sustained over two consecutive prints. When funding is top-5th-percentile the perp crowd is aggressively long and paying premium (over-leveraged one-sided book) -> SHORT; bottom-5th -> LONG; flat otherwise. Distinct from delta-neutral carry-HARVEST (L87) and persistent WITH-funding carry-tilt: this is OUTRIGHT directional, OPPOSITE the funding sign, firing only on rare extremes. Backtestable today on ~5y AVAX USD-M OHLCV + Binance funding.

Hypotheses

Implements the hypothesis exactly: single-instrument, outright directional, opposite the funding sign, gated on a TRAILING-percentile extreme (not an absolute funding constant — per L5, percentile ranks stay scale-invariant across AVAX's 2021-2026 funding regimes), sustained over two consecutive prints, with an ATR stop and a time exit. Futures venue is required because the strategy goes short; leverage is left at 1.0 (and read via self.config.leverage in the notional cap) so nothing is set-but-unused and there is no leveraged compounding blowup. Funding is read point-in-time only through the base helpers (self._supp_arrays + bisect on timestamps <= the current bar, plus a 12h staleness guard) — no abs()-matching look-ahead. If the funding series is missing or stale the signal is 0.0 and the strategy stands flat: no price-only fallback that would silently change the edge mechanism. Firing rate was checked against the real AVAXUSDT funding history (6508 prints, 2168 days): the full compound gate fires on 312 prints, i.e. an entry-eligible print roughly weekly, clustered into episodes — far above the zero-trade risk that kills these runs, while still rare enough to be a genuine extreme. Per-bar work is O(window) numpy on a fixed 270-point slice with an incremental deque ATR, so there is no O(n^2) history rescan. One judgement note: holding the fade also collects the extreme funding (short when funding is high), so realised PnL benefits from carry accrual on top of the reversion — the reversion is still the tested mechanism.

Hypotheses

Negative expectancy on a decisive 309-trade / 2175-day (~6-year) sample: profit_factor 0.856 (<1, gross-NEGATIVE before costs — commission only 6.28% of gross, so this is a losing signal not fee-fragility), avg_trade_return_pct -0.123% (below ZERO, far under the 0.15% Binance USD-M floor), expectancy -$28/trade, total_return -10.31%, Sharpe -0.274 with CI [-1.156, 0.528] straddling zero. Optimization cannot lift an edge that is gross-negative before costs. The code faithfully implements the funding-extreme crowd-fade hypothesis (309 signaled = 309 submitted, point-in-time funding lookup, ATR stop + time exit) so this is a fair test, and QA's concern is borne out on full history: the fade's SHORT leg is the drag (short_win_rate 0.179 vs long_win_rate 0.58) because AVAX perp funding is predominantly positive and the top-tail extreme fires SHORT into a historically up-drifting asset — collecting the extreme funding does not rescue the reversion signal. The failure is regime- and year-wide: the book loses in the normal vol tercile (-15.0%, Sharpe -0.83) and in every calendar year 2020 through 2025, positive only in 2026. This is the single-perp funding/supplementary-gated directional class (L73); with PF 0.856 the base backtest is the ceiling and tuning 3 parameters cannot conjure an edge that is negative before costs. Not worth 2 hours of walk-forward. abandon_class=negative_expectancy (premise falsified on AVAX short leg).

Implementation

Long-short directional crowd-fade on AVAXUSDT.BINANCE USD-M perp, 4H bars. Every bar it ranks the latest Binance 8h funding print inside its own trailing 90-day distribution (270 prints) and returns a continuous score in [-1,+1]: -(2*percentile-1), so +1 = funding at its most negative (crowded shorts) and -1 = most positive (crowded longs). The 'sustained' requirement is expressed continuously by taking the smaller-magnitude score of the two most recent prints when they agree in sign, so one spiky print cannot trigger. Entry when |score| >= 1-2*tail_pct (0.90 at the 5th/95th percentile): fade SHORT when the crowd is long and paying, LONG when the crowd is short. Exits are an ATR(14) stop at entry_ATR * 2.5 (bar close), a calendar time stop at 30 4H bars (5 days) measured from position ts_opened, and a flip to the opposite funding extreme. Sizing is risk-based: equity * risk_pct / stop_distance, capped at 50% of equity notional (leverage 1.0, so no margin amplification and no compounding-blowup path).

Verification Results

Verify the base template calls min_bars_required(); if not, the funding-obs gate already provides adequate warm-up and this can be removed.

Verification Results

min_bars_required(self) overrides a framework method (static analysis base_shadow warning). If the base template does not actually consult this override for its warm-up gate, the 20-bar minimum is dead code. Entry is independently gated by min_funding_obs=60 funding prints, so this does not affect correctness, but confirm the override takes effect if warm-up behavior matters.

Verification Results

Optionally snapshot the ATR used for sizing at submission time and pass it through to the position for an exact entry-ATR stop; acceptable as-is.

Verification Results

The entry-ATR snapshot (_pos_atr) is captured on the FIRST should_exit call after a position opens, which is the bar AFTER entry (on the entry bar the position does not yet exist, so should_enter runs instead). The ATR stop distance therefore uses the ATR one bar past entry, not exactly the entry-bar ATR. This is a minor magnitude inaccuracy, not a mechanism error, and does not change which stops exist.

Verification Results

Sandbox smoke test is decisively negative (total_return -19.8%, Sharpe -0.62, PF 0.66 over 240 trades) with a sharply asymmetric leg profile: short_win_rate 0.164 (67 shorts) vs long_win_rate 0.520 (173 longs). The fade LOSES in all three vol terciles (calm/normal/stressed) — a bad sign for a mean-reversion premise. Because AVAX perp funding is predominantly positive (contango), the top-tail extreme fires SHORT into what has historically been an up-drifting asset, and those shorts are the drag. This is an unoptimized single param draw, so it is not disqualifying, but the analyst should check first whether the crowd-fade edge is real net of the persistent long-drift bias, or whether it only 'works' on the (rarer) low-funding LONG side. Note also that holding the fade collects the extreme funding (short when funding is high), which is a tailwind the developer flagged — but the sandbox already shows it does not rescue the reversion signal here.

Backtest Review

Mechanism faithfully implemented: 309 signaled = 309 submitted, no size/notional drops; point-in-time funding lookup; balanced long/short logic.

Backtest Review

Decisive sample: 309 trades over 2175 days (~6 years) of AVAX USD-M history with 961 funding events — statistically meaningful, not a data-wall.

Backtest Review

Negative expectancy: profit_factor 0.856 (<1, gross-negative before costs — commission only 6.28% of gross, so this is a losing signal, not fee-fragility), avg_trade_return_pct -0.123% (below ZERO, far under the 0.15% USD-M floor), expectancy -$28/trade, total_return -10.31%, Sharpe -0.274 with CI [-1.156, 0.528] straddling zero.

Backtest Review

Premise falsified on the short leg: short_win_rate 0.179 vs long_win_rate 0.58. Because AVAX perp funding is predominantly positive (contango), the top-tail extreme fires SHORT into a historically up-drifting asset — those fades are the drag, exactly as QA flagged, and the collected funding does not rescue them.

Backtest Review

Loses across regimes/years: normal vol tercile -15.0% (Sharpe -0.83), and negative in every calendar year 2020-2025 (only 2026 positive) — the opposite of a robust reversion edge.

Backtest Review

This is a single-perp funding/supplementary-gated directional trade (L73 class) with PF < 1 — the base backtest is the ceiling and optimization cannot lift a gross-negative edge above costs.

Outcome Summary

AvaxFundingExtremeCrowdFadeLS-a2ac674eb5

Outcome Summary

AvaxFundingExtremeCrowdFadeLS tried to fade the over-leveraged AVAX perp crowd, shorting when trailing-90d funding hit a sustained top-tail extreme and buying the bottom-tail, exiting via ATR stop or time stop. The code faithfully implemented the thesis (309 signaled = 309 submitted, point-in-time funding lookup) and got a decisive 309-trade, ~6-year test, but the result was a losing signal: total_return -10.31%, Sharpe -0.274, profit_factor 0.856, and negative per-trade return of -0.123%. The premise was falsified on the short leg — because AVAX funding is predominantly positive, the top-tail extreme repeatedly shorted a historically up-drifting asset (short_win_rate 0.179), and losses spanned the normal-vol regime and every year 2020–2025. The analyst abandoned it at backtest review as negative-expectancy, since optimization cannot lift an edge that is gross-negative before costs; later stages were not reached.

Outcome Summary

Fading a funding-percentile extreme fires SHORT into a perp whose funding is predominantly positive (contango) and whose spot is up-drifting, so the fade systematically shorts a rising asset — future funding-based fades should account for the asset's directional drift/funding sign bias.

Outcome Summary

The backtest-review analyst returned an 'abandon' verdict before optimization: the edge is gross-negative before costs (commission only 6.28% of gross), so the base backtest is the ceiling and tuning 3 parameters cannot rescue it.

Outcome Summary

A directional long-short crowd-fade on AVAXUSDT.BINANCE USD-M 4H bars that shorts when 8h funding hits a trailing-90d top-tail extreme (crowd over-long) and goes long at the bottom-tail extreme, with an ATR stop and time exit.

Outcome Summary

Over 309 trades across 2175 days (~6 years) it lost money: total_return -10.31%, Sharpe -0.274 (CI [-1.156, 0.528]), profit_factor 0.856, and avg_trade_return_pct -0.123% — below zero and far under the 0.15% USD-M floor. The short leg was the drag (short_win_rate 0.179 vs long_win_rate 0.58), and it lost in the normal-vol regime (-15.0%) and in every calendar year 2020–2025.
Strategy report

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