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

Provides an implementation of Universe that wraps a PyObject object More...

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

Public Member Functions

 UniversePythonWrapper (PyObject universe)
 Initializes a new instance of the UniversePythonWrapper class More...
 
override IEnumerable< SymbolSelectSymbols (DateTime utcTime, BaseDataCollection data)
 Performs universe selection using the data specified More...
 
override IEnumerable< SubscriptionRequestGetSubscriptionRequests (Security security, DateTime currentTimeUtc, DateTime maximumEndTimeUtc, ISubscriptionDataConfigService subscriptionService)
 Gets the subscription requests to be added for the specified security 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...
 

Properties

override UniverseSettings UniverseSettings [get, set]
 Gets the settings used for subscriptions added for this universe More...
 
override bool DisposeRequested [get, protected set]
 Flag indicating if disposal of this universe has been requested More...
 
override SubscriptionDataConfig Configuration [get]
 Gets the configuration used to get universe data More...
 
override ConcurrentDictionary< Symbol, MemberSecurities [get]
 Gets the internal security collection used to define membership in this universe 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...
 

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...
 
- Events inherited from QuantConnect.Data.UniverseSelection.Universe
EventHandler SelectionChanged
 Event fired when the universe selection has changed More...
 

Detailed Description

Provides an implementation of Universe that wraps a PyObject object

Definition at line 28 of file UniversePythonWrapper.cs.

Constructor & Destructor Documentation

◆ UniversePythonWrapper()

QuantConnect.Data.UniverseSelection.UniversePythonWrapper.UniversePythonWrapper ( PyObject  universe)

Initializes a new instance of the UniversePythonWrapper class

Definition at line 87 of file UniversePythonWrapper.cs.

Member Function Documentation

◆ SelectSymbols()

override IEnumerable<Symbol> QuantConnect.Data.UniverseSelection.UniversePythonWrapper.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 98 of file UniversePythonWrapper.cs.

◆ GetSubscriptionRequests()

override IEnumerable<SubscriptionRequest> QuantConnect.Data.UniverseSelection.UniversePythonWrapper.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 111 of file UniversePythonWrapper.cs.

Property Documentation

◆ UniverseSettings

override UniverseSettings QuantConnect.Data.UniverseSelection.UniversePythonWrapper.UniverseSettings
getset

Gets the settings used for subscriptions added for this universe

Definition at line 36 of file UniversePythonWrapper.cs.

◆ DisposeRequested

override bool QuantConnect.Data.UniverseSelection.UniversePythonWrapper.DisposeRequested
getprotected set

Flag indicating if disposal of this universe has been requested

Definition at line 51 of file UniversePythonWrapper.cs.

◆ Configuration

override SubscriptionDataConfig QuantConnect.Data.UniverseSelection.UniversePythonWrapper.Configuration
get

Gets the configuration used to get universe data

Definition at line 66 of file UniversePythonWrapper.cs.

◆ Securities

override ConcurrentDictionary<Symbol, Member> QuantConnect.Data.UniverseSelection.UniversePythonWrapper.Securities
get

Gets the internal security collection used to define membership in this universe

Definition at line 77 of file UniversePythonWrapper.cs.


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