Lean
$LEAN_TAG$
|
Provides a base class for all universes to derive from. More...
Classes | |
class | Member |
Member of the Universe More... | |
class | SelectionEventArgs |
Event fired when the universe selection changes More... | |
class | UnchangedUniverse |
Provides a value to indicate that no changes should be made to the universe. This value is intended to be returned by reference via Universe.SelectSymbols More... | |
Public Member Functions | |
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... | |
abstract IEnumerable< Symbol > | SelectSymbols (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... | |
virtual IEnumerable< SubscriptionRequest > | GetSubscriptionRequests (Security security, DateTime currentTimeUtc, DateTime maximumEndTimeUtc, ISubscriptionDataConfigService subscriptionService) |
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 Attributes | |
static readonly UnchangedUniverse | Unchanged = UnchangedUniverse.Instance |
Gets a value indicating that no change to the universe should be made More... | |
Protected Member Functions | |
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 | |
virtual ConcurrentDictionary< Symbol, Member > | Securities [get] |
Gets the internal security collection used to define membership in this universe More... | |
SecurityType | SecurityType [get] |
Gets the security type of this universe More... | |
string | Market [get] |
Gets the market of this universe More... | |
virtual bool | DisposeRequested [get, protected set] |
Flag indicating if disposal of this universe has been requested More... | |
abstract UniverseSettings | UniverseSettings [get] |
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 | |
EventHandler | SelectionChanged |
Event fired when the universe selection has changed More... | |
Provides a base class for all universes to derive from.
Definition at line 30 of file Universe.cs.
|
protected |
Initializes a new instance of the Universe class
config | The configuration used to source data for this universe |
Definition at line 113 of file Universe.cs.
|
virtual |
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
utcTime | The current utc time |
security | The security to check if its ok to remove |
Reimplemented in QuantConnect.Data.UniverseSelection.UniverseDecorator.
Definition at line 130 of file Universe.cs.
IEnumerable<Symbol> QuantConnect.Data.UniverseSelection.Universe.PerformSelection | ( | DateTime | utcTime, |
BaseDataCollection | data | ||
) |
Performs universe selection using the data specified
utcTime | The current utc time |
data | The symbols to remain in the universe |
Definition at line 177 of file Universe.cs.
|
pure virtual |
Performs universe selection using the data specified
utcTime | The current utc time |
data | The symbols to remain in the universe |
Implemented in QuantConnect.Data.UniverseSelection.UserDefinedUniverse, QuantConnect.Data.UniverseSelection.UniverseDecorator, QuantConnect.Data.UniverseSelection.UniversePythonWrapper, QuantConnect.Data.UniverseSelection.ScheduledUniverse, QuantConnect.Data.UniverseSelection.CoarseFundamentalUniverse, QuantConnect.Data.UniverseSelection.OptionChainUniverse, QuantConnect.Data.UniverseSelection.FuncUniverse< T >, QuantConnect.Data.UniverseSelection.FineFundamentalUniverse, QuantConnect.Data.UniverseSelection.FuturesChainUniverse, QuantConnect.Data.UniverseSelection.ContinuousContractUniverse, QuantConnect.Data.UniverseSelection.SelectSymbolsUniverseDecorator, and QuantConnect.Algorithm.Selection.OptionContractUniverse.
|
virtual |
Creates and configures a security for the specified symbol
symbol | The symbol of the security to be created |
algorithm | The algorithm instance |
marketHoursDatabase | The market hours database |
symbolPropertiesDatabase | The symbol properties database |
<obsolete>The CreateSecurity won't be called</obsolete>
Reimplemented in QuantConnect.Data.UniverseSelection.UniverseDecorator.
Definition at line 224 of file Universe.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 |
Reimplemented in QuantConnect.Data.UniverseSelection.UniverseDecorator, and QuantConnect.Data.UniverseSelection.GetSubscriptionRequestsUniverseDecorator.
Definition at line 238 of file Universe.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 in QuantConnect.Data.UniverseSelection.UserDefinedUniverse, QuantConnect.Data.UniverseSelection.OptionChainUniverse, QuantConnect.Data.UniverseSelection.UniversePythonWrapper, QuantConnect.Data.UniverseSelection.ContinuousContractUniverse, QuantConnect.Data.UniverseSelection.FuturesChainUniverse, QuantConnect.Data.UniverseSelection.UniverseDecorator, QuantConnect.Algorithm.Framework.Selection.ManualUniverse, and QuantConnect.Algorithm.Framework.Selection.CustomUniverse.
Definition at line 253 of file Universe.cs.
bool QuantConnect.Data.UniverseSelection.Universe.ContainsMember | ( | Symbol | symbol | ) |
Determines whether or not the specified symbol is currently a member of this universe
symbol | The symbol whose membership is to be checked |
Definition at line 279 of file Universe.cs.
|
virtual |
Marks this universe as disposed and ready to remove all child subscriptions
Definition at line 330 of file Universe.cs.
|
protected |
Event invocator for the SelectionChanged event
selection | The current universe selection |
Definition at line 339 of file Universe.cs.
|
static |
Gets a value indicating that no change to the universe should be made
Definition at line 41 of file Universe.cs.
|
get |
Gets the internal security collection used to define membership in this universe
Definition at line 49 of file Universe.cs.
|
get |
Gets the security type of this universe
Definition at line 63 of file Universe.cs.
|
get |
Gets the market of this universe
Definition at line 71 of file Universe.cs.
|
getprotected set |
Flag indicating if disposal of this universe has been requested
Definition at line 79 of file Universe.cs.
|
get |
Gets the settings used for subscriptions added for this universe
Definition at line 88 of file Universe.cs.
|
get |
Gets the configuration used to get universe data
Definition at line 96 of file Universe.cs.
Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.
Definition at line 105 of file Universe.cs.
EventHandler QuantConnect.Data.UniverseSelection.Universe.SelectionChanged |
Event fired when the universe selection has changed
Definition at line 57 of file Universe.cs.