Directional Diagonal

Strategy 6 — Directional Diagonal Calendar (DDC)

DDC is a directional 2-leg calendar. After the bot captures the day open, it waits for a clear intraday move. A strong move up creates a bullish CE diagonal; a strong move down creates a bearish PE diagonal.

Go-live safety DDC_DRY_RUN=True seeds the SQLite records only on first run. Runtime state is changed with /shadow DDC, /promote DDC, and /revert DDC. Shadow/live DDC entries require available balance ≥ DDC_MAX_MARGIN × 1.10.

Structure

BUY
Far-month long
ATM CE/PE
directional hedge
SELL
Near-week short
ATM ± 200
theta leg

Direction Selection

TrendSignalLegs
(spot - day_open) / day_open ≥ DDC_TREND_THRESHOLD_PCT BULLISH CE diagonal Buy far-month ATM CE, sell near-week OTM CE at ATM + DDC_OTM_DISTANCE_PTS
(spot - day_open) / day_open ≤ -DDC_TREND_THRESHOLD_PCT BEARISH PE diagonal Buy far-month ATM PE, sell near-week OTM PE at ATM - DDC_OTM_DISTANCE_PTS

Entry Filters

FilterDefaultReason
Duplicate guardNo open DDCPrevents stacking directional diagonal trades.
Trend thresholdDDC_TREND_THRESHOLD_PCT=0.5%Requires a meaningful intraday directional move from the captured day open.
Near DTEDDC_NEAR_DTE_MIN=5 to DDC_NEAR_DTE_MAX=9Near short leg must have enough theta without excessive expiry gamma.
ATM IVDDC_MIN_IV=20% to DDC_MAX_IV=25%Rejects low-credit and event-volatility regimes.
Debit capEntry debit × lot ≤ DDC_MAX_MARGINPer-lot capital guard before simulated entry is persisted.

Signal + Persistence

# Scanner signal
direction   = "BULLISH" if spot > day_open else "BEARISH"
option_type = "CE" if direction == "BULLISH" else "PE"
far_leg     = far_month ATM option
near_leg    = near_week OTM option at ATM ± DDC_OTM_DISTANCE_PTS
entry_debit = far_ltp - near_ltp

# Persisted open trade keys include far/near ids, strikes, expiries, entries, entry_debit, lot_size, direction, option_type.

Exit Rules

ConditionAction
Net P&L ≥ DDC_PROFIT_TARGET_PCT × entry debit × lotClose both legs
Net P&L ≤ -DDC_STOP_LOSS_PCT × entry debit × lotClose both legs
Spot breaches the short near strikeShort strike breach stop
Near-week expiry day at/after 15:00 IST, or near expiry already passedTime stop
current_debit = far_current_ltp - near_current_ltp
current_pnl   = (current_debit - entry_debit) * lot_size