Lean  $LEAN_TAG$
QuantConnect.Data.UniverseSelection.ContinuousContractUniverse Class Reference

Continuous contract universe selection that based on the requested mapping mode will select each symbol More...

Inheritance diagram for QuantConnect.Data.UniverseSelection.ContinuousContractUniverse:
[legend]

Public Member Functions

 ContinuousContractUniverse (Security security, UniverseSettings universeSettings, bool liveMode, SubscriptionDataConfig universeConfig)
 Creates a new instance More...
 
override IEnumerable< SymbolSelectSymbols (DateTime utcTime, BaseDataCollection data)
 Performs universe selection based on the symbol mapping More...
 
override IEnumerable< SubscriptionRequestGetSubscriptionRequests (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< SymbolPerformSelection (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< SubscriptionRequestGetSubscriptionRequests (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< SubscriptionDataConfigAddConfigurations (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, MemberSecurities [get]
 Gets the internal security collection used to define membership in this universe More...
 
HashSet< SymbolSelected [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, SecurityMembers [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...
 

Detailed Description

Continuous contract universe selection that based on the requested mapping mode will select each symbol

Definition at line 29 of file ContinuousContractUniverse.cs.

Constructor & Destructor Documentation

◆ ContinuousContractUniverse()

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.

Member Function Documentation

◆ SelectSymbols()

override IEnumerable<Symbol> QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.SelectSymbols ( DateTime  utcTime,
BaseDataCollection  data 
)
virtual

Performs universe selection based on the symbol mapping

Parameters
utcTimeThe current utc time
dataEmpty data
Returns
The symbols to use

Implements QuantConnect.Data.UniverseSelection.Universe.

Definition at line 64 of file ContinuousContractUniverse.cs.

Here is the call graph for this function:

◆ GetSubscriptionRequests()

override IEnumerable<SubscriptionRequest> QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.GetSubscriptionRequests ( Security  security,
DateTime  currentTimeUtc,
DateTime  maximumEndTimeUtc,
ISubscriptionDataConfigService  subscriptionService 
)
virtual

Gets the subscription requests to be added for the specified security

Parameters
securityThe security to get subscriptions for
currentTimeUtcThe current time in utc. This is the frontier time of the algorithm
maximumEndTimeUtcThe max end time
subscriptionServiceInstance which implements ISubscriptionDataConfigService interface
Returns
All subscriptions required by this security

Reimplemented from QuantConnect.Data.UniverseSelection.Universe.

Definition at line 100 of file ContinuousContractUniverse.cs.

Here is the call graph for this function:

◆ GetTriggerTimes()

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.

Here is the call graph for this function:

◆ AddConfigurations()

static List<SubscriptionDataConfig> QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.AddConfigurations ( ISubscriptionDataConfigService  subscriptionService,
UniverseSettings  universeSettings,
Symbol  symbol 
)
static

Helper method to add and get the required configurations associated with a continuous universe

Definition at line 133 of file ContinuousContractUniverse.cs.

Here is the caller graph for this function:

◆ CreateSymbol()

static Symbol QuantConnect.Data.UniverseSelection.ContinuousContractUniverse.CreateSymbol ( Symbol  symbol)
static

Creates a continuous universe symbol

Parameters
symbolThe associated symbol
Returns
A symbol for a continuous universe of the specified symbol

Definition at line 158 of file ContinuousContractUniverse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Asynchronous

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.


The documentation for this class was generated from the following file: