AltFundingCarryDeltaNeutralBasket8H
Hypotheses
High-Funding Altcoin Delta-Neutral Positive-Funding Carry Basket (Long Spot + Short USD-M Perp on SOL/DOGE/AVAX, Collect Perp Funding While Market-Neutral, Enter Only on Persistent Extreme Positive Funding, Exit on Funding Normalization, Cross-Venue, 3-Parameter)
Hypotheses
A MARKET-NEUTRAL, multi-asset CASH-AND-CARRY strategy that extends the factory's single highest-Sharpe winner ('Cross-Venue BTC Funding Carry', Sharpe 8.58) into an under-represented cell it does not cover: HIGH-FUNDING ALTCOINS as a diversified basket. For each of three liquid alts (SOLUSDT, DOGEUSDT, AVAXUSDT) it holds LONG SPOT (BINANCE_SPOT) + equal-notional SHORT PERP (BINANCE USD-M) whenever that asset's perp funding is persistently, extremely positive — collecting the funding stream the perp shorts receive while the spot+perp legs cancel price risk (delta-neutral). It is deliberately DIFFERENT from the promoted BTC carry (single-asset, BTC-only, fires rarely because BTC funding is tame) and from the promoted 5-asset NEGATIVE-funding LONG-ONLY basket (directional, opposite funding sign): alts carry structurally HIGHER and more PERSISTENT positive funding than BTC/ETH because retail leverage is chronically long them, so the carry fires more often and accrues more per cycle. This directly satisfies the two lessons that forbid naive versions: L13 (funding is viable ONLY as a multi-day carry where median daily accrual > 15 bps — extreme alt funding at >+0.05%/8h = >+15 bps/day clears this) and L1 (cross-venue delta-neutral only when the captured spread exceeds the ~0.30% round-trip — a multi-day hold at >15 bps/day collects 45-100+ bps, well above cost). It fills CROSS-VENUE (7.0% vs >=15% target), MARKET-NEUTRAL (a hedged, drawdown-bounded profile that dodges the L19 drawdown deaths and the fee_edge intraday churn), and MULTI-instrument buckets. Low turnover (a handful of entries/exits per asset per month) — the opposite of the thousand-trade intraday strategies that keep dying to commission. Only 3 parameters to avoid the overfit that killed the buy-the-dip basket (PBO 0.66).
Hypotheses
Iteration 3 retains and hardens the iter-2 fix for the named Layer-4 blocker (entry_gate raised from the failing 0.0001/~3 bps/day to 0.0005/+15 bps/day — the L13/L1 extreme-funding floor the hypothesis is grounded on), and makes two concrete forward improvements so the strategy clears the fee floor over the REALIZED hold, not merely at the entry instant. (1) Fee/edge: a new min_hold_bars=3 guard blocks a carry pair from closing on funding-decay before ~24h/3 funding stamps have accrued. This eliminates the sub-break-even whipsaw — enter on a spike, exit a bar later, pay the full ~0.30% round trip against near-zero accrual — which is the direct mechanism that produced the negative avg_trade_return_pct; every round trip now collects enough funding to cover its own two-leg cost. (2) Gross exposure: capital_frac trimmed 0.20→0.15, so three concurrent spot longs consume ≤0.45 of the CASH account (well under 1.0) and gross is ~0.9x, addressing the second review point. All passing structure is untouched: proven funding-parse/searchsorted machinery, timestamp-aligned two-leg management, naked-leg guard, correct venue routing (primary = SOL USD-M perp on MARGIN for a stable equity read + funding accounting; spot legs long-only on CASH BINANCE_SPOT — the strategy only ever BUYS spot), no new imports, leverage 1.0 referenced in sizing. The change is minimal and moves the backtest forward (position sizes and exit timing both change, so it is not a byte-identical resubmission).
Hypotheses
fee/edge failure (L22), now terminal. My prior verdict was iterate to fix a broken exit that left pairs open for years; the developer fixed it (avg_holding_period 107d -> 5.8d, trades 74 -> 152, exits confirmed firing). That fix removed the mask and exposed the real per-trade edge as NEGATIVE: avg_trade_return_pct -0.0438% (below the 0.15% futures floor and worse than the pre-fix reading), with profit_factor 1.115 and total_return -1.56%, while Sharpe 3.25 masks it. The stuck-position bug was hiding a negative edge, not manufacturing a loss. This is the identical structural failure as the already-abandoned AVAX single (-0.0058%), ETH+SOL (-0.0138%) and BNB (0.0155%) siblings, and the worst of them: the two-legged spot+perp construction pays ~0.30% cross-venue round-trip to synthesize delta-neutrality, and SOL/DOGE/AVAX positive funding does not net clear it. The iter-3 min_hold_bars anti-whipsaw guard did not help because the problem is cost>edge, not exit timing, and the entry gate is already at the extreme-funding floor (0.0005/8h), so no parameter change can rescue it. This is NOT a funding-crediting problem (funding is credited; mechanism proven in the promoted BTC sibling) — the positive-funding TWO-LEGGED expression is inherently fee-disadvantaged. I am not re-issuing my prior advice: the exit I asked to fix is fixed; what remains is unfixable by iteration. META-NOTE FOR RESEARCH LEAD: this construction (long spot + short perp positive-funding delta-neutral carry) has now failed the fee floor on AVAX, ETH+SOL, BNB, and this SOL/DOGE/AVAX basket. Retire the two-legged positive-funding carry family; the promoted carry works via SINGLE-leg funding capture (long-perp on negative funding), which avoids the second leg's round-trip. Pursue single-leg funding capture rather than more alt baskets of this shape.
Implementation
Market-neutral, cross-venue positive-funding cash-and-carry basket over three high-funding alts (SOL, DOGE, AVAX). For each asset, on 8-hour bars, it holds LONG SPOT (BINANCE_SPOT) + equal-notional SHORT USD-M perp (BINANCE) whenever that asset's trailing perp funding mean is richly positive (>= entry_gate = 0.05%/8h ≈ +15 bps/day). The short perp collects funding every 8h while the long spot cancels price risk (delta-neutral). Each pair is held for days and closed only after funding decays to <= exit_gate (0.02%/8h) AND at least min_hold_bars (3 funding stamps ≈ 24h) have accrued, or a 40-day timeout — the min-hold guard ensures every round trip collects enough funding to clear its ~0.30% two-leg cost. A naked-leg guard flattens both legs if one ever exists without the other. Gross exposure is bounded at capital_frac = 0.15 per leg (≤0.45 of cash across 3 spot legs). Funding is parsed once into sorted numpy arrays; per-bar work is O(log n). Three tunable knobs: entry_gate, exit_gate, capital_frac.
Verification Results
Verification failed (Layer 4 — QA review):
- entry_gate defaults to 0.0001 (0.01%/8h ≈ 3 bps/day), but the hypothesis explicitly grounds its viability on funding being '>+0.05%/8h = >+15 bps/day' — quoting L13 ('viable ONLY when median daily accrual > 15 bps') and L1 ('captured spread must exceed the ~0.30% round-trip'). The code gates at 1/5th of that extreme-funding floor, contradicting even the title's 'Enter Only on Persistent EXTREME Positive Funding'. It therefore opens carry pairs on mild positive funding that cannot clear the two-legged cross-venue round-trip (spot ~0.20% + perp ~0.10% ≈ 0.30%). The clean, trustworthy sandbox confirms the failure empirically: avg_trade_return_pct = -0.0337% (negative, below fee cost), total_return -1.98%, PF 1.04 over 194 trades at ~11.5-day holds. At ~3 bps/day × 11.5 days ≈ 35 bps gross vs ~30 bps round-trip, the net sits at/below break-even — exactly as observed. This is the L6/L16 fee/edge shortfall caught at Layer 4 rather than after optimization.
- capital_frac 0.30 per leg across 3 concurrent pairs implies up to 0.90 of equity in simultaneous spot longs (CASH account) plus 0.90 short-perp notional per side (~1.8x gross, exposure_pct 109% in the sandbox). Delta-neutral nets directional risk, but 3 spot legs consume ~90% of cash equity and assume get_account_equity() reads a correct shared MARGIN+CASH balance.
- Informational: the ±$90k per-trade swings (skew -10, kurtosis 289) are expected per-leg artifacts of a delta-neutral pair netting to funding-minus-fees, not a hedge failure — net return -1.98% confirms the legs cancel as intended. Noted so the analyst does not misread the tails as directional risk.
Verification Results
Backtest engineer/analyst: before promoting ANY carry, (1) confirm end_unrealized sums BOTH legs; (2) assert short-perp funding is POSITIVE while funding>0. The guard shrinking end_unrealized to -2.92% supports the artifact/whipsaw explanation but must be confirmed on the full window.
Verification Results
CROSS-CUTTING (now 4 distinct carry strategies / 6+ backtests): every spot-perp positive-funding carry prints a marginally NEGATIVE total_return with positive REALIZED expectancy. Here the improvement is real — the new min_hold_bars=3 guard cut end_unrealized_pct from -6%/-9%/-10% on prior versions to -2.92%, and total_return to -0.687% (best basket iteration), with realized +$89/trade, PF 1.068, Sharpe 5.68. The residual negative end_unrealized on a delta-neutral book is still either (a) a perp-leg-only metric artifact or (b) short-perp funding not credited; near-symmetric largest_win/loss (+$35.4k/-$32.8k) and positive realized expectancy point to (a).
Verification Results
Analyst: evaluate on total_return/Sharpe/funding over the full window; abandon at BACKTEST_REVIEW if total_return doesn't turn clearly positive once end_unrealized is correctly attributed.
Verification Results
avg_trade_return_pct (-0.0431%) is CONFIRMED a per-LEG artifact, not an edge measure: at the correct entry_gate (0.0005) it's essentially unchanged from iter-1's -0.0337%, while the structurally-identical ETH+SOL sibling showed +0.0333% at the same gate — the sign is noise from which leg caught hedged-away price moves. Don't gate at the 0.15% directional floor; the edge is total_return/Sharpe/funding.
Verification Results
No change required; confirm the min-hold window doesn't systematically catch funding sign-flips (unlikely given +15 bps/day entry extremes).
Verification Results
min_hold_bars=3 can hold a pair through up to ~24h of decayed/briefly-negative funding before a decay-exit is allowed, during which a short perp on negative funding would PAY. Bounded (<=3 bars) and intentional (kills the whipsaw), so acceptable, but a minor carry-risk to note.
Backtest Review
The iter-2 exit fix WORKED: avg_holding_period 107d -> 5.8d, trades 74 -> 152, exits now fire correctly (my prior iterate feedback was addressed)
Backtest Review
Proven mechanism family (funding carry) with a promoted BTC sibling; funding is credited; hedge keeps net risk low (max_drawdown 1.56%)
Backtest Review
benchmark_meaningful=false correctly flags market-neutral
Backtest Review
With the exit fixed, the true per-trade edge is exposed as NEGATIVE: avg_trade_return_pct -0.0438% (below the 0.15% futures floor, worse than pre-fix)
Backtest Review
profit_factor 1.115 (fee-edge dead zone); total_return -1.56%; end_unrealized_pct still -8.24%
Backtest Review
Sharpe 3.25 is misleading — high Sharpe on a below-cost per-trade edge is fee-fragility (L22)
Backtest Review
Same structural failure as the abandoned AVAX/ETH+SOL/BNB siblings — worst avg_trade_return_pct of the set; min_hold_bars guard did not fix it
Backtest Review
Entry gate already at the extreme-funding floor (0.0005/8h) — threshold/timing tuning exhausted
Analysis
The exit logic is not closing pairs, which poisons the whole result — fix this before optimization. Evidence: avg_holding_period is 107 days but max_hold_bars=120*8H caps holds at 40 days; end_unrealized_pct is -11.85% and max_drawdown_duration is 1921 days, meaning pairs opened in the 2020-2021 funding spike stayed OPEN through backtest end in 2026. As a result the headline total_return is -1.9% even though realized carry (total minus unrealized) is roughly +9.9%. Root cause to investigate: your exit gates and the max_hold timeout both key off self._bar_count, which only advances when calculate_signal receives a NEW primary timestamp AND _funding_mean is computable. When a leg's extra bars or the funding series gap out, _bar_count stalls and NO exit branch is ever reached, so positions freeze. Fixes: (1) drive the max_hold timeout off actual bar timestamps (ts_event) rather than _bar_count so it fires even across data gaps; (2) force-close any open pair when its funding series goes stale (no funding point within N intervals) instead of leaving it open; (3) ensure the strategy flattens all open pairs at/near backtest end so the result reflects realized carry, not a multi-year unrealized mark. After the exit is fixed, re-run the backtest — if realized carry stays positive with the timeout enforced, it's ready for optimization; also confirm it still fires meaningfully in the post-2022 regime rather than only in the 2020-2021 high-funding window.
Outcome Summary
AltFundingCarryDeltaNeutralBasket8H was the fifth and most-diversified attempt at the cross-venue positive-funding carry, spreading it across three chronically-high-funding alts to smooth the carry and firing only on extreme, persistent funding. A prior iteration's broken exit had left pairs open for years; the developer fixed it (holding 107d→5.8d, exits confirmed firing), and that very fix removed the mask — exposing a negative per-trade edge of -0.0438%, the worst of the entire family, with profit factor 1.115 and total return -1.56% under a deceptively high Sharpe of 3.25. The reviewer abandoned it as a terminal fee/edge failure and, notably, refused to re-issue iterate advice: the stuck-position bug had been hiding a negative edge, not creating a loss, and no threshold or timing change fixes cost>edge. The escalated verdict was to retire the whole two-legged positive-funding carry shape after five consecutive fee-floor failures and pursue single-leg funding capture, which is why the promoted BTC/negative-funding sibling works.
Outcome Summary
The long-spot/short-perp positive-funding delta-neutral carry has now failed the fee floor on AVAX, ETH+SOL, BNB, and this SOL/DOGE/AVAX basket — even a diversified extreme-funding alt basket, the richest-funding version, was the worst — so the entire two-legged positive-funding family should be retired; the promoted carry works because it captures funding with a single leg (long-perp on negative funding), avoiding the second leg's round-trip.
Outcome Summary
The backtest reviewer returned 'abandon' at the pre-optimization gate for a now-terminal fee/edge failure: fixing the exit removed the mask and exposed that SOL/DOGE/AVAX positive funding does not net clear the ~0.30% two-leg cross-venue round-trip, the min-hold guard couldn't help because the problem is cost>edge rather than exit timing, and the entry gate was already at the extreme-funding floor so no parameter change could rescue it.
Outcome Summary
A market-neutral, multi-asset delta-neutral positive-funding cash-and-carry basket over three high-funding alts (SOL, DOGE, AVAX): for each it held long spot on BINANCE_SPOT against an equal-notional short USD-M perp whenever that asset's funding was persistently extreme-positive, collecting funding while the legs cancelled price risk, gated at the +0.05%/8h extreme-funding floor with a min-hold guard against decay whipsaw and 3 parameters.
Outcome Summary
With full data (152 trades, funding credited, metrics_reliable=true) the hedge worked and the iteration-2 exit fix corrected stuck positions (avg holding 107d→5.8d), but that revealed a negative per-trade edge: avg_trade_return_pct -0.0438% (below the 0.15% floor and the worst of the whole carry family), profit factor 1.115, total return -1.56%, end_unrealized -8.24%, with a headline Sharpe of 3.25 (max drawdown just 1.56%) masking the below-cost edge. No optimization stage ran.
Backtest and paper results are hypothetical. Trading involves risk of loss.