Strategies
Funding-Gated Delta-Neutral Cash-and-Carry: Long BINANCE_SPOT / Short BINANCE USD-M Perp on 7 Point-in-Time 2020 Majors, Enter When 24h Funding > 3bp/8h, Exit on Funding Flip or 21-Day Clock (4H decision bars)
Outcome: Abandoned
FundingGatedSpotPerpCarry7Majors8H
Outcome Summary
The strategy tried to collect Binance perp funding with a spot-long, perp-short hedge on 7 point-in-time 2020 majors, trading only when funding was above 3bp/8h. It went through 3 coding iterations, and each one failed the Layer 3 sandbox backtest by going over the 300s time limit. The last iteration already used bisect lookups on precomputed arrays and made fewer cache queries, and its notes blame catalog loading overhead that strategy edits cannot shorten. The run was abandoned in the verification loop, so there are no backtest, optimization, analyst or risk-officer results.
Hypothesis
Implements the FMZ funding-hedge mechanism on Binance spot/USD-M with a fixed 2020 universe, as the hypothesis specifies. Iteration 3 fixes nothing in the trading rules because the timeout does not come from the strategy: per-bar work was already O(log n) and independent of span, and same-day profiles of sibling timeouts show the 300 s going to the ParquetDataCatalog fsspec glob before any bar reaches the strategy. Changes are hygiene only: skip all cache queries on flat bars with no funding state, and exclude the funding lookup tables from persistable_state. If this times out again, the cause is catalog-scan infrastructure or host load (L155 b/c), not the code.
verification_loop: sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of BTCUSDT.BINANCE-8-HOUR-LAST-EXTERNAL). 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).
Implementation
Delta-neutral cash-and-carry on 7 point-in-time 2020 majors (BTC, ETH, XRP, BCH, LTC, BNB, XLM): long BINANCE_SPOT + short equal-quantity BINANCE USD-M perp per name when the 24h trailing funding mean >= 3bp/8h; exit on funding flip (<0) or a 21-calendar-day clock. Each leg is its own order/position; 8H decision bars aligned to funding settlements; per-name notional = binding venue equity x 0.7 / 7.
Verification Results
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of BTCUSDT.BINANCE-8-HOUR-LAST-EXTERNAL). 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).
Iteration History
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of BTCUSDT.BINANCE-4-HOUR-LAST-EXTERNAL). 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).
Outcome Summary
With 14 instruments across two venues, the sandbox smoke test can time out even when per-bar strategy work is already O(log n). The developer's notes point to catalog query and data-loading overhead as the cause, and code changes alone did not fix it, so this should be diagnosed at the infrastructure level (or with a smaller universe) before more code iterations.
It was abandoned in a verification loop after 3 iterations. Each time the Layer 3 sandbox backtest went over the 300s wall-clock limit on a ~20,000-bar window (2400 days of BTCUSDT 8-hour bars), so the backtest-review, analyst and risk stages never ran.
A delta-neutral cash-and-carry across 7 majors fixed from a 2020 snapshot (BTC, ETH, XRP, BCH, LTC, BNB, XLM): long Binance spot and short an equal quantity of the Binance USD-M perp to collect funding, entering when 24h funding is above 3bp/8h and exiting when funding flips negative or after 21 days.
No backtest or optimization metrics exist because the strategy never got past verification. The only evidence is the hypothesis's own funding-only pre-study (189 episodes from 2020-2026, mean net +1.99% per episode after 0.30% round-trip cost, win rate ~0.9), and the pipeline never tested it.
Analysis
OKX资金费率套利策略|OKXFunding Fee Hedge strategy
Backtest and paper results are hypothetical. Trading involves risk of loss.