Lean
$LEAN_TAG$
|
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
, 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... | |
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.
QuantConnect.CapacityEstimate.CapacityEstimate | ( | IAlgorithm | algorithm | ) |
Initializes an instance of the class.
algorithm | Used to get data at the current time step and access the portfolio state |
Definition at line 75 of file CapacityEstimate.cs.
void QuantConnect.CapacityEstimate.OnOrderEvent | ( | OrderEvent | orderEvent | ) |
Processes an order whenever it's encountered so that we can calculate the capacity
orderEvent | Order event to use to calculate capacity |
Definition at line 91 of file CapacityEstimate.cs.
void QuantConnect.CapacityEstimate.UpdateMarketCapacity | ( | bool | forceProcess | ) |
Updates the market capacity for any Symbols that require a market update. Sometimes, after the specified
, 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.
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.
|
get |
The total capacity of the strategy at a point in time
Definition at line 60 of file CapacityEstimate.cs.