Lean
$LEAN_TAG$
|
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...
Public Member Functions | |
MaximumDrawdownPercentPortfolio (decimal maximumDrawdownPercent=0.05m, bool isTrailing=false) | |
Initializes a new instance of the MaximumDrawdownPercentPortfolio class More... | |
override IEnumerable< IPortfolioTarget > | ManageRisk (QCAlgorithm algorithm, IPortfolioTarget[] targets) |
Manages the algorithm's risk at each time step More... | |
![]() | |
virtual void | OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes) |
Event fired each time the we add/remove securities from the data feed More... | |
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.
QuantConnect.Algorithm.Framework.Risk.MaximumDrawdownPercentPortfolio.MaximumDrawdownPercentPortfolio | ( | decimal | maximumDrawdownPercent = 0.05m , |
bool | isTrailing = false |
||
) |
Initializes a new instance of the MaximumDrawdownPercentPortfolio class
maximumDrawdownPercent | The maximum percentage drawdown allowed for algorithm portfolio compared with starting value, defaults to 5% drawdown |
isTrailing | If "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.
|
virtual |
Manages the algorithm's risk at each time step
algorithm | The algorithm instance |
targets | The current portfolio targets to be assessed for risk |
Reimplemented from QuantConnect.Algorithm.Framework.Risk.RiskManagementModel.
Definition at line 52 of file MaximumDrawdownPercentPortfolio.cs.