FakeHistoryProvider
QuantConnect.Lean.Engine.HistoricalData.FakeHistoryProvider
Bases: HistoryProviderBase
Provides FAKE implementation of IHistoryProvider used for testing. FakeDataQueue
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 |
on_download_failed
on_download_failed(e: DownloadFailedEventArgs) -> None
Event invocator for the download_failed event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
DownloadFailedEventArgs
|
Event arguments for the download_failed event |
required |
on_invalid_configuration_detected
on_invalid_configuration_detected(
e: InvalidConfigurationDetectedEventArgs,
) -> None
Event invocator for the invalid_configuration_detected event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
InvalidConfigurationDetectedEventArgs
|
Event arguments for the invalid_configuration_detected event |
required |
on_numerical_precision_limited
on_numerical_precision_limited(
e: NumericalPrecisionLimitedEventArgs,
) -> None
Event invocator for the numerical_precision_limited event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
NumericalPrecisionLimitedEventArgs
|
Event arguments for the numerical_precision_limited event |
required |
on_reader_error_detected
on_reader_error_detected(
e: ReaderErrorDetectedEventArgs,
) -> None
Event invocator for the reader_error_detected event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
ReaderErrorDetectedEventArgs
|
Event arguments for the reader_error_detected event |
required |
on_start_date_limited
on_start_date_limited(e: StartDateLimitedEventArgs) -> None
Event invocator for the start_date_limited event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
StartDateLimitedEventArgs
|
Event arguments for the start_date_limited event |
required |