Lean  $LEAN_TAG$
QuantConnect.CapacityEstimate Class Reference

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

Public Member Functions

 CapacityEstimate (IAlgorithm algorithm)
 Initializes an instance of the class. More...
 
void OnOrderEvent (OrderEvent orderEvent)
 Processes an order whenever it's encountered so that we can calculate the capacity More...
 
void UpdateMarketCapacity (bool forceProcess)
 Updates the market capacity for any Symbols that require a market update. Sometimes, after the specified

See also
_snapshotPeriod

, we take a "snapshot" (point-in-time capacity) of the portfolio's capacity. More...

 

Public Attributes

Symbol LowestCapacityAsset => _smallestAssetSymbol
 Provide a reference to the lowest capacity symbol used in scaling down the capacity for debugging. More...
 

Properties

decimal Capacity [get]
 The total capacity of the strategy at a point in time More...
 

Detailed Description

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

Any mention of dollar volume is volume in account currency, but "dollar volume" is used to maintain consistency with financial terminology and our use case of having alphas measured capacity be in USD.

Definition at line 35 of file CapacityEstimate.cs.

Constructor & Destructor Documentation

◆ CapacityEstimate()

QuantConnect.CapacityEstimate.CapacityEstimate ( IAlgorithm  algorithm)

Initializes an instance of the class.

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

Definition at line 75 of file CapacityEstimate.cs.

Member Function Documentation

◆ OnOrderEvent()

void QuantConnect.CapacityEstimate.OnOrderEvent ( OrderEvent  orderEvent)

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

Parameters
orderEventOrder event to use to calculate capacity

Definition at line 91 of file CapacityEstimate.cs.

Here is the caller graph for this function:

◆ UpdateMarketCapacity()

void QuantConnect.CapacityEstimate.UpdateMarketCapacity ( bool  forceProcess)

Updates the market capacity for any Symbols that require a market update. Sometimes, after the specified

See also
_snapshotPeriod

, we take a "snapshot" (point-in-time capacity) of the portfolio's capacity.

This result will be written into the Algorithm Statistics via the BacktestingResultHandler

Definition at line 124 of file CapacityEstimate.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ LowestCapacityAsset

Symbol QuantConnect.CapacityEstimate.LowestCapacityAsset => _smallestAssetSymbol

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

Definition at line 69 of file CapacityEstimate.cs.

Property Documentation

◆ Capacity

decimal QuantConnect.CapacityEstimate.Capacity
get

The total capacity of the strategy at a point in time

Definition at line 60 of file CapacityEstimate.cs.


The documentation for this class was generated from the following file: