Skip to content

OptionStrategies

QuantConnect.Securities.Option.OptionStrategies

Bases: Object

Provides methods for creating popular OptionStrategy instances. These strategies can be directly bought and sold via: QCAlgorithm.Buy(OptionStrategy strategy, int quantity) QCAlgorithm.Sell(OptionStrategy strategy, int quantity)

See also OptionStrategyDefinitions

bear_call_ladder

bear_call_ladder(
    canonical_option: Union[Symbol, str, BaseContract],
    lower_strike: float,
    middle_strike: float,
    higher_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bear Call Ladder strategy, that consists of three calls with the same expiration but different strikes. The strike price of the short call is below the strikes of the two long calls.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
lower_strike float

The strike price of the short call

required
middle_strike float

The middle strike price of one long call

required
higher_strike float

The strike price of one long call with higher strike price

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bear_call_spread

bear_call_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    leg_1_strike: float,
    leg_2_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bear Call Spread strategy, that consists of two calls with the same expiration but different strikes. The strike price of the short call is below the strike of the long call. This is a credit spread.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
leg_1_strike float

The strike price of the short call

required
leg_2_strike float

The strike price of the long call

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bear_put_ladder

bear_put_ladder(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bear Put Ladder strategy, that consists of three puts with the same expiration but different strikes. The strike price of the long put is above the strikes of the two short puts.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The strike price of the long put

required
middle_strike float

The middle strike price of one short put

required
lower_strike float

The strike price of one short put with lower strike price

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bear_put_spread

bear_put_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    leg_1_strike: float,
    leg_2_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bear Put Spread strategy, that consists of two puts with the same expiration but different strikes. The strike price of the short put is below the strike of the long put. This is a debit spread.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
leg_1_strike float

The strike price of the long put

required
leg_2_strike float

The strike price of the short put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

box_spread

box_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Box Spread strategy which consists of a long call and a short put (buy side) of the same strikes, coupled with a short call and a long put (sell side) of higher but same strikes. All options have the same expiry.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The strike price of the sell side legs

required
lower_strike float

The strike price of the buy side legs

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bull_call_ladder

bull_call_ladder(
    canonical_option: Union[Symbol, str, BaseContract],
    lower_strike: float,
    middle_strike: float,
    higher_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bull Call Ladder strategy, that consists of three calls with the same expiration but different strikes. The strike price of the long call is below the strikes of the two short calls.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
lower_strike float

The strike price of the long call

required
middle_strike float

The middle strike price of one short call

required
higher_strike float

The strike price of one short call with higher strike price

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bull_call_spread

bull_call_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    leg_1_strike: float,
    leg_2_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bull Call Spread strategy, that consists of two calls with the same expiration but different strikes. The strike price of the short call is higher than the strike of the long call. This is a debit spread.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
leg_1_strike float

The strike price of the long call

required
leg_2_strike float

The strike price of the short call

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bull_put_ladder

bull_put_ladder(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bull Put Ladder strategy, that consists of three puts with the same expiration but different strikes. The strike price of the short put is above the strikes of the two long puts.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The strike price of the short put

required
middle_strike float

The middle strike price of one long put

required
lower_strike float

The strike price of one long put with lower strike price

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

bull_put_spread

bull_put_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    leg_1_strike: float,
    leg_2_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Bull Put Spread strategy, that consists of two puts with the same expiration but different strikes. The strike price of the short put is above the strike of the long put. This is a credit spread.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
leg_1_strike float

The strike price of the short put

required
leg_2_strike float

The strike price of the long put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

butterfly_call

butterfly_call(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Butterfly Call strategy that consists of two short calls at a middle strike, and one long call each at a lower and upper strike. The upper and lower strikes must both be equidistant from the middle strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The upper strike price of the long call

required
middle_strike float

The middle strike price of the two short calls

required
lower_strike float

The lower strike price of the long call

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

butterfly_put

butterfly_put(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Butterfly Put strategy that consists of two short puts at a middle strike, and one long put each at a lower and upper strike. The upper and lower strikes must both be equidistant from the middle strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The upper strike price of the long put

required
middle_strike float

The middle strike price of the two short puts

required
lower_strike float

The lower strike price of the long put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

call_backspread

call_backspread(
    canonical_option: Union[Symbol, str, BaseContract],
    lower_strike: float,
    higher_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Long Call Backspread strategy, that consists of two calls with the same expiration but different strikes. It involves selling the lower strike call, while buying twice the number of the higher strike call.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
lower_strike float

The strike price of the short call

required
higher_strike float

The strike price of the long call

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

call_butterfly

call_butterfly(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Call Butterfly strategy, that consists of two short calls at a middle strike, and one long call each at a lower and upper strike. The upper and lower strikes must both be equidistant from the middle strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The upper strike price of the long call

required
middle_strike float

The middle strike price of the two short calls

required
lower_strike float

The lower strike price of the long call

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

call_calendar_spread

call_calendar_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    near_expiration: Union[datetime, date],
    far_expiration: Union[datetime, date],
) -> OptionStrategy

Creates new Call Calendar Spread strategy which consists of a short and a long call with the same strikes but with the long call having a further expiration date.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the both legs

required
near_expiration Union[datetime, date]

Near expiration date for the short option

required
far_expiration Union[datetime, date]

Far expiration date for the long option

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

conversion

conversion(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Conversion strategy that consists of buying 1 put contract, 1 lot of the underlying and selling 1 call contract. Put and call must have the same expiration date, underlying (multiplier), and strike price.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the call and put option contract

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

covered_call

covered_call(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Covered Call strategy that consists of selling one call contract and buying 1 lot of the underlying.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the call option contract

required
expiration Union[datetime, date]

The expiration date for the call option contract

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

covered_put

covered_put(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Covered Put strategy that consists of selling 1 put contract and 1 lot of the underlying.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the put option contract

required
expiration Union[datetime, date]

The expiration date for the put option contract

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

iron_butterfly

iron_butterfly(
    canonical_option: Union[Symbol, str, BaseContract],
    otm_put_strike: float,
    atm_strike: float,
    otm_call_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Iron Butterfly strategy which consists of a short ATM call, a short ATM put, a long OTM call, and a long OTM put. all with the same expiration date and with increasing strikes prices in the mentioned order.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
otm_call_strike float

OTM call option strike price

required
atm_strike float

2 ATM options strike price

required
otm_put_strike float

OTM put option strike price

required
expiration Union[datetime, date]

Expiration date for all the options

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

iron_condor

iron_condor(
    canonical_option: Union[Symbol, str, BaseContract],
    long_put_strike: float,
    short_put_strike: float,
    short_call_strike: float,
    long_call_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Iron Condor strategy which consists of a long put, a short put, a short call and a long option, all with the same expiration date and with increasing strikes prices in the mentioned order.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
long_put_strike float

Long put option strike price

required
short_put_strike float

Short put option strike price

required
short_call_strike float

Short call option strike price

required
long_call_strike float

Long call option strike price

required
expiration Union[datetime, date]

Expiration date for all the options

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

jelly_roll

jelly_roll(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    near_expiration: Union[datetime, date],
    far_expiration: Union[datetime, date],
) -> OptionStrategy

Creates new Jelly Roll strategy which combines a long call calendar spread and a short put calendar spread with the same strikes and the same pair of expiration dates.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the all legs

required
near_expiration Union[datetime, date]

Near expiration date for the short call and the long put

required
far_expiration Union[datetime, date]

Far expiration date for the long call and the short put

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

naked_call

naked_call(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Naked Call strategy that consists of selling 1 call contract.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the call option contract

required
expiration Union[datetime, date]

The expiration date for the call option contract

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

naked_put

naked_put(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Naked Put strategy that consists of selling 1 put contract.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the put option contract

required
expiration Union[datetime, date]

The expiration date for the put option contract

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

protective_call

protective_call(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Protective Call strategy that consists of buying one call contract and selling 1 lot of the underlying.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the call option contract

required
expiration Union[datetime, date]

The expiration date for the call option contract

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

protective_collar

protective_collar(
    canonical_option: Union[Symbol, str, BaseContract],
    call_strike: float,
    put_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Protective Collar strategy that consists of buying 1 put contract and 1 lot of the underlying.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
call_strike float

The strike price for the call option contract

required
put_strike float

The strike price for the put option contract

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

protective_put

protective_put(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Protective Put strategy that consists of buying 1 put contract and 1 lot of the underlying.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the put option contract

required
expiration Union[datetime, date]

The expiration date for the put option contract

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

put_backspread

put_backspread(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Long Put Backspread strategy, that consists of two puts with the same expiration but different strikes. It involves selling the higher strike put, while buying twice the number of the lower strike put.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The strike price of the short put

required
lower_strike float

The strike price of the long put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

put_butterfly

put_butterfly(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Put Butterfly strategy, that consists of two short puts at a middle strike, and one long put each at a lower and upper strike. The upper and lower strikes must both be equidistant from the middle strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The upper strike price of the long put

required
middle_strike float

The middle strike price of the two short puts

required
lower_strike float

The lower strike price of the long put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

put_calendar_spread

put_calendar_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    near_expiration: Union[datetime, date],
    far_expiration: Union[datetime, date],
) -> OptionStrategy

Creates new Put Calendar Spread strategy which consists of a short and a long put with the same strikes but with the long put having a further expiration date.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the both legs

required
near_expiration Union[datetime, date]

Near expiration date for the short option

required
far_expiration Union[datetime, date]

Far expiration date for the long option

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

reverse_conversion

reverse_conversion(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Reverse Conversion strategy that consists of buying 1 put contract and 1 lot of the underlying.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the put option contract

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_box_spread

short_box_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Short Box Spread strategy which consists of a long call and a short put (buy side) of the same strikes, coupled with a short call and a long put (sell side) of lower but same strikes. All options have the same expiry.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The strike price of the buy side

required
lower_strike float

The strike price of the sell side

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_butterfly_call

short_butterfly_call(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Butterfly Call strategy that consists of two long calls at a middle strike, and one short call each at a lower and upper strike. The upper and lower strikes must both be equidistant from the middle strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The upper strike price of the short call

required
middle_strike float

The middle strike price of the two long calls

required
lower_strike float

The lower strike price of the short call

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_butterfly_put

short_butterfly_put(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    middle_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Butterfly Put strategy that consists of two long puts at a middle strike, and one short put each at a lower and upper strike. The upper and lower strikes must both be equidistant from the middle strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The upper strike price of the short put

required
middle_strike float

The middle strike price of the two long puts

required
lower_strike float

The lower strike price of the short put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_call_backspread

short_call_backspread(
    canonical_option: Union[Symbol, str, BaseContract],
    lower_strike: float,
    higher_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Short Call Backspread strategy, that consists of two calls with the same expiration but different strikes. It involves buying the lower strike call, while shorting twice the number of the higher strike call.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
lower_strike float

The strike price of the long call

required
higher_strike float

The strike price of the short call

required
expiration Union[datetime, date]

Option expiration date

required

short_call_calendar_spread

short_call_calendar_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    near_expiration: Union[datetime, date],
    far_expiration: Union[datetime, date],
) -> OptionStrategy

Creates new Short Call Calendar Spread strategy which consists of a short and a long call with the same strikes but with the short call having a further expiration date.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the both legs

required
near_expiration Union[datetime, date]

Near expiration date for the long option

required
far_expiration Union[datetime, date]

Far expiration date for the short option

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_iron_butterfly

short_iron_butterfly(
    canonical_option: Union[Symbol, str, BaseContract],
    otm_put_strike: float,
    atm_strike: float,
    otm_call_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Short Iron Butterfly strategy which consists of a long ATM call, a long ATM put, a short OTM call, and a short OTM put, all with the same expiration date and with increasing strikes prices in the mentioned order. It is the inverse of an .

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
otm_call_strike float

OTM call option strike price

required
atm_strike float

2 ATM options strike price

required
otm_put_strike float

OTM put option strike price

required
expiration Union[datetime, date]

Expiration date for all the options

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_iron_condor

short_iron_condor(
    canonical_option: Union[Symbol, str, BaseContract],
    short_put_strike: float,
    long_put_strike: float,
    long_call_strike: float,
    short_call_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a new Short Iron Condor strategy which consists of a short put, a long put, a long call and a short call, all with the same expiration date and with increasing strikes prices in the mentioned order.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
short_put_strike float

Short put option strike price

required
long_put_strike float

Long put option strike price

required
long_call_strike float

Long call option strike price

required
short_call_strike float

Short call option strike price

required
expiration Union[datetime, date]

Expiration date for all the options

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_jelly_roll

short_jelly_roll(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    near_expiration: Union[datetime, date],
    far_expiration: Union[datetime, date],
) -> OptionStrategy

Creates new Short Jelly Roll strategy which combines a long call calendar spread and a short put calendar spread with the same strikes and the same pair of expiration dates.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the all legs

required
near_expiration Union[datetime, date]

Near expiration date for the short call and the long put

required
far_expiration Union[datetime, date]

Far expiration date for the long call and the short put

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_put_backspread

short_put_backspread(
    canonical_option: Union[Symbol, str, BaseContract],
    higher_strike: float,
    lower_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Short Put Backspread strategy, that consists of two puts with the same expiration but different strikes. It involves buying the higher strike put, while selling twice the number of the lower strike put.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
higher_strike float

The strike price of the long put

required
lower_strike float

The strike price of the short put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_put_calendar_spread

short_put_calendar_spread(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    near_expiration: Union[datetime, date],
    far_expiration: Union[datetime, date],
) -> OptionStrategy

Creates new Short Put Calendar Spread strategy which consists of a short and a long put with the same strikes but with the short put having a further expiration date.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the both legs

required
near_expiration Union[datetime, date]

Near expiration date for the long option

required
far_expiration Union[datetime, date]

Far expiration date for the short option

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_straddle

short_straddle(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Short Straddle strategy that consists of selling a call and a put, both with the same strike price and expiration.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price for the option contracts

required
expiration Union[datetime, date]

The expiration date for the option contracts

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

short_strangle

short_strangle(
    canonical_option: Union[Symbol, str, BaseContract],
    call_leg_strike: float,
    put_leg_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Creates a Short Strangle strategy that consists of selling a call and a put, with the same expiration date and the call strike being above the put strike.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
call_leg_strike float

The strike price of the short call

required
put_leg_strike float

The strike price of the short put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

straddle

straddle(
    canonical_option: Union[Symbol, str, BaseContract],
    strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Straddle strategy, that is a combination of buying a call and buying a put, both with the same strike price and expiration.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
strike float

The strike price of the both legs

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.

strangle

strangle(
    canonical_option: Union[Symbol, str, BaseContract],
    call_leg_strike: float,
    put_leg_strike: float,
    expiration: Union[datetime, date],
) -> OptionStrategy

Method creates new Strangle strategy, that buying a call option and a put option with the same expiration date The strike price of the call is above the strike of the put.

Parameters:

Name Type Description Default
canonical_option Union[Symbol, str, BaseContract]

Option symbol

required
call_leg_strike float

The strike price of the long call

required
put_leg_strike float

The strike price of the long put

required
expiration Union[datetime, date]

Option expiration date

required

Returns:

Type Description
OptionStrategy

Option strategy specification.