FuturesExpiryFunctions
QuantConnect.Securities.Future.FuturesExpiryFunctions
Bases: Object
Calculate the date of a futures expiry given an expiry month and year
FUTURES_EXPIRY_DICTIONARY
FUTURES_EXPIRY_DICTIONARY: Dictionary[
Symbol, Callable[[datetime], datetime]
] = ...
Dictionary of the Functions that calculates the expiry for a given year and month. It does not matter what the day and time of day are passed into the Functions. The Functions is responsible for calculating the day and time of day given a year and month
futures_expiry_function
futures_expiry_function(
symbol: Union[Symbol, str, BaseContract],
) -> Callable[[datetime], datetime]
Method to retrieve the Function for a specific future symbol