Lean
$LEAN_TAG$
|
Selects contracts in a futures universe, sorted by open interest. This allows the selection to identifiy current active contract. More...
Public Member Functions | |
OpenInterestFutureUniverseSelectionModel (IAlgorithm algorithm, Func< DateTime, IEnumerable< Symbol >> futureChainSymbolSelector, int? chainContractsLookupLimit=6, int? resultsLimit=1) | |
Creates a new instance of OpenInterestFutureUniverseSelectionModel More... | |
OpenInterestFutureUniverseSelectionModel (IAlgorithm algorithm, PyObject futureChainSymbolSelector, int? chainContractsLookupLimit=6, int? resultsLimit=1) | |
Creates a new instance of OpenInterestFutureUniverseSelectionModel More... | |
IEnumerable< Symbol > | FilterByOpenInterest (IReadOnlyDictionary< Symbol, MarketHoursDatabase.Entry > contracts) |
Filters a set of contracts based on open interest. More... | |
Public Member Functions inherited from QuantConnect.Algorithm.Framework.Selection.FutureUniverseSelectionModel | |
override DateTime | GetNextRefreshTimeUtc () |
Gets the next time the framework should invoke the CreateUniverses method to refresh the set of universes. More... | |
FutureUniverseSelectionModel (TimeSpan refreshInterval, Func< DateTime, IEnumerable< Symbol >> futureChainSymbolSelector) | |
Creates a new instance of FutureUniverseSelectionModel More... | |
FutureUniverseSelectionModel (TimeSpan refreshInterval, Func< DateTime, IEnumerable< Symbol >> futureChainSymbolSelector, UniverseSettings universeSettings) | |
Creates a new instance of FutureUniverseSelectionModel More... | |
override IEnumerable< Universe > | CreateUniverses (QCAlgorithm algorithm) |
Creates the universes for this algorithm. Called once after IAlgorithm.Initialize More... | |
Protected Member Functions | |
override FutureFilterUniverse | Filter (FutureFilterUniverse filter) |
Defines the future chain universe filter More... | |
Selects contracts in a futures universe, sorted by open interest. This allows the selection to identifiy current active contract.
Definition at line 32 of file OpenInterestFutureUniverseSelectionModel.cs.
QuantConnect.Algorithm.Framework.Selection.OpenInterestFutureUniverseSelectionModel.OpenInterestFutureUniverseSelectionModel | ( | IAlgorithm | algorithm, |
Func< DateTime, IEnumerable< Symbol >> | futureChainSymbolSelector, | ||
int? | chainContractsLookupLimit = 6 , |
||
int? | resultsLimit = 1 |
||
) |
Creates a new instance of OpenInterestFutureUniverseSelectionModel
algorithm | Algorithm |
futureChainSymbolSelector | Selects symbols from the provided future chain |
chainContractsLookupLimit | Limit on how many contracts to query for open interest |
resultsLimit | Limit on how many contracts will be part of the universe |
Definition at line 46 of file OpenInterestFutureUniverseSelectionModel.cs.
QuantConnect.Algorithm.Framework.Selection.OpenInterestFutureUniverseSelectionModel.OpenInterestFutureUniverseSelectionModel | ( | IAlgorithm | algorithm, |
PyObject | futureChainSymbolSelector, | ||
int? | chainContractsLookupLimit = 6 , |
||
int? | resultsLimit = 1 |
||
) |
Creates a new instance of OpenInterestFutureUniverseSelectionModel
algorithm | Algorithm |
futureChainSymbolSelector | Selects symbols from the provided future chain |
chainContractsLookupLimit | Limit on how many contracts to query for open interest |
resultsLimit | Limit on how many contracts will be part of the universe |
Definition at line 67 of file OpenInterestFutureUniverseSelectionModel.cs.
|
protectedvirtual |
Defines the future chain universe filter
Reimplemented from QuantConnect.Algorithm.Framework.Selection.FutureUniverseSelectionModel.
Definition at line 75 of file OpenInterestFutureUniverseSelectionModel.cs.
IEnumerable<Symbol> QuantConnect.Algorithm.Framework.Selection.OpenInterestFutureUniverseSelectionModel.FilterByOpenInterest | ( | IReadOnlyDictionary< Symbol, MarketHoursDatabase.Entry > | contracts | ) |
Filters a set of contracts based on open interest.
contracts | Contracts to filter |
Definition at line 85 of file OpenInterestFutureUniverseSelectionModel.cs.