Skip to content

IHistoryProvider

QuantConnect.Interfaces.IHistoryProvider

Bases: IDataProviderEvents

Provides historical data to an algorithm at runtime

data_point_count

data_point_count: int

Gets the total number of data points emitted by this history provider

invalid_configuration_detected

invalid_configuration_detected: _EventContainer[
    Callable[
        [Object, InvalidConfigurationDetectedEventArgs], Any
    ],
    Any,
]

Event fired when an invalid configuration has been detected

numerical_precision_limited

numerical_precision_limited: _EventContainer[
    Callable[
        [Object, NumericalPrecisionLimitedEventArgs], Any
    ],
    Any,
]

Event fired when the numerical precision in the factor file has been limited

download_failed

download_failed: _EventContainer[
    Callable[[Object, DownloadFailedEventArgs], Any], Any
]

Event fired when there was an error downloading a remote file

reader_error_detected

reader_error_detected: _EventContainer[
    Callable[[Object, ReaderErrorDetectedEventArgs], Any],
    Any,
]

Event fired when there was an error reading the data

start_date_limited

start_date_limited: _EventContainer[
    Callable[[Object, StartDateLimitedEventArgs], Any], Any
]

Event fired when the start date has been limited

get_history

get_history(
    requests: List[HistoryRequest], slice_time_zone: Any
) -> Iterable[Slice]

Gets the history for the requested securities

Parameters:

Name Type Description Default
requests List[HistoryRequest]

The historical data requests

required
slice_time_zone Any

The time zone used when time stamping the slice instances

required

Returns:

Type Description
Iterable[Slice]

An enumerable of the slices of data covering the span specified in each request.

initialize

initialize(
    parameters: HistoryProviderInitializeParameters,
) -> None

Initializes this history provider to work for the specified job

Parameters:

Name Type Description Default
parameters HistoryProviderInitializeParameters

The initialization parameters

required