Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel Class Reference

Execution model that submits orders while the current market price is more favorable that the current volume weighted average price. More...

Inheritance diagram for QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel:
[legend]

Classes

class  SymbolData
 Symbol data for this Execution Model More...
 

Public Member Functions

override void Execute (QCAlgorithm algorithm, IPortfolioTarget[] targets)
 Submit orders for the specified portfolio targets. This model is free to delay or spread out these orders as it sees fit More...
 
override void OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes)
 Event fired each time the we add/remove securities from the data feed More...
 

Protected Member Functions

virtual bool IsSafeToRemove (QCAlgorithm algorithm, Symbol symbol)
 Determines if it's safe to remove the associated symbol data More...
 
virtual bool PriceIsFavorable (SymbolData data, decimal unorderedQuantity)
 Determines if the current price is better than VWAP More...
 

Properties

decimal MaximumOrderQuantityPercentVolume = 0.01m [get, set]
 Gets or sets the maximum order quantity as a percentage of the current bar's volume. This defaults to 0.01m = 1%. For example, if the current bar's volume is 100, then the maximum order size would equal 1 share. More...
 

Detailed Description

Execution model that submits orders while the current market price is more favorable that the current volume weighted average price.

Definition at line 32 of file VolumeWeightedAveragePriceExecutionModel.cs.

Member Function Documentation

◆ Execute()

override void QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel.Execute ( QCAlgorithm  algorithm,
IPortfolioTarget[]  targets 
)
virtual

Submit orders for the specified portfolio targets. This model is free to delay or spread out these orders as it sees fit

Parameters
algorithmThe algorithm instance
targetsThe portfolio targets to be ordered

Reimplemented from QuantConnect.Algorithm.Framework.Execution.ExecutionModel.

Definition at line 50 of file VolumeWeightedAveragePriceExecutionModel.cs.

Here is the call graph for this function:

◆ OnSecuritiesChanged()

override void QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel.OnSecuritiesChanged ( QCAlgorithm  algorithm,
SecurityChanges  changes 
)
virtual

Event fired each time the we add/remove securities from the data feed

Parameters
algorithmThe algorithm instance that experienced the change in securities
changesThe security additions and removals from the algorithm

Reimplemented from QuantConnect.Algorithm.Framework.Execution.ExecutionModel.

Definition at line 95 of file VolumeWeightedAveragePriceExecutionModel.cs.

Here is the call graph for this function:

◆ IsSafeToRemove()

virtual bool QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel.IsSafeToRemove ( QCAlgorithm  algorithm,
Symbol  symbol 
)
protectedvirtual

Determines if it's safe to remove the associated symbol data

Definition at line 123 of file VolumeWeightedAveragePriceExecutionModel.cs.

Here is the caller graph for this function:

◆ PriceIsFavorable()

virtual bool QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel.PriceIsFavorable ( SymbolData  data,
decimal  unorderedQuantity 
)
protectedvirtual

Determines if the current price is better than VWAP

Definition at line 132 of file VolumeWeightedAveragePriceExecutionModel.cs.

Here is the caller graph for this function:

Property Documentation

◆ MaximumOrderQuantityPercentVolume

decimal QuantConnect.Algorithm.Framework.Execution.VolumeWeightedAveragePriceExecutionModel.MaximumOrderQuantityPercentVolume = 0.01m
getset

Gets or sets the maximum order quantity as a percentage of the current bar's volume. This defaults to 0.01m = 1%. For example, if the current bar's volume is 100, then the maximum order size would equal 1 share.

Definition at line 42 of file VolumeWeightedAveragePriceExecutionModel.cs.


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