RollingSpreadOptionsStrategy#
-
class sigtech.framework.strategies.rolling_options_baskets.RollingSpreadOptionsStrategy
Baseclasses:
RollingOptionsStrategyBase
Is a two-part strategy that takes long and short positions in call or put options with the same expiration but different strike price.
A bull call spread contains one long call with a lower strike price and one short call with a higher strike price.
A bear call spread contains one short call with a lower strike price and one long call with a higher strike price.
A bull put spread contains one short put with a higher strike price and one long put with a lower strike price.
A bear put spread contains one long put with a higher strike price and one short put with a lower strike price.
Parameters are the same as in the base RollingOptionsStrategyBase strategy.
Additional attributes:
strike_1
: The price at which the first options leg contract can be exercised. For FX can be also'ATM+/-XX%'
ifstrike_type
is set to ATM type ('SPOT'
,'FWD'
, or'DN'
) (both call and put).strike_2
: The price at which the second options leg contract can be exercised. For FX can be also'ATM+/-XX%'
ifstrike_type
is set to ATM type ('SPOT'
,'FWD'
, or'DN'
) (both call and put).group_name
: Name of the option group to trade options for.exercise_type
:'European'
or'American'
. Optional, if omitted, group default is used.option_type
:'Call'
or'Put'
. Optional, if omitted,'Call'
is used by default.spread_direction
:'Bull'
or'Bear'
option spread. Optional,'Bull'
is used by default.
Example usage:
import datetime as dtm import sigtech.framework as sig group = sig.obj.get('USDJPY OTC OPTION GROUP') spread = sig.RollingSpreadOptionsStrategy( start_date=dtm.date(2021, 1, 4), end_date=dtm.date(2023, 1, 4), currency=group.underlying_obj.currency, group_name=group.name, rolling_frequencies=['3M'], maturity='12M', option_type='Call', spread_direction='Bull', strike_type='SPOT', strike_1='ATM', strike_2='ATM+3%', target_type='Vega', target_quantity=10.0, )
-
currency: Optional[str]
-
exercise_type: Optional[Literal['European', 'American']]
-
group_name: str
-
option_type: Optional[Literal['Call', 'Put']]
-
spread_direction: Optional[Literal['Bull', 'Bear']]
-
strike_1: Union[float, int, str]
-
strike_2: Union[float, int, str]
-
roll_options(dt)
Set option positions. :param dt: Decision datetime.
-
validate()
Validate strikes for calls and puts.