Skip to content

ExceedsShortableQuantityOrderResponseErrorAnalysis

QuantConnect.Lean.Engine.Results.Analysis.Analyses.ExceedsShortableQuantityOrderResponseErrorAnalysis

Bases: BaseResultsAnalysis

Detects orders rejected because they exceed the available shortable quantity.

issue

issue: str

Gets a description of the exceeded shortable quantity issue.

weight

weight: int

Gets the priority weight for this analysis.

run

run(
    parameters: ResultsAnalysisRunParameters,
) -> Sequence[Analysis]
run(
    order_events: Sequence[OrderEvent], language: Language
) -> Sequence[Analysis]

Signature descriptions:

  • Runs the exceeds shortable quantity analysis against the provided backtest parameters.

  • Searches order events for exceeds-shortable-quantity rejection messages.

Parameters:

Name Type Description Default
order_events Optional[Sequence[OrderEvent]]

The 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 shortable quantity violations 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

create_aggregated_response(
    responses: List[Analysis],
) -> Sequence[Analysis]

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.