Skip to content

UniverseSettings

QuantConnect.Data.UniverseSelection.UniverseSettings

UniverseSettings(
    resolution: Resolution,
    leverage: float,
    fill_forward: bool,
    extended_market_hours: bool,
    minimum_time_in_universe: timedelta,
    data_normalization_mode: DataNormalizationMode = ...,
    data_mapping_mode: DataMappingMode = ...,
    contract_depth_offset: int = 0,
    asynchronous: Optional[bool] = None,
    selection_date_rule: IDateRule = None,
)
UniverseSettings(universe_settings: UniverseSettings)

Bases: Object

Defines settings required when adding a subscription

Initializes a new instance of the UniverseSettings class

Parameters:

Name Type Description Default
resolution Optional[Resolution]

The resolution

None
leverage Optional[float]

The leverage to be used

None
fill_forward Optional[bool]

True to fill data forward, false otherwise

None
extended_market_hours Optional[bool]

True to allow extended market hours data, false otherwise

None
minimum_time_in_universe Optional[timedelta]

Defines the minimum amount of time a security must remain in the universe before being removed

None
data_normalization_mode Optional[DataNormalizationMode]

Defines how universe data is normalized before being send into the algorithm

...
data_mapping_mode Optional[DataMappingMode]

The contract mapping mode to use for the security

...
contract_depth_offset Optional[int]

The continuous contract desired offset from the current front month.

0
asynchronous Optional[Optional[bool]]

True if universe selection can run asynchronous

None
selection_date_rule Optional[IDateRule]

If provided, will be used to determine universe selection schedule

None

resolution

resolution: Resolution

The resolution to be used

leverage

leverage: float

The leverage to be used

fill_forward

fill_forward: bool

True to fill data forward, false otherwise

schedule

schedule: Schedule

If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

extended_market_hours

extended_market_hours: bool

True to allow extended market hours data, false otherwise

minimum_time_in_universe

minimum_time_in_universe: timedelta

Defines the minimum amount of time a security must be in the universe before being removed.

data_normalization_mode

data_normalization_mode: DataNormalizationMode

Defines how universe data is normalized before being send into the algorithm

data_mapping_mode

data_mapping_mode: DataMappingMode

Defines how universe data is mapped together

contract_depth_offset

contract_depth_offset: int

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

subscription_data_types

subscription_data_types: List[Tuple[Type, TickType]]

Allows a universe to specify which data types to add for a selected symbol

asynchronous

asynchronous: Optional[bool]

True if universe selection can run asynchronous