OrderFillsDuringExtendedMarketHoursAnalysis
QuantConnect.Lean.Engine.Results.Analysis.Analyses.OrderFillsDuringExtendedMarketHoursAnalysis
Bases: BaseResultsAnalysis
Detects order fills that occurred outside regular market hours.
issue
issue: str
Gets the description of the extended market hours fill issue.
weight
weight: int
Gets the severity weight for the extended market hours analysis.
run
run(
parameters: ResultsAnalysisRunParameters,
) -> Sequence[Analysis]
run(
algorithm: QCAlgorithm,
order_events: Sequence[OrderEvent],
language: Language,
) -> Sequence[Analysis]
Signature descriptions:
-
Runs the extended market hours order fill analysis against the provided backtest parameters.
-
Iterates filled order events and flags those that occurred when the exchange was not open.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
algorithm
|
Optional[QCAlgorithm]
|
The algorithm instance used to check market-open status at the fill time. |
None
|
order_events
|
Optional[Sequence[OrderEvent]]
|
The list of order events from the backtest result. |
None
|
language
|
Optional[Language]
|
The programming language the algorithm is written in. |
None
|
Returns:
| Type | Description |
|---|---|
Sequence[Analysis]
|
Analysis results when fills outside regular hours are detected. |
single_response
single_response(
sample: Any, solutions: Sequence[str] = None
) -> Sequence[Analysis]
single_response(
sample: Any,
count: Optional[int],
solutions: Sequence[str] = None,
) -> Sequence[Analysis]
Wraps a single QuantConnect.Analysis in a one-element read-only list.
create_aggregated_response
Filters responses to those with solutions, prefixes the class name, and returns a flat list.
This codeEntityType is protected.
format_code
format_code(code: str, language: Language) -> str
Formats the specified code string according to the conventions of the given programming language.
This codeEntityType is protected.