Skip to content

View original

BtcCmInverseFundingExtremeReversionLS

Hypotheses

BTC Coin-M Inverse Perp Extreme Funding Rate Mean-Reversion Long-Short (BINANCE_CM, 4H Bars)

Hypotheses

Directional mean-reversion strategy on BTCUSD_PERP.BINANCE_CM (BTC-margined inverse perpetual) triggered by EXTREME 8h funding rate readings. Core thesis: funding rates are a real-time gauge of leveraged positioning imbalance. When 8h funding rate spikes to a statistical extreme (>=+0.07% per 8h = ~77% APR, indicating euphoric over-leveraged longs), the market is structurally fragile — a small adverse price move triggers a long-liquidation cascade that reverses price down. Symmetrically, when funding goes to extreme negative (<=-0.05% per 8h, indicating capitulation short-positioning), the market is primed for a short-squeeze rally. Strategy enters the OPPOSITE direction of the funding extreme (short when funding extreme positive; long when funding extreme negative) and holds for a fixed 2-5 day mean-reversion window OR until funding normalizes back to neutral (+/-0.01%). This is fundamentally DIFFERENT from a funding carry trade — there is NO hedge leg, the strategy takes pure directional exposure and the funding rate is used as a SIGNAL, not as a cash flow source. The strategy uses 4-HOUR bars (NOT 8-hour, which has had data-availability issues in recent failures) on BINANCE_CM (coin-margined inverse perp, which has data and is dramatically under-represented in the portfolio at 0.2% vs 5% target). Coin-M is chosen over USD-M because (a) lowest fees in the factory (0.06% RT taker vs 0.10% on USD-M), (b) fills the most under-represented venue bucket, (c) BTC-margined PnL provides a natural BTC-denominated return profile that diversifies from USDT-margined strategies.

Hypotheses

Rather than accept or re-tune the null verdict, I measured the hypothesis's premise directly: 1,034 real COIN-M funding prints with a 90-print rolling z, against forward BTCUSD_PERP returns at 24/48/72/120/168h, signed to the side the strategy actually takes. The long leg — the better-populated one (n = 47–123) — is negative at every threshold and every horizon (−0.15% to −0.51%), so 'extreme negative funding primes a short squeeze' is not merely non-predictive but sign-inverted: price continues down. The short leg's sign flips with the threshold (negative at z ≥ 1.25 and 1.5, positive at 1.75 and 2.0) and every positive cell rests on n = 10–16, which is threshold-selection on noise of the same kind QA flagged. One inverted leg plus one noise leg is exactly how a 316-trade book produces profit_factor 0.993 at a 0.475 win rate. The code change made is entry_z 1.75 → 2.0 (the most selective end of the declared bounds) plus a risk-footprint cut — risk_pct 0.015 → 0.010, max_gross_frac 0.50 → 0.30, leverage 1.0 — which answers QA's second point that a 37% drawdown (CI to 59%) is pure risk on a no-edge book. I deliberately did NOT drop the long leg and keep only the short one, even though that is what the table superficially suggests: its profit lives entirely in an n=10 cell of the only window that exists, and selecting it would curve-fit the same sample. The implementation (rolling z, funding parsing, inverse-contract sizing, no-fallback discipline) is correct and unchanged; the mechanism is what fails.

Hypotheses

verifying_stuck_3_timeouts

Implementation

Long-short directional mean reversion on the BTC coin-margined inverse perpetual (BTCUSD_PERP.BINANCE_CM, 4H bars) triggered by extreme 8h funding readings used purely as a positioning signal — no hedge leg, no carry. The continuous signal is the rolling z-score of the latest funding print against the prior 90 prints (~30 days); rolling rather than absolute because COIN-M funding is exchange-capped near +0.01%/8h, so the hypothesis's fixed +0.07% trigger can never fire on this contract. The strategy shorts when z ≥ entry_z (crowded longs paying up) and goes long when z ≤ −entry_z (capitulation shorts paying up), exiting when funding normalises inside ±0.5σ, at a 30-bar (5-day) cap, or on a 5% protective stop. Sized to risk 1% of equity against the stop, capped at 30% gross, unlevered, floored to whole $100 inverse contracts. When no funding print covers a bar the signal is 0 and the strategy stands aside rather than falling back to a price proxy.

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.

Iteration History

Verification failed (Layer 4 — QA review) [class=no_edge]: - The funding-extreme positioning signal has NO predictive edge — a null result. Over 316 well-populated trades: profit_factor 0.993 (break-even gross), avg_trade_return_pct -0.0076% (~zero, slightly negative), win_rate 0.475 (coin-flip), total_return -9.46%, Sharpe -0.030, avg_win $722 ~= avg_loss $657. Fading extreme funding does not predict a subsequent reversal in either direction, so the book is break-even gross and a net loser after fees. The core thesis (extreme funding precedes reversal) is not supported; the rolling z-score is the correct scale-invariant form and the signal is effectively searched, so no parameter change manufactures predictive power. alpha +0.033 negligible, IR -0.63. - COIN-M funding history begins ~2025-05, so only ~1 year of the 5.8-year window generates signals (funding_events_available 1102). The ~1-year sample is itself well-populated (316 trades) and null, so not a trade-count death, but any re-test is confined to that recent regime. max_drawdown 37% (CI to 59%) on a no-edge book is pure risk.

Iteration History

Verification failed (Layer 4 — QA review) [class=premise_falsified]: - The core mechanism (extreme funding → mean-reversion in the opposite direction) is refuted on real data, and the refutation is in the leg with sample size. Conditioning the actual COIN-M funding series (1,034 prints, 90-print z) on forward BTCUSD_PERP 4H returns signed to the strategy's side: the LONG leg (z≤−t, n=47-123) is NEGATIVE at every threshold/horizon (−0.15% to −0.51%) — after extreme-negative funding BTC keeps falling, the wrong sign. The SHORT leg's sign flips with threshold and its only positive cells rest on n=10 (noise). Re-coding cannot restore an inverted effect. - Sandbox corroborates: total_return −12.95%, Sharpe −0.171 (CI [−0.85, 0.47]), PF 0.965 (<1), win_rate 0.472, avg_trade_return_pct −0.043% (negative), expectancy −$8.62/trade over 250 trades. COIN-M funding begins only 2025-05, so the ~1-year sample is all that exists and it is null-to-inverted.
Strategy report

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