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

Provides an implementation of IRiskManagementModel that combines multiple risk models into a single risk management model and properly sets each insights 'SourceModel' property. More...

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

Public Member Functions

 CompositeRiskManagementModel (params IRiskManagementModel[] riskManagementModels)
 Initializes a new instance of the CompositeRiskManagementModel class More...
 
 CompositeRiskManagementModel (IEnumerable< IRiskManagementModel >riskManagementModels)
 Initializes a new instance of the CompositeRiskManagementModel class More...
 
 CompositeRiskManagementModel (params PyObject[] riskManagementModels)
 Initializes a new instance of the CompositeRiskManagementModel class More...
 
 CompositeRiskManagementModel (PyObject riskManagementModel)
 Initializes a new instance of the CompositeRiskManagementModel class More...
 
override IEnumerable< IPortfolioTargetManageRisk (QCAlgorithm algorithm, IPortfolioTarget[] targets)
 Manages the algorithm's risk at each time step. This method patches this call through the each of the wrapped models. More...
 
override void OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes)
 Event fired each time the we add/remove securities from the data feed. This method patches this call through the each of the wrapped models. More...
 
void AddRiskManagement (IRiskManagementModel riskManagementModel)
 Adds a new IRiskManagementModel instance More...
 
void AddRiskManagement (PyObject pyRiskManagementModel)
 Adds a new IRiskManagementModel instance More...
 

Detailed Description

Provides an implementation of IRiskManagementModel that combines multiple risk models into a single risk management model and properly sets each insights 'SourceModel' property.

Definition at line 30 of file CompositeRiskManagementModel.cs.

Constructor & Destructor Documentation

◆ CompositeRiskManagementModel() [1/4]

QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.CompositeRiskManagementModel ( params IRiskManagementModel[]  riskManagementModels)

Initializes a new instance of the CompositeRiskManagementModel class

Parameters
riskManagementModelsThe individual risk management models defining this composite model

Definition at line 38 of file CompositeRiskManagementModel.cs.

◆ CompositeRiskManagementModel() [2/4]

QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.CompositeRiskManagementModel ( IEnumerable< IRiskManagementModel riskManagementModels)

Initializes a new instance of the CompositeRiskManagementModel class

Parameters
riskManagementModelsThe individual risk management models defining this composite model

Definition at line 52 of file CompositeRiskManagementModel.cs.

Here is the call graph for this function:

◆ CompositeRiskManagementModel() [3/4]

QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.CompositeRiskManagementModel ( params PyObject[]  riskManagementModels)

Initializes a new instance of the CompositeRiskManagementModel class

Parameters
riskManagementModelsThe individual risk management models defining this composite model

Definition at line 69 of file CompositeRiskManagementModel.cs.

Here is the call graph for this function:

◆ CompositeRiskManagementModel() [4/4]

QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.CompositeRiskManagementModel ( PyObject  riskManagementModel)

Initializes a new instance of the CompositeRiskManagementModel class

Parameters
riskManagementModelThe individual risk management model defining this composite model

Definition at line 86 of file CompositeRiskManagementModel.cs.

Member Function Documentation

◆ ManageRisk()

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

Manages the algorithm's risk at each time step. This method patches this call through the each of the wrapped models.

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

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

Definition at line 99 of file CompositeRiskManagementModel.cs.

◆ OnSecuritiesChanged()

override void QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.OnSecuritiesChanged ( QCAlgorithm  algorithm,
SecurityChanges  changes 
)
virtual

Event fired each time the we add/remove securities from the data feed. This method patches this call through the each of the wrapped models.

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

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

Definition at line 119 of file CompositeRiskManagementModel.cs.

◆ AddRiskManagement() [1/2]

void QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.AddRiskManagement ( IRiskManagementModel  riskManagementModel)

Adds a new IRiskManagementModel instance

Parameters
riskManagementModelThe risk management model to add

Definition at line 131 of file CompositeRiskManagementModel.cs.

Here is the caller graph for this function:

◆ AddRiskManagement() [2/2]

void QuantConnect.Algorithm.Framework.Risk.CompositeRiskManagementModel.AddRiskManagement ( PyObject  pyRiskManagementModel)

Adds a new IRiskManagementModel instance

Parameters
pyRiskManagementModelThe risk management model to add

Definition at line 140 of file CompositeRiskManagementModel.cs.


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