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
| Trend | Signal | Legs |
|---|---|---|
(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
| Filter | Default | Reason |
|---|---|---|
| Duplicate guard | No open DDC | Prevents stacking directional diagonal trades. |
| Trend threshold | DDC_TREND_THRESHOLD_PCT=0.5% | Requires a meaningful intraday directional move from the captured day open. |
| Near DTE | DDC_NEAR_DTE_MIN=5 to DDC_NEAR_DTE_MAX=9 | Near short leg must have enough theta without excessive expiry gamma. |
| ATM IV | DDC_MIN_IV=20% to DDC_MAX_IV=25% | Rejects low-credit and event-volatility regimes. |
| Debit cap | Entry debit × lot ≤ DDC_MAX_MARGIN | Per-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
| Condition | Action |
|---|---|
Net P&L ≥ DDC_PROFIT_TARGET_PCT × entry debit × lot | Close both legs |
Net P&L ≤ -DDC_STOP_LOSS_PCT × entry debit × lot | Close both legs |
| Spot breaches the short near strike | Short strike breach stop |
| Near-week expiry day at/after 15:00 IST, or near expiry already passed | Time stop |
current_debit = far_current_ltp - near_current_ltp
current_pnl = (current_debit - entry_debit) * lot_size