Skip to content

View original

CrossSectionalCashAndCarryFundingHarvestNeutral

Hypotheses

Cross-Sectional Cash-and-Carry Funding Harvest — Delta-Neutral Long-Spot / Short-Perp on the Highest-Funding Binance Alts, Weekly Selected (3-Name Basket from an 8-Alt Universe, Market-Neutral, 3-Parameter)

Hypotheses

A DELTA-NEUTRAL funding-harvest whose PnL source is the mechanical, regime-INDEPENDENT funding cash flow of perpetuals — deliberately chosen because the latest evidence shows the momentum/trend family (including the well-built ETH/BTC ratio confluence) has DECAYED HARD in the current recent regime (-33% trailing 11 months, rolling Sharpe +4.9→-7). When price-direction edges are being punished by a choppy/anti-trend regime, a cash flow that accrues regardless of price direction is the right structural bet. Perpetual funding on crowded-long alts is structurally POSITIVE, so holding LONG SPOT + SHORT PERP (equal notional, net delta ≈ 0) collects that funding while hedging price. This is a CROSS-SECTIONAL, DYNAMIC-SELECTION version: each week it holds the k=3 Binance alts with the highest current positive funding out of an 8-name liquid universe, so capital is always allocated to wherever the structural carry is actually being paid, and diversified across 3 names to defuse the single-name short-squeeze risk. It is explicitly DIFFERENT from the recently-abandoned AVAX cross-venue funding-DIFFERENTIAL carry (that traded the tiny, non-persistent HL-vs-Binance funding GAP, which the data falsified) — this harvests the much larger ABSOLUTE funding via a spot hedge on ONE venue-family, which is persistently positive on crowded alts. It generalizes the in-pipeline single-name DOGE cash-and-carry to a diversified, dynamically-selected basket (the diversification is the key risk improvement over the single-name version). NOT momentum (L52/decay), NOT mean-reversion (L53), NOT a non-price gate on a price bet (L46 — funding IS the return, book is delta-neutral). Fills the under-weight BINANCE_SPOT (11.9%), cross-venue (spot+perp suffixes, 7.2%), and market-neutral direction (13.6%) buckets. Three parameters: number of names k, funding lookback, min-funding entry threshold.

Hypotheses

Iteration 2. I re-derived the root cause of the five-year dormancy and it is NOT the funding-data resolution bug the feedback hypothesized — the fix therefore targets something different, and I want that on the record before the next review. Evidence: (a) the six pairs opened Nov-2020 to Mar-2021 and the run then went quiet, which coincides exactly with the alt mania — measured on the catalog data, Nov-2020 to the Apr-2021 peak was LINK 3.9x, XRP 7.7x, ADA 15.6x, BNB 21.7x, DOGE 161x; (b) the book was short 0.8 x 100k = 80k of perp notional against a 100k MARGIN account, and even the mildest of those moves (LINK, +290%) loses roughly 77k on a single 26.7k leg, so the perp account was drained to ~zero in Q1-2021; (c) `get_account_equity()` reads that margin account, and the existing `if not equity or equity <= 0: return` guard then silently blocks every future open — permanent dormancy with no error; (d) funding_events_available=1985 is fully explained by six perp positions held a few months each (6 x ~90 days x 3/day ≈ 1,600), not by missing series — a data gap would have produced zero trades in 2020-21 as well, not six. The account-split failure is the same one the log records for the DOGE cash-and-carry and the SOL beta-hedged pair going to -100%. Smallest change that fixes it: a new `_check_margin_stops` evaluated on EVERY bar that closes any pair whose short perp leg is down more than `pair_stop_frac` (8%) of the margin account, plus gross exposure cut 0.8 -> 0.5. Closing the pair realizes the perp loss AND the offsetting spot gain, so total equity across the two accounts is preserved and only the per-account split resets; because sizing is already equity-relative to the margin account, the book self-limits as that account shrinks instead of hitting zero and going dormant. I also addressed the two diagnostics the feedback asked for without changing behaviour where it was already correct: `max_funding_lag_hours` is relaxed 12 -> 26 (an 8h cadence plus a missed print can never trip it now), and `_build_funding` now logs per-name point count, first/last stamp and derived periods_per_year so leg-key coverage and annualization stability are verifiable from the run log rather than inferred. Signal computation, ranking, hysteresis, pair construction, the calendar schedule and the inert single-leg hooks are byte-identical to the version that passed Layers 1-3, and no import changed. Honest expectation for the re-backtest: the strategy will now hold positions across 2022-2026, but the 2021 leg of the sample will book a series of stop-outs (each costing the 0.30% round trip while total equity is preserved), so the full-sample result will be dominated by whether the ~13%/yr-on-notional carry I measured on the raw funding series survives that churn — which is exactly the check the feedback asked for and the right thing to judge before spending optimization budget.

