UniverseExtensions
QuantConnect.Data.UniverseSelection.UniverseExtensions
Bases: Object
Provides extension methods for the Universe class
chained_to
Creates a new universe that logically is the result of wiring the two universes together such that the first will produce subscriptions for the second and the second will only select on data that has passed the first.
NOTE: The first and second universe instances provided to this method should not be manually added to the algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
first
|
Universe
|
The first universe in this 'chain' |
required |
second
|
Universe
|
The second universe in this 'chain' |
required |
configuration_per_symbol
|
bool
|
True if each symbol as its own configuration, false otherwise |
required |
Returns:
| Type | Description |
|---|---|
Universe
|
A new universe that can be added to the algorithm that represents invoking the first universe and then the second universe using the outputs of the first. |
create_symbol
create_symbol(
security_type: SecurityType, market: str, ticker: str
) -> Symbol
Creates a universe symbol
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
security_type
|
SecurityType
|
The security |
required |
market
|
str
|
The market |
required |
ticker
|
str
|
The Universe ticker |
required |
Returns:
| Type | Description |
|---|---|
Symbol
|
A symbol for user defined universe of the specified security type and market. |
prefilter_using
Creates a new universe that restricts the universe selection data to symbols that passed the first universe's selection critera
NOTE: The second universe instance provided to this method should not be manually added to the algorithm. The first should still be manually (assuming no other changes).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
second
|
Universe
|
The universe to be filtere |
required |
first
|
Universe
|
The universe providing the set of symbols used for filtered |
required |
Returns:
| Type | Description |
|---|---|
Universe
|
A new universe that can be added to the algorithm that represents invoking the second using the selections from the first as a filter. |
run_universe_downloader
run_universe_downloader(
data_downloader: IDataDownloader,
universe_download_parameters: DataUniverseDownloaderGetParameters,
) -> None
Processes the universe download based on parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_downloader
|
IDataDownloader
|
The data downloader instance. |
required |
universe_download_parameters
|
DataUniverseDownloaderGetParameters
|
The parameters for universe downloading. |
required |