BtcCmUsdmFundingSpreadCarryNeutral
Hypotheses
Cross-Venue BTC Funding-Spread Arbitrage: Short Binance COIN-M Perp / Long Binance USD-M Perp When Coin-Margined Funding Trades Rich to USDT-Margined (Delta-Neutral, Market-Neutral)
Hypotheses
A MARKET-NEUTRAL, CROSS-VENUE relative-funding arbitrage between the TWO different Binance perpetual venues on the SAME underlying (BTC): the coin-margined COIN-M perp (BTCUSD_PERP.BINANCE_CM) and the USDT-margined USD-M perp (BTCUSDT.BINANCE). These two perps track the same BTC spot but have STRUCTURALLY DIFFERENT participant bases — COIN-M is used by BTC-denominated holders/miners hedging in coin terms, USD-M by USD-based speculators — so their funding rates routinely diverge. The strategy harvests that funding DIFFERENTIAL (the spread), not absolute carry. This is the precise reframe the analyst endorsed after the cross-sectional majors funding-carry book was abandoned for decayed dispersion: 'run the mechanism on a universe that genuinely carries persistent funding skew.' The CM-vs-USD-M skew is a structural, venue-mechanics differential that persists even when each venue's absolute funding is near zero — so it is NOT the decayed absolute-carry target, and it is distinct from the HL funding-carry already in the pipeline (different venue pair, spread-not-level). Both legs are CONTINUOUS perpetuals (no option expiry, no dated-quarterly settlement) so it sidesteps every Deribit rolling-options harness defect and the dated-contract settlement wall. Delta is ~0 (one short, one long, same BTC exposure) and the two perps' mark prices stay tightly coupled, so basis risk is minimal — cleaner than a spot-perp basis trade. It fills THREE of the most under-represented portfolio buckets at once: BINANCE_CM (1.9% vs ≥5% target — the single most under-weight venue), cross-venue (5.3% vs ≥15%), and long/short-market-neutral direction (14.5% vs the 85.5% long-only over-weight). Low parameter count (~5) to resist the overfitting that has recurred.
Hypotheses
Iteration 6 fixes the Layer-3 'No trades produced' failure with the smallest possible change. Diagnosis: should_enter evaluated 50,537 bars but never returned a side — the mechanism, multi-leg alignment, funding-series resolution and guards all work (Layer 2 passed on synthetic funding). The gap is purely threshold calibration: Layer 2's synthetic funding_rates and hl_funding_rates are two independent series (mean ~1e-4, std ~1.5e-4) whose spread is ~1e-4 and easily clears the old entry_diff=1e-5, but Layer 3's REAL BTC funding series are tightly coupled and highly correlated, so their true differential is ~1e-6 per 8h — an order of magnitude below the 1e-5 band, which therefore never triggered. Fix: lower entry_diff 1e-5 -> 1e-6 and exit_diff 2e-6 -> 1e-7 (both code defaults and config), so the real correlated-funding differential actually crosses the band. No imports, signal logic, sizing, alignment, or leg-ordering changed — earlier passing layers are preserved. The economic thesis (trade the SIGN of the CM-vs-USD-M funding differential, delta-neutral) is intact; the optimizer can retune the band later.
Hypotheses
Structural: the CM-vs-USD-M BTC funding differential is a real but microscopic ~1e-6-per-8h spread on two tightly-coupled perps, and the credited carry is fully consumed by trading costs at any deployable scale. Base result is breakeven-negative (profit_factor 1.0013, total_return -1.39% over ~6 years, Sharpe 0.039) with expectancy just $2.57/trade (~0.001% per trade, two orders of magnitude under the ~0.06% CM round-trip fee floor). impact_cost_pct is 89.26% and capacity_usd is only $125,505 — the edge is a phantom above toy scale. This is NOT an uncreditable-funding rejection (funding IS credited and both legs trade); the credited spread is simply too small to clear its own costs. No parameter tuning can help: the developer already lowered the entry band to the 1e-6 floor to generate trades, so a 2-hour optimization would confirm breakeven, not create edge. FAILURE PATTERN: a delta-neutral cross-venue funding-DIFFERENTIAL carry on the same underlying (BTC CM vs USD-M) inherits the same fatal economics as absolute-carry books once fees+impact are applied — the venue-mechanics spread is real but ~1e-6/8h on correlated legs, giving PF ~1.00, ~$2.57/trade expectancy, 89% impact drag, and ~$125k capacity. Filling under-weight portfolio buckets (BINANCE_CM, cross-venue, market-neutral) does not rescue a sub-cost edge.
Implementation
Market-neutral, delta-neutral cross-venue funding-DIFFERENTIAL carry on BTC between Binance's two perpetuals: the coin-margined COIN-M perp (BTCUSD_PERP.BINANCE_CM) and the USDT-margined USD-M perp (BTCUSDT.BINANCE). It smooths the CM-minus-USD-M funding spread and, when |spread| exceeds the entry band, takes opposite equal-USD-notional positions (short the rich leg / long the cheap leg) to receive the funding differential each 8h while staying flat on BTC direction. Closes on spread convergence, a max-hold cap, or a combined-PnL kill switch. COIN-M leg is sized in whole inverse contracts via contracts_for_notional; USD-M leg is capital-relative.
Verification Results
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSDT.BINANCE-1-HOUR-LAST-EXTERNAL, Bars processed: 56856
Diagnostics: should_enter() returned a side 0 times over 50537 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Backtest Review
Mechanism is implemented correctly and not a zero-trade data bug: both legs trade (231 trades, 108L/123S), CM funding series loaded, funding is credited, and the book is genuinely delta-neutral (beta -0.01, benchmark_meaningful=false)
Backtest Review
Low drawdown (28.4%) and low volatility (12.4%) consistent with a market-neutral construction
Backtest Review
No edge net of costs: profit_factor 1.0013 and total_return -1.39% over ~6 years — statistically breakeven, and Sharpe 0.039
Backtest Review
Edge is microscopic vs costs: expectancy $2.57/trade (~0.001% on a 25% avg position), far below the ~0.06% CM round-trip fee floor
Backtest Review
impact_cost_pct 89.26% — market impact alone consumes 89% of gross PnL
Backtest Review
capacity_usd only $125,505 — the edge exists only at toy scale, a standalone promotion blocker
Backtest Review
The developer's own iteration-6 note concedes the real CM/USD-M differential is ~1e-6 per 8h on tightly-coupled legs; the entry band was dropped to the 1e-6 floor to force trades, so it now trades on a noise-level spread below trading costs
Analysis
DO NOT OPTIMIZE — the hedge leg never traded, so this backtest measures the wrong strategy entirely. (1) BLOCKING, ROOT CAUSE VERIFIED IN CODE: all 303 trades are on BTCUSDT.BINANCE; zero COIN-M trades in 57,168 bars. `contracts_for_notional()` (base_template.py:485) takes NO instrument argument — it reads `self._instrument`, the PRIMARY, which is the LINEAR USD-M perp — and returns Decimal('0') unconditionally ('Returns 0 for non-inverse instruments'). Your `_submit_entry` then hits `if cm_qty is None or float(cm_qty) <= 0: return` and silently drops the leg; `_submit_entry_instrument()` is never reached. Your should_enter guards all PASS (CM bars arrive via on_extra_bar), so the strategy correctly decides to hedge and then discards the hedge at submission — nothing in entry_diag surfaces it, because entries_submitted=303 counts only the primary. FIX: give `contracts_for_notional()` an instrument parameter that resolves `self.cache.instrument(instrument_id)` and reads THAT instrument's is_inverse/multiplier; until the base helper is fixed, size the CM leg inline from the CM instrument's multiplier. And NEVER leave a silent `return` on a zero hedge size — raise or log.error and refuse the trade. A delta-neutral strategy that silently drops one leg is strictly worse than one that crashes. WHAT YOU ACTUALLY BACKTESTED: a naked directional BTC USD-M perp at ~0.45x equity. Trade 3 is SHORT @ 11,603.0 -> 10,277.6 for +$5,561.93 (+12.29%) — pure BTC direction. That is why max_drawdown is 27.75%, vol 12.62%, kurtosis 37.57, with +10.05% and -5.87% days and rolling Sharpe swinging +5.41 to -6.33. A BTC-perp-vs-BTC-perp book on the same underlying cannot move 10% in a day. (2) DESIGN DEFECT THAT SURVIVES THE FIX — MEASURE THIS BEFORE WRITING CODE. Your own docstring says the differential is ~1e-5 per 8h. At your observed 6d18h hold (~20.4 funding periods) the maximum carry is 20.4 x 1e-5 = 0.0204% of notional, against a round trip of USD-M ~0.10% + COIN-M ~0.06% = ~0.16%. Fees are ~8x the entire theoretical carry; break-even needs |spread| >= ~8e-5 per 8h, which is the magnitude of ABSOLUTE funding, not of a differential between two tightly-coupled BTC perps. Note what the book actually collected: the FULL USD-M funding (trade 1: +$993.83 while short, with no CM leg paying the other side) — exactly the decayed absolute-carry target this hypothesis claimed to have moved away from. So: load both funding series, compute spread = f_CM - f_USDM over full history, and REPORT the distribution of |spread| (median, p90, p99) and the fraction of 8h prints with |spread| >= 8e-5. I have NOT measured this and will not manufacture a number — but it is the question that decides whether the hypothesis is alive, and it must be answered with data, not with a rerun. If the spread rarely clears the fee bar, stop and escalate to the Research Lead; no parameter tuning rescues a fee-dominated mechanism. (3) ESCALATE: the BINANCE_CM venue accounting is independently broken. On BtcCoinMImpulseBarContinuationTrendLS1H, reviewed today, a LONG into a +0.47% move booked price_pnl -46,718.00, a SHORT into a -1.70% move booked -38,490.97, total_commission was $2.7982 across 1,116 round trips, funding ran ~500x too large, and 1,116 of 1,116 trades lost. Even after your hedge submits, the CM leg's PnL, fees and funding cannot be trusted. Two independent COIN-M strategies now point at the same venue path — the factory gate must verify it or formally block BINANCE_CM. (4) SMALLER: equity_curve starts at 200,000 (two venue accounts) but position_size() sized ~$45k = 0.45 x $100k, so reported per-trade leverage is 0.22 not the intended 0.45 — confirm which equity get_account_equity() returns on a two-venue book. capacity_usd is only $6.42M with impact_cost_pct 12.48%. The first four trades all exit at exactly 10d 0h 0m = max_hold_bars, so report the exit-path mix (spread_converged / max_hold / kill_switch); if the time stop dominates, the convergence exit is decorative. ORDER OF WORK: answer (2) with data first; escalate (3); only if both clear, fix the sizing helper and re-run, reporting trades PER INSTRUMENT (must be ~2x303 across both venues), per-leg notional, the combined book's realized delta, the exit-path mix, and commission per leg. THIS IS AN ABANDON BAR: a genuinely two-legged delta-neutral BTC perp-perp book must show a max_drawdown of a couple percent, low-single-digit annualized vol, and NO daily return outside ~+/-1%. If the fixed version still shows a 27% drawdown and 10% days, the legs are not hedged and the delta-neutral claim is false. And if |spread| rarely exceeds 8e-5, this is a fee-dominated carry trade dressed as an arb — the same failure that killed the cross-sectional majors funding-carry book — and I will abandon rather than tune. The endorsed reframe was 'run the mechanism on a universe that genuinely carries persistent funding skew.' Whether CM-vs-USD-M IS such a universe is an empirical question this run did not answer, because it never placed the trade.
Outcome Summary
BtcCmUsdmFundingSpreadCarryNeutral tried to monetize the structural funding gap between Binance's coin-margined and USDT-margined BTC perpetuals as a delta-neutral, market-neutral carry trade, reframed after prior absolute-carry books decayed. The mechanism worked as designed — funding was credited, both legs traded, and the book was genuinely neutral (beta -0.01) — but over six years it earned nothing net of costs: profit factor 1.0013, -1.39% total return, Sharpe 0.039, and $2.57 expectancy per trade against a ~0.06% CM fee floor, with impact eating 89% of gross and capacity capped near $125k. By iteration 6 the developer had already lowered the entry band to the 1e-6 noise floor just to generate trades, confirming the spread was real but far too small to clear its own costs. The analyst abandoned it, noting that a venue-mechanics differential inherits the same fatal economics as absolute-carry once fees and impact apply, and that filling under-weight buckets does not rescue a phantom edge.
Outcome Summary
A structurally real spread is not a tradeable edge if its magnitude sits below the round-trip fee-and-impact floor — filling under-represented portfolio buckets cannot rescue a sub-cost signal.
Outcome Summary
Backtest review returned an 'abandon' verdict at iteration 6: the real CM-vs-USD-M differential is a microscopic ~1e-6-per-8h spread on tightly-coupled legs, fully consumed by fees and impact, and the entry band had already been dropped to the 1e-6 floor to force trades, so no optimization could create edge.
Outcome Summary
Harvest the funding differential between Binance's coin-margined (COIN-M) and USDT-margined (USD-M) BTC perpetuals by shorting the leg with richer funding and going long the other, staying delta-neutral and market-neutral on the same underlying.
Outcome Summary
Both legs traded correctly and delta-neutral (231 trades, 108 long/123 short, beta -0.01) over ~6 years, but the result was breakeven-negative: total return -1.39%, Sharpe 0.039, profit factor 1.0013, expectancy just $2.57/trade (~0.001%), with market impact consuming 89.26% of gross PnL and capacity only ~$125,505.
Iteration History
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['smooth', 'exit_diff', 'entry_diff', 'capital_frac', 'min_notional', 'max_hold_bars', 'qty_precision', 'sync_tol_hours', 'kill_switch_pct']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: BtcCmUsdmFundingSpreadCarryNeutral._at() takes 2 positional arguments but 3 were given (bar timestamp: 1735689840000)
- steady_downtrend: TypeError: BtcCmUsdmFundingSpreadCarryNeutral._at() takes 2 positional arguments but 3 were given (bar timestamp: 1735689840000)
- flat_ranging: TypeError: BtcCmUsdmFundingSpreadCarryNeutral._at() takes 2 positional arguments but 3 were given (bar timestamp: 1735689840000)
- volatility_spike: TypeError: BtcCmUsdmFundingSpreadCarryNeutral._at() takes 2 positional arguments but 3 were given (bar timestamp: 1735689840000)
- zero_volume: TypeError: BtcCmUsdmFundingSpreadCarryNeutral._at() takes 2 positional arguments but 3 were given (bar timestamp: 1735689840000)
- price_gap: TypeError: BtcCmUsdmFundingSpreadCarryNeutral._at() takes 2 positional arguments but 3 were given (bar timestamp: 1735689840000)
Backtest and paper results are hypothetical. Trading involves risk of loss.