Lean
$LEAN_TAG$
|
Base class for contract symbols filtering universes. Used by OptionFilterUniverse and FutureFilterUniverse More...
Public Member Functions | |
virtual void | Refresh (IEnumerable< Symbol > allSymbols, DateTime localTime) |
Refreshes this filter universe More... | |
T | StandardsOnly () |
Sets universe of standard contracts (if any) as selection Contracts by default are standards; only needed to switch back if changed More... | |
T | IncludeWeeklys () |
Includes universe of non-standard weeklys contracts (if any) into selection More... | |
T | WeeklysOnly () |
Sets universe of weeklys contracts (if any) as selection More... | |
virtual T | FrontMonth () |
Returns front month contract More... | |
virtual T | BackMonths () |
Returns a list of back month contracts More... | |
T | BackMonth () |
Returns first of back month contracts More... | |
virtual T | Expiration (TimeSpan minExpiry, TimeSpan maxExpiry) |
Applies filter selecting options contracts based on a range of expiration dates relative to the current day More... | |
T | Expiration (int minExpiryDays, int maxExpiryDays) |
Applies filter selecting contracts based on a range of expiration dates relative to the current day More... | |
T | Contracts (PyObject contracts) |
Explicitly sets the selected contract symbols for this universe. This overrides and and all other methods of selecting symbols assuming it is called last. More... | |
T | Contracts (IEnumerable< Symbol > contracts) |
Explicitly sets the selected contract symbols for this universe. This overrides and and all other methods of selecting symbols assuming it is called last. More... | |
T | Contracts (Func< IEnumerable< Symbol >, IEnumerable< Symbol >> contractSelector) |
Sets a function used to filter the set of available contract filters. The input to the 'contractSelector' function will be the already filtered list if any other filters have already been applied. More... | |
T | OnlyApplyFilterAtMarketOpen () |
Instructs the engine to only filter contracts on the first time step of each market day. More... | |
IEnumerator< Symbol > | GetEnumerator () |
IEnumerable interface method implementation More... | |
Protected Member Functions | |
ContractSecurityFilterUniverse () | |
Constructs ContractSecurityFilterUniverse More... | |
ContractSecurityFilterUniverse (IEnumerable< Symbol > allSymbols, DateTime localTime) | |
Constructs ContractSecurityFilterUniverse More... | |
abstract bool | IsStandard (Symbol symbol) |
Function to determine if the given symbol is a standard contract More... | |
Protected Attributes | |
ContractExpirationType | Type = ContractExpirationType.Standard |
Expiration Types allowed through the filter Standards only by default More... | |
Properties | |
DateTime | LocalTime [get] |
The local exchange current time More... | |
Base class for contract symbols filtering universes. Used by OptionFilterUniverse and FutureFilterUniverse
T | : | ContractSecurityFilterUniverse<T> |
Definition at line 29 of file ContractSecurityFilterUniverse.cs.
|
protected |
Constructs ContractSecurityFilterUniverse
Definition at line 69 of file ContractSecurityFilterUniverse.cs.
|
protected |
Constructs ContractSecurityFilterUniverse
Definition at line 76 of file ContractSecurityFilterUniverse.cs.
|
protectedpure virtual |
Function to determine if the given symbol is a standard contract
Implemented in QuantConnect.Securities.OptionFilterUniverse, and QuantConnect.Securities.FutureFilterUniverse.
|
virtual |
Refreshes this filter universe
allSymbols | All the contract symbols for the Universe |
localTime | The local exchange current time |
Definition at line 134 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.StandardsOnly | ( | ) |
Sets universe of standard contracts (if any) as selection Contracts by default are standards; only needed to switch back if changed
Definition at line 146 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.IncludeWeeklys | ( | ) |
Includes universe of non-standard weeklys contracts (if any) into selection
Definition at line 156 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.WeeklysOnly | ( | ) |
Sets universe of weeklys contracts (if any) as selection
Definition at line 166 of file ContractSecurityFilterUniverse.cs.
|
virtual |
Returns front month contract
Definition at line 176 of file ContractSecurityFilterUniverse.cs.
|
virtual |
Returns a list of back month contracts
Definition at line 190 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.BackMonth | ( | ) |
Returns first of back month contracts
Definition at line 204 of file ContractSecurityFilterUniverse.cs.
|
virtual |
Applies filter selecting options contracts based on a range of expiration dates relative to the current day
minExpiry | The minimum time until expiry to include, for example, TimeSpan.FromDays(10) would exclude contracts expiring in less than 10 days |
maxExpiry | The maximum time until expiry to include, for example, TimeSpan.FromDays(10) would exclude contracts expiring in more than 10 days |
Definition at line 217 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.Expiration | ( | int | minExpiryDays, |
int | maxExpiryDays | ||
) |
Applies filter selecting contracts based on a range of expiration dates relative to the current day
minExpiryDays | The minimum time, expressed in days, until expiry to include, for example, 10 would exclude contracts expiring in less than 10 days |
maxExpiryDays | The maximum time, expressed in days, until expiry to include, for example, 10 would exclude contracts expiring in more than 10 days |
Definition at line 244 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.Contracts | ( | PyObject | contracts | ) |
Explicitly sets the selected contract symbols for this universe. This overrides and and all other methods of selecting symbols assuming it is called last.
contracts | The option contract symbol objects to select |
Definition at line 255 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.Contracts | ( | IEnumerable< Symbol > | contracts | ) |
Explicitly sets the selected contract symbols for this universe. This overrides and and all other methods of selecting symbols assuming it is called last.
contracts | The option contract symbol objects to select |
Definition at line 267 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.Contracts | ( | Func< IEnumerable< Symbol >, IEnumerable< Symbol >> | contractSelector | ) |
Sets a function used to filter the set of available contract filters. The input to the 'contractSelector' function will be the already filtered list if any other filters have already been applied.
contractSelector | The option contract symbol objects to select |
Definition at line 279 of file ContractSecurityFilterUniverse.cs.
T QuantConnect.Securities.ContractSecurityFilterUniverse< T >.OnlyApplyFilterAtMarketOpen | ( | ) |
Instructs the engine to only filter contracts on the first time step of each market day.
Deprecated since filters are always non-dynamic now
Definition at line 292 of file ContractSecurityFilterUniverse.cs.
IEnumerator<Symbol> QuantConnect.Securities.ContractSecurityFilterUniverse< T >.GetEnumerator | ( | ) |
IEnumerable interface method implementation
Definition at line 301 of file ContractSecurityFilterUniverse.cs.
|
protected |
Expiration Types allowed through the filter Standards only by default
Definition at line 53 of file ContractSecurityFilterUniverse.cs.
|
get |
The local exchange current time
Definition at line 58 of file ContractSecurityFilterUniverse.cs.