Skip to content

View original

BtcDeltaNeutralFundingCarrySpotPerpBinance

Hypotheses

Cross-Venue BTC Funding Carry: Long Spot + Short Perp on Extreme Positive Funding

Hypotheses

Delta-neutral funding rate carry strategy. When Binance USD-M perpetual 8h funding rate on BTCUSDT exceeds +0.05% (annualized ~54.75%), enter long BTCUSDT spot on BINANCE_SPOT + equal-notional short BTCUSDT perpetual on BINANCE futures. Collect the mechanical funding payment from perp shorts every 8h while remaining delta-neutral to BTC price. Exit when funding normalizes or basis moves adversely. Funding is a structurally-paid cash flow (longs pay shorts when funding > 0), not a directional bet — this is one of the most robust crypto-native edges and is currently unrepresented in the portfolio.

Hypotheses

Iteration 3 fixed the exact Layer-3 failure ('should_enter() returned a side 0 times over 1052 bars') and changed nothing else. Root cause, verified against data/supplementary/fundingRate/BTCUSDT/all.parquet: over the 365-day sandbox window BTCUSDT 8h funding never exceeds the +0.01% Binance baseline (max = 0.0001, 75th pct = 0.000069), so the previous entry_funding = 0.00015 threshold was above the series maximum and was mathematically unreachable. The extra spot leg was fine -- should_enter was evaluated 1052 times, meaning bars aligned and _spot_price was populated -- so no plumbing was touched (imports, class structure, order routing, sizing all unchanged, keeping Layers 1-2 green). Two minimal edits: (1) entry_funding lowered to 0.00006 and exit_funding to 0.0; (2) calculate_signal now returns the mean of the last smooth_periods funding settlements instead of the raw print, appended once per new settlement timestamp so the window spans real 8h cycles. The smoothing is not cosmetic -- it is the fee-viability fix. Replaying the real funding series over the sandbox window: raw funding with a 0.00008/0.00002 band gives 10 trades at -0.126% avg per trade (fee churn, which the analyst would abandon), while the 6-period mean with the shipped 0.00006/0.0 band gives 4 trades with ~28-50 day holds and +0.349% avg per trade -- above the 0.15% futures floor -- because the position is held long enough for accrued funding to clear the ~0.30% round-trip cost (perp 0.05% x2 taker + spot 0.10% x2). The signal stays continuous and varying every bar (a rolling mean of a live series, not a gated constant), and missing/stale funding still returns 0.0, which trips the exit and flattens rather than silently substituting a price-only proxy edge. The full backtest spans 2020-2026, where funding regularly ran several multiples of the current baseline, so trade count and carry should both be materially higher than the recent-window figures above.

Implementation

Delta-neutral BTC funding carry. Shorts BTCUSDT USD-M perp on Binance while holding an equal-notional BTCUSDT spot long on BINANCE_SPOT, so BTC price exposure nets to ~zero and the P&L source is the 8h funding cash flow paid by longs to shorts. Entry when the 2-day (6 x 8h) mean funding rate is at or above +0.006% per 8h; exit (flatten both legs) when that mean decays to zero or funding data goes stale. Smoothing the funding signal keeps holds in the multi-week range, which is required for the accrued carry to outrun the ~0.30% round-trip fee on the two legs.

Verification Results

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSDT.BINANCE-8-HOUR-LAST-EXTERNAL, Bars processed: 1056 Diagnostics: should_enter() returned a side 0 times over 1052 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

Re-scope the hypothesis to 'baseline BTC funding carry', or route the extreme-funding variant to a perp whose funding actually reaches +0.05%. As-is the code is a correct baseline-carry implementation.

Verification Results

Hypothesis-premise mismatch. The hypothesis is built on EXTREME positive funding > +0.05%/8h (~54.75% annualized), but the config rationale itself documents that BTCUSDT 8h funding is capped near the +0.01% baseline over the window (max = 0.0001), so the hypothesis's stated +0.05% trigger is literally unreachable on this instrument. The shipped entry_funding=0.00006 (0.006%/8h) therefore harvests NEAR-BASELINE funding — a much thinner edge than the 'extreme funding' thesis. The delta-neutral funding-carry MECHANISM is faithfully implemented, so this is a threshold-magnitude/premise deviation, not a structural swap.

Verification Results

Analyst to evaluate across the full multi-regime history; if still break-even net of the 0.30% round-trip, abandon as fee_edge.

Verification Results

Fee-viability marginal at baseline funding. Round-trip ~0.30% (perp 0.05%x2 + spot 0.10%x2) vs ~0.006%/8h funding needs ~16+ days of sustained carry to break even. Sandbox realized avg_trade_return_pct -0.0009% and total_return -0.26% over a 352-day LOW-funding window (12 trades / 6 pairs) — break-even, NOT decisively negative, and NO L17 defect signature (win_rate 0.5, Sharpe -0.58 CI [-2.03, 1.19], PF 1.03). Edge/regime question for the analyst: the full 2020-2026 backtest includes 2021's high-funding regime where this carry historically paid, and PnL accrues from 803 continuous funding events rather than 12 discrete points.

Backtest Review

Sound, creditable mechanism: funding is credited (7,417 events) and the delta-neutral carry construction is correct in principle; capacity is large ($400M) and drawdown tiny (1.2%)

Backtest Review

