|
Lean
$LEAN_TAG$
|
Base class for contract symbols filtering universes. Used by OptionFilterUniverse and FutureFilterUniverse More...
Public Member Functions | |
| virtual void | Refresh (IEnumerable< TData > allData, 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 (IEnumerable< TData > 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< TData >, 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 | Contracts (Func< IEnumerable< TData >, IEnumerable< TData >> 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< TData > | GetEnumerator () |
| IEnumerable interface method implementation More... | |
Protected Member Functions | |
| ContractSecurityFilterUniverse () | |
| Constructs ContractSecurityFilterUniverse More... | |
| ContractSecurityFilterUniverse (IEnumerable< TData > allData, DateTime localTime) | |
| Constructs ContractSecurityFilterUniverse More... | |
| abstract bool | IsStandard (Symbol symbol) |
| Function to determine if the given symbol is a standard contract More... | |
| abstract TData | CreateDataInstance (Symbol symbol) |
| Creates a new instance of the data type for the given symbol More... | |
| virtual DateTime | AdjustExpirationReferenceDate (DateTime referenceDate) |
| Adjust the reference date used for expiration filtering. By default it just returns the same date. More... | |
Properties | |
| ContractExpirationType | Type = ContractExpirationType.Standard [get, set] |
| Expiration Types allowed through the filter Standards only by default More... | |
| DateTime | LocalTime [get] |
| The local exchange current time More... | |
Base class for contract symbols filtering universes. Used by OptionFilterUniverse and FutureFilterUniverse
| T | : | ContractSecurityFilterUniverse | |
| T | : | T | |
| T | : | TData | |
| TData | : | IChainUniverseData |
Definition at line 29 of file ContractSecurityFilterUniverse.cs.
|
protected |
Constructs ContractSecurityFilterUniverse
Definition at line 108 of file ContractSecurityFilterUniverse.cs.
|
protected |
Constructs ContractSecurityFilterUniverse
Definition at line 115 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.
|
protectedpure virtual |
Creates a new instance of the data type for the given symbol
Implemented in QuantConnect.Securities.OptionFilterUniverse, and QuantConnect.Securities.FutureFilterUniverse.
|
virtual |
Refreshes this filter universe
| allData | All data for contracts in the Universe |
| localTime | The local exchange current time |
Definition at line 185 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.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 198 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.IncludeWeeklys | ( | ) |
Includes universe of non-standard weeklys contracts (if any) into selection
Definition at line 214 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.WeeklysOnly | ( | ) |
Sets universe of weeklys contracts (if any) as selection
Definition at line 230 of file ContractSecurityFilterUniverse.cs.
|
virtual |
Returns front month contract
Definition at line 240 of file ContractSecurityFilterUniverse.cs.
|
virtual |
Returns a list of back month contracts
Definition at line 255 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.BackMonth | ( | ) |
Returns first of back month contracts
Definition at line 270 of file ContractSecurityFilterUniverse.cs.
|
protectedvirtual |
Adjust the reference date used for expiration filtering. By default it just returns the same date.
| referenceDate | The reference date to be adjusted |
Reimplemented in QuantConnect.Securities.OptionFilterUniverse.
Definition at line 280 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 293 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.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 322 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.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 333 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.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 351 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.Contracts | ( | IEnumerable< TData > | 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 363 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.Contracts | ( | Func< IEnumerable< TData >, 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 375 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.Contracts | ( | Func< IEnumerable< TData >, IEnumerable< TData >> | 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 388 of file ContractSecurityFilterUniverse.cs.
| T QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.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 401 of file ContractSecurityFilterUniverse.cs.
| IEnumerator<TData> QuantConnect.Securities.ContractSecurityFilterUniverse< T, TData >.GetEnumerator | ( | ) |
IEnumerable interface method implementation
Definition at line 410 of file ContractSecurityFilterUniverse.cs.
|
getsetprotected |
Expiration Types allowed through the filter Standards only by default
Definition at line 58 of file ContractSecurityFilterUniverse.cs.
|
get |
The local exchange current time
Definition at line 63 of file ContractSecurityFilterUniverse.cs.