Hypotheses

Iteration-1 fixes succeeded — funding now resolves for the whole basket (23,667 events vs 1,985), the per-bar pair_stop_frac bounds the cross-account margin drain, and the strategy trades across the full sample (262 trades). That makes it evaluable, and the now-evaluable credited result (funding IS credited) confirms the second half of the prior warning: there is no edge net of the two-leg cost. Over 6.6 years it is net-negative (total_return -1.60%, Sharpe -0.16 with CI [-0.76, 0.51], profit_factor 1.11, IR -0.74), and avg_trade_return_pct 0.197% is BELOW the ~0.30% spot(0.20%)+perp(0.10%) round trip this two-leg structure pays (the nominal clearance of the 0.15% single-leg floor is misleading here). The carry only paid in the 2021 crowded-long bull (+6.5%); every year since is ~flat (0.16-0.80%) and total is negative, with avg_position_pct just 2.5% and a fat left tail (kurtosis 66.7, skew -4.24) that erases the thin carry on squeeze events. This is a premise/edge failure, not a fixable bug: the mechanism is now correctly implemented and Binance-alt perpetual funding simply does not clear the two-leg round trip outside the 2021 regime, and loosening the funding floor only adds thinner, more cost-fragile pairs. Third cash-and-carry funding-harvest in this batch (DOGE, AVAX, now this basket) to die on the same cost wall. Abandon rather than iterate a third time or spend the optimization budget.

Implementation

Delta-neutral cross-sectional cash-and-carry over an 8-name alt universe (ETH, SOL, BNB, XRP, ADA, DOGE, AVAX, LINK), each present as both a BINANCE_SPOT leg and a BINANCE USD-M perp leg, on 8-HOUR bars aligned to Binance's funding epochs. Each bar every name's trailing mean ANNUALIZED funding is computed over the last 63 epochs (~21 days) with the annualization factor derived from that series' own median stamp spacing; the mean carry of the current top-3 is the continuous signal. Weekly (calendar-anchored on the bar timestamp) it holds the k=3 names with the highest trailing carry above a 2%/yr floor, each as LONG SPOT + SHORT PERP in equal coin quantity, only trading the delta at each rebalance and keeping an incumbent while it stays inside the top k+2. NEW IN THIS ITERATION: a per-bar per-pair margin stop. The two legs sit on different accounts that the engine does not cross-margin, so a large alt rally charges the whole loss to the perp (MARGIN) account while the offsetting gain sits on the spot (CASH) account; when a pair's short perp leg is down more than 8% of the margin account the pair is closed on BOTH legs (total equity preserved) and the name is re-established at the next rebalance with a fresh stop distance. Gross exposure is also cut from 0.8x to 0.5x of margin equity for the same reason.

Verification Results

Sandbox still ETH-only (Layer 3 loads only primary funding) — the multi-name basket AND the new 2021-targeted margin stop are NOT exercised. Full backtest is the real test.

Verification Results

Two-account capital-stranding persists (now capacity-limiting, not dormancy-inducing): margin-stopped spot gains strand on the CASH account with no modeled transfer, so equity self-limits. Backtest understates live capacity.

Verification Results

Same-bar re-establish on rebal days + 2021 stop-out round-trip churn; residual funding compression (~+3.2% trailing year). Analyst to quantify fee drag.

Backtest Review

Iteration-1 fixes worked: funding data now resolves for the whole basket (23,667 events vs 1,985), and the per-bar pair_stop_frac bounds the cross-account margin drain — the strategy is now evaluable and trades across the full sample (262 trades)

Backtest Review

Genuinely market-neutral (beta -0.0003); sound diversified, hysteresis/partial-rebalance construction

Backtest Review

Now-evaluable result is net-losing: total_return -1.60% over 6.6 years, Sharpe -0.16 (CI [-0.76, 0.51]), information_ratio -0.74

Backtest Review

Per-trade carry below the two-leg cost: avg_trade_return_pct 0.197% vs a ~0.30% spot+perp round trip; profit_factor 1.11 (edge sits inside commissions)