Positive carry does show in high-funding years (2020 +4.9%, 2021 +5.2%), confirming the cash flow is captured when funding is actually elevated

Backtest Review

BTC funding is capped near the +0.01%/8h baseline and rarely exceeds the hypothesized +0.05% — only 41 entries in 6.5 years even after dropping the trigger to +0.006%

Backtest Review

avg_trade_return_pct 0.0142% is ~10x below the fee floor; credited carry is smaller than the ~0.30% round-trip cost, so net total_return is -1.16% with Sharpe -0.068

Backtest Review

The book is not cleanly delta-neutral: skew -27.6, kurtosis 992, +5.3%/+2.65% single days, and -13.66% open unrealized at end — leg drift/mismatch injects directional/basis risk

Analysis

Re-optimize toward DENSITY, not sparsity — the optimizer went the wrong way. ROOT CAUSE: it raised entry_funding 0.0005->0.000707, cutting trades from 34 to 7, which (a) made the trial-Sharpe distribution bimodal (catch-episode +13-17 / catch-nothing -9), inflating the expected-max luck bar to 20.07 so the selected ~12 Sharpe fails DSR (0.0), and (b) left the recent holdout window with ZERO trades (holdout_sharpe 0.0, a no-trade failure, not a loss). The walk-forward is NOT overfit (is_overfitted=FALSE, OOS 19.25/5.15 when episodes occur) and pbo is low (0.26) — the edge generalizes; it just can't be statistically validated on a handful of clustered episodes. SPECIFIC CHANGES: (1) Constrain the optimizer's entry_funding search to a LOWER range (~[0.00008, 0.0003]) instead of the extreme >=0.0005, with exit_funding below that, to generate MORE, smaller carry trades distributed across more regimes — this lowers the expected-max-Sharpe bar (raising DSR) and populates the holdout/zero-trade windows. The sweep never explored this lower region (it searched only [0.0004, 0.0006]). (2) FEE-VIABILITY GUARD: BTC funding at ~0.0001/8h is ~11% APR; over a ~5-day hold that is ~0.10-0.15% of notional against a ~0.20% two-leg round-trip fee, so report mean funding-per-trade vs fees-per-trade on the denser re-backtest — if the denser sample does NOT clear fees per trade, do not keep lowering, abandon instead. (3) Require trade coverage in 2022/2023/2025/2026; if recent BTC funding is structurally too low to trigger even at the lower threshold, the holdout fails again on sparsity and the BTC instance is dead (redirect the mechanism to a higher-funding instrument — the ETH spot-perp sibling already shows richer, more distributed funding). DECISION RULE for attempt 2: denser sample + DSR>=0.95 + positive holdout + per-trade carry clears fees -> promote; otherwise abandon. Full detail in workspace/discussions/13a0b247-6354-4325-97bb-31e11463b233/iteration_1_feedback.md.

Outcome Summary

BtcDeltaNeutralFundingCarrySpotPerpBinance implemented a textbook delta-neutral funding carry — short the Binance BTC perp to receive funding, long BTC spot to hedge price — and the mechanism worked in principle, crediting funding across 7,417 events with large capacity and tiny drawdown, and showing positive carry in high-funding years (2020 +4.9%, 2021 +5.2%). But BTCUSDT funding is capped near the +0.01%/8h baseline and rarely hit the hypothesized +0.05%, so even with the trigger lowered it fired only 41 times in 6.5 years, and at avg_trade_return_pct 0.0142% the carry was ~10x below the fee floor, leaving net total return -1.16% with Sharpe -0.068 and residual basis/directional risk from imperfect leg alignment. The analyst judged this a 'revise_hypothesis' case at the backtest-review gate, and although an optimization run followed, it failed the holdout and the strategy ended abandoned — never reaching risk review or paper trading.

Outcome Summary

A genuinely real edge can still be untradable at scale: BTC funding is capped so low that the accrued carry falls below round-trip fees, so a funding-carry design needs either much cheaper execution, a higher-funding instrument, or a venue/asset where funding actually reaches the assumed extremes.

Outcome Summary

At the backtest-review gate the analyst returned a 'revise_hypothesis' verdict — BTC funding is capped near the +0.01%/8h baseline and rarely reaches the hypothesized +0.05%, so the captured carry cannot clear trading costs — and the strategy ultimately ended in the abandoned stage with a below-floor per-trade return and negative net result.

Outcome Summary

A delta-neutral funding-carry strategy that, when the Binance BTCUSDT 8h perpetual funding rate was materially positive, went short the perp (to receive funding) while holding an equal-notional long in BTCUSDT spot as a price hedge, harvesting the mechanical funding cash flow over multi-week holds using a smoothed funding trigger.

Outcome Summary

Over ~6.5 years the initial backtest fired only 41 entries (82 legs) and netted -1.16% total return with Sharpe -0.068, profit factor 1.25, 51.2% win rate, and a tiny 1.16% max drawdown; avg_trade_return_pct was just 0.0142% — roughly 10x below the fee floor — as the credited carry was smaller than the ~0.30% round-trip cost. The book was not cleanly neutral (skew -27.6, kurtosis 992, -13.66% open unrealized at end), and a subsequent optimization run failed its holdout (ratio 0.0, holdout Sharpe 0.0) despite high walk-forward OOS Sharpe.
Strategy report

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