Lean
$LEAN_TAG$
|
Represents options symbols universe used in filtering. More...
Public Member Functions | |
OptionFilterUniverse (Option.Option option) | |
Constructs OptionFilterUniverse More... | |
OptionFilterUniverse (IEnumerable< Symbol > allSymbols, BaseData underlying, decimal underlyingScaleFactor=1) | |
Constructs OptionFilterUniverse More... | |
void | Refresh (IEnumerable< Symbol > allSymbols, BaseData underlying, DateTime localTime) |
Refreshes this option filter universe and allows specifying if the exchange date changed from last call More... | |
OptionFilterUniverse | Strikes (int minStrike, int maxStrike) |
Applies filter selecting options contracts based on a range of strikes in relative terms More... | |
OptionFilterUniverse | CallsOnly () |
Sets universe of call options (if any) as a selection More... | |
OptionFilterUniverse | PutsOnly () |
Sets universe of put options (if any) as a selection More... | |
Public Member Functions inherited from QuantConnect.Securities.ContractSecurityFilterUniverse< OptionFilterUniverse > | |
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 | |
override bool | IsStandard (Symbol symbol) |
Determine if the given Option contract symbol is standard More... | |
Protected Member Functions inherited from QuantConnect.Securities.ContractSecurityFilterUniverse< OptionFilterUniverse > | |
ContractSecurityFilterUniverse () | |
Constructs ContractSecurityFilterUniverse More... | |
ContractSecurityFilterUniverse (IEnumerable< Symbol > allSymbols, DateTime localTime) | |
Constructs ContractSecurityFilterUniverse More... | |
Properties | |
BaseData | UnderlyingInternal [get, set] |
The underlying price data More... | |
BaseData | Underlying [get] |
The underlying price data More... | |
Properties inherited from QuantConnect.Securities.ContractSecurityFilterUniverse< OptionFilterUniverse > | |
DateTime | LocalTime [get] |
The local exchange current time More... | |
Additional Inherited Members | |
Protected Attributes inherited from QuantConnect.Securities.ContractSecurityFilterUniverse< OptionFilterUniverse > | |
ContractExpirationType | Type |
Expiration Types allowed through the filter Standards only by default More... | |
Represents options symbols universe used in filtering.
Definition at line 30 of file OptionFilterUniverse.cs.
QuantConnect.Securities.OptionFilterUniverse.OptionFilterUniverse | ( | Option.Option | option | ) |
Constructs OptionFilterUniverse
option | The canonical option chain security |
Definition at line 58 of file OptionFilterUniverse.cs.
QuantConnect.Securities.OptionFilterUniverse.OptionFilterUniverse | ( | IEnumerable< Symbol > | allSymbols, |
BaseData | underlying, | ||
decimal | underlyingScaleFactor = 1 |
||
) |
Constructs OptionFilterUniverse
Used for testing only
Definition at line 67 of file OptionFilterUniverse.cs.
void QuantConnect.Securities.OptionFilterUniverse.Refresh | ( | IEnumerable< Symbol > | allSymbols, |
BaseData | underlying, | ||
DateTime | localTime | ||
) |
Refreshes this option filter universe and allows specifying if the exchange date changed from last call
allSymbols | All the options contract symbols |
underlying | The current underlying last data point |
localTime | The current local time |
Definition at line 81 of file OptionFilterUniverse.cs.
|
protectedvirtual |
Determine if the given Option contract symbol is standard
Implements QuantConnect.Securities.ContractSecurityFilterUniverse< OptionFilterUniverse >.
Definition at line 94 of file OptionFilterUniverse.cs.
OptionFilterUniverse QuantConnect.Securities.OptionFilterUniverse.Strikes | ( | int | minStrike, |
int | maxStrike | ||
) |
Applies filter selecting options contracts based on a range of strikes in relative terms
minStrike | The minimum strike relative to the underlying price, for example, -1 would filter out contracts further than 1 strike below market price |
maxStrike | The maximum strike relative to the underlying price, for example, +1 would filter out contracts further than 1 strike above market price |
Definition at line 113 of file OptionFilterUniverse.cs.
OptionFilterUniverse QuantConnect.Securities.OptionFilterUniverse.CallsOnly | ( | ) |
Sets universe of call options (if any) as a selection
Definition at line 214 of file OptionFilterUniverse.cs.
OptionFilterUniverse QuantConnect.Securities.OptionFilterUniverse.PutsOnly | ( | ) |
Sets universe of put options (if any) as a selection
Definition at line 223 of file OptionFilterUniverse.cs.
|
getsetprotected |
The underlying price data
Definition at line 41 of file OptionFilterUniverse.cs.
|
get |
The underlying price data
Definition at line 47 of file OptionFilterUniverse.cs.