Backtest Review

Carry only paid in the 2021 crowded-long bull (+6.5%); every year since is ~flat (0.16-0.80%) and the total is negative — the established dead-carry regime; avg_position_pct just 2.5%

Backtest Review

return_kurtosis 66.7, skew -4.24 — the small carry is exposed to fat left-tail squeeze events that erase it

Analysis

The strategy is non-evaluable, not tested-and-failed: it opened 6 carry pairs between Nov 2020 and Mar 2021 and then selected ZERO names for the next 5 years, even though the backtest ran to mid-2026. Root-cause that dormancy before any optimization — it is almost certainly a funding-data resolution bug, because min_funding_annual is only 0.02 (2% annualized), a bar normal alt funding (~10-15% ann.) clears trivially, so selecting nothing for 5 years means _carry_of() is returning None (stale/absent) for the basket names post-2021. Check: (1) that funding_rates_by_instrument keys resolve for ALL 8 perp legs across the full sample (funding_events_available is only 1985 — suspiciously low for 8 names over 6 years); the per-leg-key lookup with the funding_rates fallback only for the primary instrument may leave the other 7 names unkeyed; (2) that the max_funding_lag_hours=12 staleness gate isn't discarding valid 8h funding prints; (3) that the annualization factor is stable across the period. Separately, the 6 trades it did execute in the peak-2021 funding regime were net-negative per-trade (-0.116%), so once selection is fixed, VERIFY on the full run that the credited funding actually clears the ~0.30% spot+perp round trip (this family — DOGE, AVAX — has repeatedly failed exactly there) before requesting optimization. Re-backtest and confirm the basket holds positions and collects carry across 2022-2026 with a positive avg_trade_return_pct.

Outcome Summary

CrossSectionalCashAndCarryFundingHarvestNeutral generalized the single-name DOGE cash-and-carry into a diversified, weekly-reselected basket of the three highest-funding Binance alts, betting that regime-independent funding income would pay while momentum edges were being punished. Iteration 2 succeeded on the mechanics that had sunk its predecessors — funding resolved for all 8 names (23,667 events), a per-bar pair stop bounded the cross-account margin drain, and it stayed genuinely market-neutral without liquidating. But the now-evaluable result confirmed the edge simply is not there: -1.60% over 6.6 years, Sharpe -0.16, with per-trade carry of 0.197% below the ~0.30% two-leg cost and profit paid only in the 2021 bull. The analyst abandoned it at backtest review as the third cash-and-carry to die on the same cost wall — a premise failure, not a bug; it never reached optimization, analysis, or risk review.

Outcome Summary

Diversifying a cash-and-carry across a dynamically selected basket successfully bounds the single-name squeeze/liquidation risk, but it cannot manufacture an edge — if per-trade funding (~0.20%) sits below the two-leg round trip (~0.30%) outside one historical bull regime, the carry is structurally consumed by costs regardless of name selection.

Outcome Summary

The analyst abandoned it at backtest review: iteration-1 fixes made it evaluable (funding resolved for the full basket, the per-bar pair stop bounded the cross-account margin drain), and the now-credited result confirmed a premise/edge failure — Binance-alt perpetual funding does not clear the two-leg round trip outside the 2021 crowded-long regime, so the strategy is net-negative with a fat left tail that erases the thin carry, and loosening the funding floor only adds costlier pairs. It was the third cash-and-carry harvest in the batch to die on the same cost wall.

Outcome Summary

A delta-neutral, cross-sectional cash-and-carry funding harvest (3 parameters) that each week held the k=3 highest-funding Binance alts out of an 8-name universe as long-spot/short-perp pairs, collecting the perpetual funding while hedging price — diversifying the single-name DOGE carry across a dynamically selected basket with a per-pair margin stop for the cross-account drain risk.

Outcome Summary

The credited-funding backtest (8-alt spot+perp basket, 8H, 2369 data days, 2019-12 to 2026-06) was net-losing over 6.6 years: total return -1.60%, Sharpe -0.16 (CI [-0.76, 0.51]), profit factor 1.11, information ratio -0.74, on 262 trades. It was genuinely market-neutral (beta -0.0003) and avoided liquidation, but avg_trade_return_pct 0.197% fell below the ~0.30% two-leg round trip, carry paid only in the 2021 bull (+6.5%), and it had a fat left tail (kurtosis 66.7, skew -4.24).
Strategy report

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