Skip to content

FuturesOptionsExpiryFunctions

QuantConnect.Securities.FutureOption.FuturesOptionsExpiryFunctions

Bases: Object

Futures options expiry lookup utility class

first_friday_of_contract_month

first_friday_of_contract_month(
    underlying_future: Union[Symbol, str, BaseContract],
    expiry_month: Union[datetime, date],
) -> datetime

First friday of the contract month

futures_option_expiry

futures_option_expiry(
    canonical_future_option_symbol: Union[
        Symbol, str, BaseContract
    ],
    future_contract_month: Union[datetime, date],
) -> datetime

Gets the Futures Options' expiry for the given contract month.

Parameters:

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

Canonical Futures Options Symbol. Will be made canonical if not provided a canonical

required
future_contract_month Union[datetime, date]

Contract month of the underlying Future

required

Returns:

Type Description
datetime

Expiry date/time.

get_future_option_expiry_from_future_expiry

get_future_option_expiry_from_future_expiry(
    future_symbol: Union[Symbol, str, BaseContract],
    canonical_future_option: Union[
        Symbol, str, BaseContract
    ] = None,
) -> datetime

Gets the Future Option's expiry from the Future Symbol provided

Parameters:

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

Future (non-canonical) Symbol

required
canonical_future_option Union[Symbol, str, BaseContract]

The canonical Future Option Symbol

None

Returns:

Type Description
datetime

Future Option Expiry for the Future with the same contract month.

tenth_business_day_of_contract_month

tenth_business_day_of_contract_month(
    underlying_future: Union[Symbol, str, BaseContract],
    expiry_month: Union[datetime, date],
) -> datetime

Tenth business day of the month