Lean
$LEAN_TAG$
|
Continuous contract universe selection that based on the requested mapping mode will select each symbol More...
Public Member Functions | |
ContinuousContractUniverse (Security security, UniverseSettings universeSettings, bool liveMode, SubscriptionDataConfig universeConfig) | |
Creates a new instance More... | |
override IEnumerable< Symbol > | SelectSymbols (DateTime utcTime, BaseDataCollection data) |
Performs universe selection based on the symbol mapping More... | |
override IEnumerable< SubscriptionRequest > | GetSubscriptionRequests (Security security, DateTime currentTimeUtc, DateTime maximumEndTimeUtc, ISubscriptionDataConfigService subscriptionService) |
Gets the subscription requests to be added for the specified security More... | |
IEnumerable< DateTime > | GetTriggerTimes (DateTime startTimeUtc, DateTime endTimeUtc, MarketHoursDatabase marketHoursDatabase) |
Each tradeable day of the future we trigger a new selection. Allows use to select the current contract More... | |
Public Member Functions inherited from QuantConnect.Data.UniverseSelection.Universe | |
virtual bool | CanRemoveMember (DateTime utcTime, Security security) |
Determines whether or not the specified security can be removed from this universe. This is useful to prevent securities from being taken out of a universe before the algorithm has had enough time to make decisions on the security More... | |
IEnumerable< Symbol > | PerformSelection (DateTime utcTime, BaseDataCollection data) |
Performs universe selection using the data specified More... | |
virtual Security | CreateSecurity (Symbol symbol, IAlgorithm algorithm, MarketHoursDatabase marketHoursDatabase, SymbolPropertiesDatabase symbolPropertiesDatabase) |
Creates and configures a security for the specified symbol More... | |
virtual IEnumerable< SubscriptionRequest > | GetSubscriptionRequests (Security security, DateTime currentTimeUtc, DateTime maximumEndTimeUtc) |
Gets the subscription requests to be added for the specified security More... | |
bool | ContainsMember (Symbol symbol) |
Determines whether or not the specified symbol is currently a member of this universe More... | |
virtual void | Dispose () |
Marks this universe as disposed and ready to remove all child subscriptions More... | |
Static Public Member Functions | |
static List< SubscriptionDataConfig > | AddConfigurations (ISubscriptionDataConfigService subscriptionService, UniverseSettings universeSettings, Symbol symbol) |
Helper method to add and get the required configurations associated with a continuous universe More... | |
static Symbol | CreateSymbol (Symbol symbol) |
Creates a continuous universe symbol More... | |
Public Attributes | |
override bool | Asynchronous => false |
True if this universe filter can run async in the data stack TODO: see IContinuousSecurity.Mapped More... | |
Public Attributes inherited from QuantConnect.Data.UniverseSelection.Universe | |
SecurityType | SecurityType => Configuration.SecurityType |
Gets the security type of this universe More... | |
string | Market => Configuration.Market |
Gets the market of this universe More... | |
Symbol | Symbol => Configuration.Symbol |
Gets the symbol of this universe More... | |
Type | DataType => Configuration.Type |
Gets the data type of this universe More... | |
Additional Inherited Members | |
Static Public Attributes inherited from QuantConnect.Data.UniverseSelection.Universe | |
static readonly UnchangedUniverse | Unchanged = UnchangedUniverse.Instance |
Gets a value indicating that no change to the universe should be made More... | |
Protected Member Functions inherited from QuantConnect.Data.UniverseSelection.Universe | |
Universe (SubscriptionDataConfig config) | |
Initializes a new instance of the Universe class More... | |
void | OnSelectionChanged (HashSet< Symbol > selection=null) |
Event invocator for the SelectionChanged event More... | |
Properties inherited from QuantConnect.Data.UniverseSelection.Universe | |
virtual ConcurrentDictionary< Symbol, Member > | Securities [get] |
Gets the internal security collection used to define membership in this universe More... | |
HashSet< Symbol > | Selected [get, set] |
The currently selected symbol set More... | |
virtual bool | Asynchronous [get, set] |
True if this universe filter can run async in the data stack More... | |
virtual bool | DisposeRequested [get, protected set] |
Flag indicating if disposal of this universe has been requested More... | |
virtual UniverseSettings | UniverseSettings [get, set] |
Gets the settings used for subscriptions added for this universe More... | |
virtual SubscriptionDataConfig | Configuration [get] |
Gets the configuration used to get universe data More... | |
Dictionary< Symbol, Security > | Members [get] |
Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership. More... | |
Events inherited from QuantConnect.Data.UniverseSelection.Universe | |
EventHandler | SelectionChanged |
Event fired when the universe selection has changed More... | |
Continuous contract universe selection that based on the requested mapping mode will select each symbol
Definition at line 29 of file ContinuousContractUniverse.cs.
QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.ContinuousContractUniverse | ( | Security | security, |
UniverseSettings | universeSettings, | ||
bool | liveMode, | ||
SubscriptionDataConfig | universeConfig | ||
) |
Creates a new instance
Definition at line 47 of file ContinuousContractUniverse.cs.
|
virtual |
Performs universe selection based on the symbol mapping
utcTime | The current utc time |
data | Empty data |
Implements QuantConnect.Data.UniverseSelection.Universe.
Definition at line 64 of file ContinuousContractUniverse.cs.
|
virtual |
Gets the subscription requests to be added for the specified security
security | The security to get subscriptions for |
currentTimeUtc | The current time in utc. This is the frontier time of the algorithm |
maximumEndTimeUtc | The max end time |
subscriptionService | Instance which implements ISubscriptionDataConfigService interface |
Reimplemented from QuantConnect.Data.UniverseSelection.Universe.
Definition at line 100 of file ContinuousContractUniverse.cs.
IEnumerable<DateTime> QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.GetTriggerTimes | ( | DateTime | startTimeUtc, |
DateTime | endTimeUtc, | ||
MarketHoursDatabase | marketHoursDatabase | ||
) |
Each tradeable day of the future we trigger a new selection. Allows use to select the current contract
Implements QuantConnect.Data.UniverseSelection.ITimeTriggeredUniverse.
Definition at line 118 of file ContinuousContractUniverse.cs.
|
static |
Helper method to add and get the required configurations associated with a continuous universe
Definition at line 133 of file ContinuousContractUniverse.cs.
|
static |
Creates a continuous universe symbol
symbol | The associated symbol |
Definition at line 158 of file ContinuousContractUniverse.cs.
override bool QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.Asynchronous => false |
True if this universe filter can run async in the data stack TODO: see IContinuousSecurity.Mapped
Definition at line 42 of file ContinuousContractUniverse.cs.