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

Defines a user that is fired based on a specified IDateRule and ITimeRule More...

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

Public Member Functions

 ScheduledUniverse (DateTimeZone timeZone, IDateRule dateRule, ITimeRule timeRule, Func< DateTime, IEnumerable< Symbol >> selector, UniverseSettings settings=null)
 Initializes a new instance of the ScheduledUniverse class More...
 
 ScheduledUniverse (IDateRule dateRule, ITimeRule timeRule, Func< DateTime, IEnumerable< Symbol >> selector, UniverseSettings settings=null)
 Initializes a new instance of the ScheduledUniverse class More...
 
 ScheduledUniverse (DateTimeZone timeZone, IDateRule dateRule, ITimeRule timeRule, PyObject selector, UniverseSettings settings=null)
 Initializes a new instance of the ScheduledUniverse class More...
 
 ScheduledUniverse (IDateRule dateRule, ITimeRule timeRule, PyObject selector, UniverseSettings settings=null)
 Initializes a new instance of the ScheduledUniverse class More...
 
override IEnumerable< SymbolSelectSymbols (DateTime utcTime, BaseDataCollection data)
 Performs universe selection using the data specified More...
 
IEnumerable< DateTime > GetTriggerTimes (DateTime startTimeUtc, DateTime endTimeUtc, MarketHoursDatabase marketHoursDatabase)
 Get an enumerator of UTC DateTimes that defines when this universe will be invoked 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...
 
virtual IEnumerable< SubscriptionRequestGetSubscriptionRequests (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...
 

Additional Inherited Members

- 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...
 
- 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

Defines a user that is fired based on a specified IDateRule and ITimeRule

Definition at line 29 of file ScheduledUniverse.cs.

Constructor & Destructor Documentation

◆ ScheduledUniverse() [1/4]

QuantConnect.Data.UniverseSelection.ScheduledUniverse.ScheduledUniverse ( DateTimeZone  timeZone,
IDateRule  dateRule,
ITimeRule  timeRule,
Func< DateTime, IEnumerable< Symbol >>  selector,
UniverseSettings  settings = null 
)

Initializes a new instance of the ScheduledUniverse class

Parameters
timeZoneThe time zone the date/time rules are in
dateRuleDate rule defines what days the universe selection function will be invoked
timeRuleTime rule defines what times on each day selected by date rule the universe selection function will be invoked
selectorSelector function accepting the date time firing time and returning the universe selected symbols
settingsUniverse settings for subscriptions added via this universe, null will default to algorithm's universe settings

Definition at line 43 of file ScheduledUniverse.cs.

◆ ScheduledUniverse() [2/4]

QuantConnect.Data.UniverseSelection.ScheduledUniverse.ScheduledUniverse ( IDateRule  dateRule,
ITimeRule  timeRule,
Func< DateTime, IEnumerable< Symbol >>  selector,
UniverseSettings  settings = null 
)

Initializes a new instance of the ScheduledUniverse class

Parameters
dateRuleDate rule defines what days the universe selection function will be invoked
timeRuleTime rule defines what times on each day selected by date rule the universe selection function will be invoked
selectorSelector function accepting the date time firing time and returning the universe selected symbols
settingsUniverse settings for subscriptions added via this universe, null will default to algorithm's universe settings

Definition at line 59 of file ScheduledUniverse.cs.

◆ ScheduledUniverse() [3/4]

QuantConnect.Data.UniverseSelection.ScheduledUniverse.ScheduledUniverse ( DateTimeZone  timeZone,
IDateRule  dateRule,
ITimeRule  timeRule,
PyObject  selector,
UniverseSettings  settings = null 
)

Initializes a new instance of the ScheduledUniverse class

Parameters
timeZoneThe time zone the date/time rules are in
dateRuleDate rule defines what days the universe selection function will be invoked
timeRuleTime rule defines what times on each day selected by date rule the universe selection function will be invoked
selectorSelector function accepting the date time firing time and returning the universe selected symbols
settingsUniverse settings for subscriptions added via this universe, null will default to algorithm's universe settings

Definition at line 72 of file ScheduledUniverse.cs.

◆ ScheduledUniverse() [4/4]

QuantConnect.Data.UniverseSelection.ScheduledUniverse.ScheduledUniverse ( IDateRule  dateRule,
ITimeRule  timeRule,
PyObject  selector,
UniverseSettings  settings = null 
)

Initializes a new instance of the ScheduledUniverse class

Parameters
dateRuleDate rule defines what days the universe selection function will be invoked
timeRuleTime rule defines what times on each day selected by date rule the universe selection function will be invoked
selectorSelector function accepting the date time firing time and returning the universe selected symbols
settingsUniverse settings for subscriptions added via this universe, null will default to algorithm's universe settings

Definition at line 90 of file ScheduledUniverse.cs.

Member Function Documentation

◆ SelectSymbols()

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

Performs universe selection using the data specified

Parameters
utcTimeThe current utc time
dataThe symbols to remain in the universe
Returns
The data that passes the filter

Implements QuantConnect.Data.UniverseSelection.Universe.

Definition at line 101 of file ScheduledUniverse.cs.

◆ GetTriggerTimes()

IEnumerable<DateTime> QuantConnect.Data.UniverseSelection.ScheduledUniverse.GetTriggerTimes ( DateTime  startTimeUtc,
DateTime  endTimeUtc,
MarketHoursDatabase  marketHoursDatabase 
)

Get an enumerator of UTC DateTimes that defines when this universe will be invoked

Parameters
startTimeUtcThe start time of the range in UTC
endTimeUtcThe end time of the range in UTC
Returns
An enumerator of UTC DateTimes that defines when this universe will be invoked

Implements QuantConnect.Data.UniverseSelection.ITimeTriggeredUniverse.

Definition at line 112 of file ScheduledUniverse.cs.


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