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... | |
Public Attributes | |
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... | |
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... | |
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 | |
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 146 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 163 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 203 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.ScheduledUniverse, QuantConnect.Data.UniverseSelection.UniversePythonWrapper, QuantConnect.Data.UniverseSelection.OptionChainUniverse, QuantConnect.Data.UniverseSelection.CoarseFundamentalUniverse, QuantConnect.Data.UniverseSelection.FuturesChainUniverse, QuantConnect.Data.UniverseSelection.FundamentalUniverseFactory, QuantConnect.Data.UniverseSelection.ContinuousContractUniverse, QuantConnect.Data.UniverseSelection.FuncUniverse< T >, QuantConnect.Data.UniverseSelection.FineFundamentalUniverse, 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 256 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 270 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.FuturesChainUniverse, QuantConnect.Data.UniverseSelection.UniversePythonWrapper, QuantConnect.Data.UniverseSelection.ContinuousContractUniverse, QuantConnect.Data.UniverseSelection.UniverseDecorator, QuantConnect.Algorithm.Framework.Selection.ManualUniverse, and QuantConnect.Algorithm.Framework.Selection.CustomUniverse.
Definition at line 285 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 311 of file Universe.cs.
|
virtual |
Marks this universe as disposed and ready to remove all child subscriptions
Definition at line 362 of file Universe.cs.
|
protected |
Event invocator for the SelectionChanged event
selection | The current universe selection |
Definition at line 371 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.
SecurityType QuantConnect.Data.UniverseSelection.Universe.SecurityType => Configuration.SecurityType |
Gets the security type of this universe
Definition at line 91 of file Universe.cs.
string QuantConnect.Data.UniverseSelection.Universe.Market => Configuration.Market |
Gets the market of this universe
Definition at line 96 of file Universe.cs.
Symbol QuantConnect.Data.UniverseSelection.Universe.Symbol => Configuration.Symbol |
Gets the symbol of this universe
Definition at line 101 of file Universe.cs.
Type QuantConnect.Data.UniverseSelection.Universe.DataType => Configuration.Type |
Gets the data type of this universe
Definition at line 106 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.
|
getset |
The currently selected symbol set
This set might be different than Securities which might hold members that are no longer selected but have not been removed yet, this can be because they have some open position, orders, haven't completed the minimum time in universe
Definition at line 60 of file Universe.cs.
|
getset |
True if this universe filter can run async in the data stack
Definition at line 68 of file Universe.cs.
|
getprotected set |
Flag indicating if disposal of this universe has been requested
Definition at line 112 of file Universe.cs.
|
getset |
Gets the settings used for subscriptions added for this universe
Definition at line 121 of file Universe.cs.
|
get |
Gets the configuration used to get universe data
Definition at line 129 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 138 of file Universe.cs.
EventHandler QuantConnect.Data.UniverseSelection.Universe.SelectionChanged |
Event fired when the universe selection has changed
Definition at line 86 of file Universe.cs.