Skip to content

OptionPayoff

QuantConnect.Util.OptionPayoff

Bases: Object

Static class containing useful methods related with options payoff

get_intrinsic_value

get_intrinsic_value(
    underlying_price: float,
    strike: float,
    right: OptionRight,
) -> float

Intrinsic value function of the option

Parameters:

Name Type Description Default
underlying_price float

The price of the underlying

required
strike float

The strike price of the option

required
right OptionRight

The option right of the option, call or put

required

Returns:

Type Description
float

The intrinsic value remains for the option at expiry.

get_pay_off

get_pay_off(
    underlying_price: float,
    strike: float,
    right: OptionRight,
) -> float

Option payoff function at expiration time

Parameters:

Name Type Description Default
underlying_price float

The price of the underlying

required
strike float

The strike price of the option

required
right OptionRight

The option right of the option, call or put

required

is_at_the_money

is_at_the_money(
    underlying_price: float,
    strike: float,
    right: OptionRight,
) -> bool

Whether the option is at the money: the strike equals the underlying price

Parameters:

Name Type Description Default
underlying_price float

The price of the underlying

required
strike float

The strike price of the option

required
right OptionRight

The option right of the option, call or put

required

Returns:

Type Description
bool

True if the strike equals the underlying price.

is_in_the_money

is_in_the_money(
    underlying_price: float,
    strike: float,
    right: OptionRight,
) -> bool

Whether the option is in the money: a call with the strike below the underlying price, a put with the strike above it

Parameters:

Name Type Description Default
underlying_price float

The price of the underlying

required
strike float

The strike price of the option

required
right OptionRight

The option right of the option, call or put

required

Returns:

Type Description
bool

True if the option has intrinsic value.

is_out_of_the_money

is_out_of_the_money(
    underlying_price: float,
    strike: float,
    right: OptionRight,
) -> bool

Whether the option is out of the money: a call with the strike above the underlying price, a put with the strike below it

Parameters:

Name Type Description Default
underlying_price float

The price of the underlying

required
strike float

The strike price of the option

required
right OptionRight

The option right of the option, call or put

required

Returns:

Type Description
bool

True if the option has no intrinsic value and is not at the money.