Skip to content

CapacityEstimate

QuantConnect.CapacityEstimate

CapacityEstimate(algorithm: IAlgorithm)

Bases: Object

Estimates dollar volume capacity of algorithm (in account currency) using all Symbols in the portfolio.

Initializes an instance of the class.

Parameters:

Name Type Description Default
algorithm IAlgorithm

Used to get data at the current time step and access the portfolio state

required

capacity

capacity: float

The total capacity of the strategy at a point in time

lowest_capacity_asset

lowest_capacity_asset: Symbol

Provide a reference to the lowest capacity symbol used in scaling down the capacity for debugging.

on_order_event

on_order_event(order_event: OrderEvent) -> None

Processes an order whenever it's encountered so that we can calculate the capacity

Parameters:

Name Type Description Default
order_event OrderEvent

Order event to use to calculate capacity

required

update_market_capacity

update_market_capacity(force_process: bool) -> None