2024-02-25 13:45:52 +00:00
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
from backtesting.credit_targeting import iron_condor_strategy
|
|
|
|
|
|
|
|
class IronCondorTrade:
|
|
|
|
|
2024-02-27 13:55:29 +00:00
|
|
|
def __init__(self, symbol: str, target: float, entry_time: datetime, stop_multiple: float):
|
2024-02-25 13:45:52 +00:00
|
|
|
self.symbol = symbol
|
|
|
|
self.target = target
|
2024-02-26 16:14:16 +00:00
|
|
|
self.entry_time = entry_time.replace(tzinfo = None)
|
2024-02-27 13:55:29 +00:00
|
|
|
self.strategy = iron_condor_strategy(target)
|
|
|
|
self.stop_multiple = stop_multiple
|