Skip to content

BaseScheduleRules

QuantConnect.Scheduling.BaseScheduleRules

BaseScheduleRules(
    algorithm: IAlgorithm,
    securities: SecurityManager,
    time_zone: Any,
    market_hours_database: MarketHoursDatabase,
)

Bases: Object

Base rule scheduler

Initializes a new instance of the TimeRules helper class

Parameters:

Name Type Description Default
algorithm IAlgorithm

The algorithm instance

required
securities SecurityManager

The security manager

required
time_zone Any

The algorithm's default time zone

required
market_hours_database MarketHoursDatabase

The market hours database instance to use

required

time_zone

time_zone: Any

The algorithm's default time zone

This Property is protected.

securities

securities: SecurityManager

The security manager

This Property is protected.

market_hours_database

market_hours_database: MarketHoursDatabase

The market hours database instance to use

This Property is protected.

get_market_open_close_exchange_hours

get_market_open_close_exchange_hours() -> (
    Sequence[SecurityExchangeHours]
)

Helper method to fetch the exchange hours of the securities currently in securities whose markets are not always open. If no such securities are present, falls back to US equities (SPY).

This Class is protected.

get_security_exchange_hours

get_security_exchange_hours(
    symbol: Union[Symbol, str, BaseContract, Security],
) -> SecurityExchangeHours

Helper method to fetch the security exchange hours

This Class is protected.

get_symbol

get_symbol(ticker: str) -> Symbol

This Class is protected.