Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.Risk.MaximumDrawdownPercentPortfolio Class Reference

Provides an implementation of IRiskManagementModel that limits the drawdown of the portfolio to the specified percentage. Once this is triggered the algorithm will need to be manually restarted. More...

Inheritance diagram for QuantConnect.Algorithm.Framework.Risk.MaximumDrawdownPercentPortfolio:
[legend]

Public Member Functions

 MaximumDrawdownPercentPortfolio (decimal maximumDrawdownPercent=0.05m, bool isTrailing=false)
 Initializes a new instance of the MaximumDrawdownPercentPortfolio class More...
 
override IEnumerable< IPortfolioTargetManageRisk (QCAlgorithm algorithm, IPortfolioTarget[] targets)
 Manages the algorithm's risk at each time step More...
 
- Public Member Functions inherited from QuantConnect.Algorithm.Framework.Risk.RiskManagementModel
virtual void OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes)
 Event fired each time the we add/remove securities from the data feed More...
 

Detailed Description

Provides an implementation of IRiskManagementModel that limits the drawdown of the portfolio to the specified percentage. Once this is triggered the algorithm will need to be manually restarted.

Definition at line 27 of file MaximumDrawdownPercentPortfolio.cs.

Constructor & Destructor Documentation

◆ MaximumDrawdownPercentPortfolio()

QuantConnect.Algorithm.Framework.Risk.MaximumDrawdownPercentPortfolio.MaximumDrawdownPercentPortfolio ( decimal  maximumDrawdownPercent = 0.05m,
bool  isTrailing = false 
)

Initializes a new instance of the MaximumDrawdownPercentPortfolio class

Parameters
maximumDrawdownPercentThe maximum percentage drawdown allowed for algorithm portfolio compared with starting value, defaults to 5% drawdown
isTrailingIf "false", the drawdown will be relative to the starting value of the portfolio. If "true", the drawdown will be relative the last maximum portfolio value

Definition at line 41 of file MaximumDrawdownPercentPortfolio.cs.

Member Function Documentation

◆ ManageRisk()

override IEnumerable<IPortfolioTarget> QuantConnect.Algorithm.Framework.Risk.MaximumDrawdownPercentPortfolio.ManageRisk ( QCAlgorithm  algorithm,
IPortfolioTarget[]  targets 
)
virtual

Manages the algorithm's risk at each time step

Parameters
algorithmThe algorithm instance
targetsThe current portfolio targets to be assessed for risk

Reimplemented from QuantConnect.Algorithm.Framework.Risk.RiskManagementModel.

Definition at line 52 of file MaximumDrawdownPercentPortfolio.cs.


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