Strategies
BTC Deribit ATM Calendar Spread — IV Term-Structure Backwardation Harvest (Long-Vega / Positive-Theta Defined-Risk Options, 3-Parameter)
Outcome: Abandoned
BtcDeribitAtmCalendarSpreadTermStructure
BTC Deribit ATM Calendar Spread — IV Term-Structure Backwardation Harvest (Long-Vega / Positive-Theta Defined-Risk Options, 3-Parameter)
Hypothesis
verifying_stuck_3_timeouts
Implementation
Defined-risk ATM calendar spread on Deribit BTC options: sells the front-weekly ATM call and buys the next-monthly ATM call at the same strike whenever the implied-vol TERM STRUCTURE is in backwardation (near-dated IV above later-dated IV), and closes both legs when the structure normalizes back toward contango or the near leg approaches expiry. Each leg's implied vol is inverted from its own daily close with Black-Scholes (Deribit quotes premiums in BTC, so USD premium = close × spot), using the leg's own strike and time to expiry; the signal returned every bar is IV_near − IV_far. Long vega / positive theta with max loss capped at the net debit — it cannot be liquidated. 14 hand-verified ATM calendar pairs (front weekly + next monthly, same strike) spanning 2025-01 to 2026-08 are declared as explicit instrument legs; the BTC perp is the signal/roll clock only and is never traded.
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).
Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTC-PERPETUAL.DERIBIT-1-DAY-LAST-EXTERNAL, Bars processed: 2400 Diagnostics: calculate_signal() was never evaluated (0 evaluated bars) -> no primary bar reached the base template's signal path -> if you override on_bar(), call super().on_bar(bar); check bar_type matches the instrument's data. Do NOT loosen entry thresholds — the entry logic never ran. Ensure your strategy produces trades with the given data and parameters.
Backtest and paper results are hypothetical. Trading involves risk of loss.