Strategy Overview
The code implements a weekly straddle selling strategy with delta hedging using futures
A straddle involves simultaneously selling both call and put options at the same strike price
Delta hedging is used to maintain neutral directional exposure
Key Components
3 Main Strategy Logic:
1. Trade Entry (Weekly):
Enters trades at 15:15 on specified dates….
Conditions for entry:
No existing straddle position
Time is 15:15
Implied Volatility (IV) > Historical Volatility (HV)
2. Initial Position Setup:
Sells ATM call and put options (straddle)
Calculates option deltas using the Black-Scholes model (mibian library)
Takes an offsetting futures position to achieve delta neutrality.
3. Daily Rebalancing:
Recalculates position deltas daily at 15:15
Adjusts futures position to maintain delta neutrality
Tracks all adjustments in adjustment_history.
4. Key Variables:
Risk Management:
Delta hedging to minimize directional risk
Only enters trades when IV > HV (volatility premium exists)
Uses ATM options to minimize gamma risk
The code appears to be a work in progress as there are some TODO comments and incomplete sections, particularly around:
Exit logic on expiry
PnL calculation
Final results saving
Futures quantity rounding logic
Let’s have a discussion! Feel free to ask any questions.
LinkedIn: https://www.linkedin.com/feed/update/urn:li:activity:7283808981695741952/