INNER CODE UNIT · Python
ShortStrangles
ldt9/PyOptionTrader · models/futures/short_strangle.py:26
class ShortStrangles:
'''
This class is designed to create a short strangle strategy.
Sell 1 call and 1 put, each at the 16 delta at the monthly expiration closest to 45DTE.
Close at 50% gain, 200% loss, or 21 days left to expiration.
These parameters are configurable in the trade_strangle() function.
'''
def __init__(self):
print(f"{self.get_timestamp()} Initializing Options Strategy...")
# Instantiate local vars
self.ib = ibi.IB()
self._logger = logging.getLogger(__name__)
self.bar_count = 0
self.underlying = None