BtcDeribitAtmCalendarTermStructureHarvest
Hypotheses
BTC Deribit ATM Calendar-Spread Term-Structure Harvest, Delta-Neutral Vega-Hedged (Short the Rich Near-Dated Weekly + Long the Cheaper Longer-Dated ATM Call, Same Strike — Harvest Faster Front Theta When the IV Term Structure Is Flat/Inverted, Roll the Front, 2-Parameter)
Hypotheses
A MARKET-NEUTRAL options RELATIVE-VALUE strategy on DERIBIT BTC that trades the shape of the implied-volatility TERM STRUCTURE, not price direction and not one-sided short vol. It sells a near-dated (weekly) ATM option and simultaneously buys a longer-dated (monthly) ATM option at the SAME strike (a long calendar spread). This position is vega-HEDGED (long far vega offsets short near vega) and delta-neutral at entry, so it is structurally distinct from both the one-sided naked-put VRP harvest that failed here and the long-delta covered-call overlay already in my pending set — those are directional/short-vol; this is a two-legged, vol-term-structure RV that is roughly vega-neutral. The edge is the well-documented convexity of theta across tenor: the near-dated option decays much faster than the longer-dated one, so when the front-month IV is NOT trading at a large discount to the back (term structure flat or inverted, which recurs in and after stress), you collect the differential decay while carrying little net vega and near-zero delta. Fills the two most under-represented buckets: options venue (BINANCE_OPTIONS 0.0% + DERIBIT 5.1% vs ≥15% target) and market-neutral direction (13.5% long_short vs the push toward neutral), and introduces a vol-term-structure MECHANISM absent from the entire portfolio. Deliberately low-parameter (term-structure entry gate + roll cadence). NOTE TO IMPLEMENTATION: all greeks/IV must be read incrementally from the Deribit greeks/IV feed per bar — never rescan or sort the full options history inside the signal (that per-bar full-history scan is what caused the prior Deribit strategy's 300s Layer-3 timeout).
Hypotheses
Iteration 3 fixes the exact Layer-3 failure ('should_enter returned a side 0 times over 2187 bars') at its true root, which was in the chain expansion, not the signal. I reproduced the expander's own resolution logic (src/data/option_chain.discover_deribit_calendar) offline: with roll='monthly' it builds its candidate expiry grid from monthly_expiries too, so the previous legs dte=7 and dte=28 BOTH resolved to the same next-monthly expiry at all 9 open dates. Its per-(kind, expiry) dict collapsed them into ONE contract per open, so on_start's calendar guard (len(rows) < 2 / front expiry >= back expiry) discarded every group, self._calendars was empty, _candidate stayed None, and should_enter was structurally unreachable. The smallest fix that makes trades possible is a config change: leg dtes 10 and 45 resolve on the SAME monthly grid to two DISTINCT expiries at every open (front ~28-35 DTE next-monthly, back ~56-63 DTE following-monthly, one shared ATM strike) — verified for all 9 opens over the 300d window. Leg count is unchanged at 18 (9 opens x 2), the load budget that already fit inside Layer 3, so the timeout that forced the monthly cadence in iteration 2 does not return; a weekly front would need roll='weekly' (104 legs, ~1000s of catalog reads) and re-trip the 300s cap. Everything Layers 1 and 2 already passed is untouched: same imports, class, O(1) incremental leg-quote path, same continuous IV-slope signal. I also widened only the gates that scale with tenor — entry_ts_slope -0.02 -> -0.05 and exit -0.06 -> -0.12 (a month-vs-two-month slope is smaller in magnitude than a week-vs-month one, so the old thresholds were calibrated for a steeper pair), max_abs_delta 0.20 -> 0.25, and leg staleness 4 -> 12 bars (48h) since monthly options print more sparsely than weeklies. One honest deviation to flag: the hypothesis asks for a WEEKLY front against a monthly back; the monthly-cadence expander cannot express a weekly front without a 5x leg blow-up, so the front is the near monthly and the back the following monthly. The mechanism the hypothesis is actually testing — same-strike ATM horizontal, vega-hedged, delta-neutral, gated on the IV term-structure slope, harvesting differential theta — is fully preserved, just one tenor step out. No underlying smoke path was added: with no schedule the strategy still trades nothing.
Hypotheses
Structurally unmeasurable on the available option history — not worth 2 hours of optimization, and not a code defect. The iteration-3 tenor fix worked (24 calendars now trade, delta/vega-neutral as designed, no artifact blowup, PF 1.22, DD 19%), but the Deribit option legs only exist from 2025-11-14 to 2026-09-04 (~9.7 months) in a single regime, so despite the 8-year BTC-PERP clock the effective option history is ~10 months (annual_returns essentially 2026-only). The result has no statistical content: 24 calendars, effective_daily_obs 24, Sharpe 1.996 but bootstrap CI [-0.35, 4.03] straddling zero and PSR 0.69. A 3-window walk-forward over ~10 months leaves ~3 calendars per window and the 20% holdout ~2 months, so the 3-phase validation cannot populate and any optimized Sharpe would be best-of-N noise. This is the same recurring Deribit single-regime option-history wall that abandoned the prior vega-neutral IV term-structure calendar this session — an inadequate sample for a relative-value vol strategy, not a negative/overfit edge. No parameter change buys the multi-year Deribit option chain the strategy needs; recommend factory-gate/manual review if that data becomes available. Failure pattern: structurally unmeasurable single-regime option history (24 trades, CI straddles zero).
Implementation
Delta-neutral, vega-hedged ATM CALL CALENDAR on Deribit BTC that trades the shape of the IV term structure rather than direction. At each monthly roll it SELLS the near-dated ATM call and BUYS the same-strike longer-dated ATM call (net debit, defined max loss). The per-bar signal is the term-structure slope IV(front) - IV(back) in vol points, obtained by Black-Scholes-inverting each leg's own candle premium against the perp spot; the spread is opened when the slope is flat/inverted (>= entry_ts_slope) with |net delta| <= max_abs_delta, and closed when the front goes deeply cheap (< exit_ts_slope, hysteresis) or 24h before the front expiry. Sizing makes the net debit ~5% of equity, capped at 3x equity notional.
Verification Results
CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.
Verification Results
Hypothesis specifies a WEEKLY near-dated front; code implements a MONTHLY front vs two-month back (dte 10/45, roll='monthly'), forced by the expander's monthly cadence (weekly = ~104 legs, re-trips the 300s cap). Calendar mechanism (same-strike ATM, delta-neutral, vega-hedged, IV-term-structure gated, differential-theta harvest) is preserved, but the weekly-front theta advantage that IS the edge magnitude is not tested. Flag to Research: weekly-front version untestable until the expander can express it within budget; treat the monthly result as a proxy, not validation.
Verification Results
Per-trade metrics are leg-level on a hedged two-leg calendar (largest_loss -$28,916, largest_win +$21,420, avg_position_pct 198%) — each leg swings with spot/vol while the paired leg offsets; NET calendar risk is the defined debit (no liquidation). Not a sizing defect, but avg_trade_return_pct (+5.09%) and the extremes are distorted by the leg view — assess net-of-both-legs at the portfolio level, and confirm the net debit stays within risk_frac when the notional cap binds.
Backtest Review
Clean, correctly-built delta-neutral / vega-hedged ATM calendar (net_entry_delta -2.8, net_entry_theta +2240) — the iteration-3 tenor fix resolved the zero-trades deadlock and it now trades 24 calendars
Backtest Review
No artifact blowup (unlike the Deribit iron condor): PF 1.22, max_drawdown 19%, defined-risk debit structure with plausible metrics
Backtest Review
O(1) per-bar signal path — the 300s Layer-3 timeout risk is genuinely designed out
Backtest Review
Option legs exist only 2025-11 → 2026-09 (~9.7 months), a single regime — despite the 8-year perp clock the effective option history is ~10 months (annual_returns essentially 2026-only)
Backtest Review
24 calendars with effective_daily_obs 24; Sharpe 1.996 but bootstrap CI [-0.35, 4.03] straddles zero and PSR 0.69 — the headline is noise
Backtest Review
The 3-window walk-forward and 20% holdout cannot populate (a few calendars per fold) — any optimized Sharpe would be best-of-N noise
Backtest Review
Recurring Deribit single-regime option-history wall (same failure as the prior IV term-structure calendar abandons this session)
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).
Iteration History
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTC-PERPETUAL.DERIBIT-4-HOUR-LAST-EXTERNAL, Bars processed: 2187
Diagnostics: should_enter() returned a side 0 times over 2187 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 4 — QA review):
- STRUCTURALLY UNMEASURABLE INDEPENDENT-TRADE COUNT. The chain is roll='monthly' over lookback_days=300, which the expander resolves to just ~9 monthly calendar cycles (the developer's own '9 opens x 2 = 18 legs'). That is ~9 INDEPENDENT term-structure bets over the entire backtest — far below the ~30-trade floor needed to distinguish edge from noise for an options structure. The sandbox's headline of 44 trades / 88 legs is an artifact: it counts 2 legs per open PLUS heavy intra-cycle re-entry churn (turnover 2372%, driven by the narrow -0.05/-0.12 hysteresis band being crossed repeatedly by noisy BS-inverted candle IVs), not independent observations. The resulting metrics are uninterpretable noise on a 22-data-day sample: Sharpe 7.44 with a 95% CI of [1.04, 16.09], avg_trade_return_pct 7.49% (a per-leg-notional figure not comparable to linear instruments), avg_position_pct 208%. This is the recurring Deribit single-name option family that reaches backtest and dies unmeasurable, and this is already iteration 3 — after a 300s timeout and a zero-trades bug — i.e. exactly the backtest/timeout-iteration burn that should be cut at QA. Nine monthly cycles cannot feed the 3-window walk-forward + 15-day holdout with any statistical power.
- THE IMPLEMENTED TENOR NO LONGER TESTS THE HYPOTHESIS'S EDGE. The hypothesis is explicitly built on 'harvest FASTER FRONT THETA' using a WEEKLY front against a monthly back — the edge is the steep, late-life theta acceleration of a ~7-DTE option. By the developer's own admission the expander cannot express a weekly front without a 5x leg blow-up and a renewed 300s timeout, so iteration 3 ships a ~28-35 DTE monthly front vs a ~56-63 DTE two-month back. Theta convexity is a last-~2-weeks phenomenon; a month-vs-two-month calendar sits on a far flatter section of the decay curve and captures a materially weaker (and differently-signed-in-stress) version of the differential-theta edge the hypothesis names. The roll cadence also silently changed from weekly to monthly. This is not a cosmetic tenor step — the specific mechanic that the hypothesis claims as its edge (fast weekly front decay) is not what the code harvests, so a 'pass' would validate a different strategy than the one proposed.
- Excessive churn contradicts the stated multi-day-hold thesis and will bleed option transaction costs. turnover is 2372% and the entry/exit hysteresis band is only 0.07 vol points (-0.05 to -0.12), while the signal is IV(front)-IV(back) obtained by Black-Scholes-inverting each leg's own 4h candle premium — a noisy quantity for sparsely-printed monthly options. The position re-establishes and closes repeatedly within a single monthly cycle, each round trip paying the Deribit option spread/fee, which is not reflected in the per-notional avg_trade_return_pct. This both inflates the apparent trade count and erodes any real edge.
Backtest and paper results are hypothetical. Trading involves risk of loss.