CrossSectionalFundingCarryNeutralBasket8H
Hypotheses
Cross-Sectional Funding-Rate Carry, Dollar-Neutral Market-Neutral Basket Across Liquid Binance USD-M Perps (Short High-Funding / Long Low-Funding, Hysteresis-Gated Rebalance, Funding-Cash-Flow Edge, Pure Funding-Rate Signal — NOT Price Momentum)
Hypotheses
A MARKET-NEUTRAL, DOLLAR-NEUTRAL, MULTI-INSTRUMENT CROSS-SECTIONAL CARRY strategy across ~10 confirmed-full-history Binance USD-M major perpetuals (BTC, ETH, SOL, BNB, XRP, ADA, DOGE, AVAX, LINK, LTC). Its DISTINCT MECHANISM is the perpetual FUNDING RATE itself as the sole ranking signal — NOT price/trend/breakout/momentum, and NOT a refinement of the promoted Absolute Momentum basket. Each rebalance it ranks the universe by smoothed recent funding rate, SHORTS the top-quantile (richest-funding) perps and goes LONG the bottom-quantile (cheapest / most-negative-funding) perps in EQUAL DOLLAR NOTIONAL so the book is delta-neutral and beta-stripped. The position earns the funding spread as a mechanical cash flow: shorts collect the high positive funding paid by crowded longs, longs pay little or receive negative funding. This is explicitly chosen to (a) fill the most over-concentrated portfolio axis — direction is 86.9% long-only vs a <=55% target, and this strategy is fully market-neutral; (b) deploy a GENUINELY DIFFERENT mechanism per the analyst's standing instruction to 'redirect novelty to genuinely different mechanisms, not variations on the momentum basket'; and (c) stay strictly inside the now-CREDITABLE funding-carry family (the engine credits perp funding P&L) while being distinct from the existing single-name spot-perp and inter-exchange-differential carries already in the pipeline (those are one-asset delta hedges; this is a many-asset relative-value cross-section). It deliberately avoids every recent failure cluster: it is not sub-1H (so not fee-dominated), not single-asset BTC trend (so not subject to 2024-2026 trend decay), not an options structure (so not blocked by the unwired-options wall), and not 2021-mania-concentrated (a dollar-neutral funding spread has no net long beta to amplify the 2021 pump).
Hypotheses
Iteration 6 fixes exactly the QA blocker — the dollar-neutral / gross-cap invariant was not enforced (1944% avg position, -980% end unrealized, book opened once and held). Four targeted changes, all in the sizing/netting path, with the funding ranking and hysteresis logic untouched: (1) sizing now uses equity_ref = min(current equity, initial equity), so mark-to-market gains can never bootstrap gross upward — the positive-feedback scale-up QA hypothesised is structurally impossible; (2) actual gross notional is measured each rebalance from live positions and, above 1.5x the equity*gross_exposure*leverage cap, the whole book is flattened and rebuilt — a hard backstop that bounds the metric QA flagged regardless of root cause; (3) _signed_qty now nets ALL open positions on a leg rather than positions_open()[0], removing the under-count path that would re-add a full-size leg every rebalance, and the same fix is applied to closes (_close_leg flattens every position); (4) the delta-skip band drops 0.25 to 0.10 and a 35% per-leg disaster stop with a 9-bar cooldown was added, so the book is genuinely re-neutralized each cycle and a leg that trends far against a short can no longer accumulate unbounded unrealized loss while held for 2129 days. The 6-name universe is retained (QA marked the trim non-blocking) because the Layer-3 wall-clock is driven by universe_size x history_bars. Leverage stays 1.0 and is referenced in the gross-cap computation.
Hypotheses
Measured-but-insignificant market-neutral cross-sectional funding-carry basket whose edge is a decayed 2021-2022 artifact — not worth 2 hours of optimization. Over 2000 trades: Sharpe 0.328 with bootstrap CI [-0.408, 1.078] straddling zero, PSR 0.786, profit_factor 1.16. The 77.8% return is entirely 2021 (+120.5%) and 2022 (+34.3%) — the era of extreme, dispersed perp funding — while 2023 (+10.8%), 2024 (+0.4%), 2025 (+2.4%) and 2026 (-1.5%) are flat-to-dead as funding normalized, which is exactly the funding-carry decay the hypothesis claimed to avoid; the last-20% holdout falls in that dead regime. The 'delta-neutral' book is not clean: end_unrealized_pct is -146.5 (open legs deeply underwater at backtest end) and single days of +41%/+24% at ~1x gross with kurtosis 13.2 show the legs diverge rather than staying neutral, and max_drawdown is 31.4% with CI to 88.7%. This is the L45/L52/L57 market-neutral cross-sectional funding-carry basket family (0/84 / near-zero survival); benchmark_meaningful is correctly false. No parameter tuning restores a funding-dispersion edge that has structurally decayed, and the deflated-Sharpe/holdout gates would predictably reject it. Failure pattern: no_edge/fee_edge market-neutral cross-sectional funding carry, edge decayed post-2022 (L45/L57).
Implementation
Dollar-neutral cross-sectional funding-rate carry across six liquid Binance USD-M majors (BTC/ETH/SOL/BNB/XRP/DOGE) on 8-HOUR bars aligned to the funding cycle. Every third bar the universe is ranked by smoothed recent funding (mean of the last 3 prints per leg, read from per-instrument funding series); the richest-funding legs are SHORTED and the cheapest/most-negative-funding legs are held LONG in equal dollar notional per side, so the book is delta-stripped and earns the funding spread as a mechanical cash flow rather than price direction. A narrow entry band (30% rank fraction) and wider exit band (45%) provide hysteresis so the book does not churn on minor funding reshuffles. Exposure is hard-bounded: sizing references min(current equity, initial equity), gross is capped at 1x that reference, measured gross above 1.5x the cap flattens the book, drift beyond 10% of target is trimmed every rebalance, and any leg down 35% is closed with a 9-bar cooldown.
Verification Results
Verification failed (Layer 4 — QA review) [class=code_defect]:
- [edge_concern] Once the exposure control is fixed, the analyst must still confirm the cross-sectional funding spread is net-positive after fees on this 6-name universe — the funding carry is currently swamped entirely by the leverage blow-up, so no edge signal is readable from this run.
- The dollar-neutral / gross-cap invariant does not hold. The book is sized to gross = equity * 1.0 * 1.0 = 1x equity, so avg_position_pct should be ~100% (SOL's 1.2x book reads 126% on this metric). Instead the sandbox shows avg_position_pct 1944% (~19x gross exposure) and end_unrealized_pct -980% (~9.8x equity unrealized loss), max_drawdown 94.3%, metrics_reliable=false. A gross-1x delta-neutral book cannot reach 19x exposure — the gross cap and market-neutrality (the whole hypothesis) are not enforced. total_trades 4 with avg_holding_period 2129 days shows the book is opened once and held for the full window rather than re-neutralized, so as legs diverge 10-100x the 'neutral' book becomes net-directional and leveraged. Likely cause: get_account_equity() includes unrealized MtM, feeding a positive-feedback scale-up, and/or netting never de-levers when equity falls. Same non-physical family as the BTC vol-target case (714% -> here 1944%).
- Hypothesis names ~10 majors; config trimmed to 6 for the Layer-3 timeout. Both sides still populate (2 long / 2 short) so the mechanism is preserved, but the cross-section is thinner than the concentration-diversification argument assumed. Non-blocking.
Backtest Review
Genuinely different mechanism (pure funding-rate cross-section, not price); funding IS credited by the engine so the carry is real
Backtest Review
Well-measured (2000 trades over 6.5 years); iteration-6 exposure caps stopped the prior 19x blowup
Backtest Review
avg_trade_return_pct 0.232% nominally clears fees (commission 3.9% of gross)
Backtest Review
Not significant: Sharpe 0.328 with CI [-0.408, 1.078] straddling zero, PSR 0.786, PF 1.16
Backtest Review
Edge is a 2021-2022 funding-dispersion artifact that decayed: 2024 +0.4%, 2025 +2.4%, 2026 -1.5% — the last-20% holdout is flat-to-negative (the very funding-carry decay the hypothesis claimed to avoid)
Backtest Review
'Delta-neutral' book carries end_unrealized_pct -146.5 (legs deeply underwater at end); +41%/+24% single days at ~1x gross and kurtosis 13.2 show leg divergence, not neutrality
Backtest Review
max_drawdown 31.4% with CI to 88.7%; L45/L52/L57 market-neutral cross-sectional funding-carry basket (0/84 / near-zero survival)
Iteration History
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['min_notional', 'min_universe', 'exit_quantile', 'entry_quantile', 'gross_exposure', 'rebalance_band', 'rebalance_bars', 'min_funding_spread', 'funding_lookback_events']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690140000)
- steady_downtrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690140000)
- flat_ranging: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690140000)
- volatility_spike: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690140000)
- zero_volume: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690140000)
- price_gap: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690140000)
Iteration History
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSDT.BINANCE-8-HOUR-LAST-EXTERNAL, Bars processed: 7107
Diagnostics: should_enter() returned a side 0 times over 6306 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Iteration History
Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit. This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Backtest and paper results are hypothetical. Trading involves risk of loss.