Lean  $LEAN_TAG$
QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel Class Reference

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

Inheritance diagram for QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel:
[legend]

Public Member Functions

 CompositeAlphaModel (params IAlphaModel[] alphaModels)
 Initializes a new instance of the CompositeAlphaModel class More...
 
 CompositeAlphaModel (params PyObject[] alphaModels)
 Initializes a new instance of the CompositeAlphaModel class More...
 
 CompositeAlphaModel (PyObject alphaModel)
 Initializes a new instance of the CompositeAlphaModel class More...
 
override IEnumerable< InsightUpdate (QCAlgorithm algorithm, Slice data)
 Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities. 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 AddAlpha (IAlphaModel alphaModel)
 Adds a new AlphaModel More...
 
void AddAlpha (PyObject pyAlphaModel)
 Adds a new AlphaModel More...
 
- Public Member Functions inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel
 AlphaModel ()
 Initialize new AlphaModel More...
 

Additional Inherited Members

- Properties inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel
virtual string Name [get, set]
 Defines a name for a framework model More...
 
- Properties inherited from QuantConnect.Algorithm.Framework.Alphas.INamedModel
string Name [get]
 Defines a name for a framework model More...
 

Detailed Description

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

Definition at line 29 of file CompositeAlphaModel.cs.

Constructor & Destructor Documentation

◆ CompositeAlphaModel() [1/3]

QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.CompositeAlphaModel ( params IAlphaModel[]  alphaModels)

Initializes a new instance of the CompositeAlphaModel class

Parameters
alphaModelsThe individual alpha models defining this composite model

Definition at line 37 of file CompositeAlphaModel.cs.

◆ CompositeAlphaModel() [2/3]

QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.CompositeAlphaModel ( params PyObject[]  alphaModels)

Initializes a new instance of the CompositeAlphaModel class

Parameters
alphaModelsThe individual alpha models defining this composite model

Definition at line 51 of file CompositeAlphaModel.cs.

Here is the call graph for this function:

◆ CompositeAlphaModel() [3/3]

QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.CompositeAlphaModel ( PyObject  alphaModel)

Initializes a new instance of the CompositeAlphaModel class

Parameters
alphaModelThe individual alpha model defining this composite model

Definition at line 68 of file CompositeAlphaModel.cs.

Member Function Documentation

◆ Update()

override IEnumerable<Insight> QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.Update ( QCAlgorithm  algorithm,
Slice  data 
)
virtual

Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities. This method patches this call through the each of the wrapped models.

Parameters
algorithmThe algorithm instance
dataThe new data available
Returns
The new insights generated

Reimplemented from QuantConnect.Algorithm.Framework.Alphas.AlphaModel.

Definition at line 82 of file CompositeAlphaModel.cs.

◆ OnSecuritiesChanged()

override void QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.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.Alphas.AlphaModel.

Definition at line 106 of file CompositeAlphaModel.cs.

◆ AddAlpha() [1/2]

void QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.AddAlpha ( IAlphaModel  alphaModel)

Adds a new AlphaModel

Parameters
alphaModelThe alpha model to add

Definition at line 118 of file CompositeAlphaModel.cs.

Here is the caller graph for this function:

◆ AddAlpha() [2/2]

void QuantConnect.Algorithm.Framework.Alphas.CompositeAlphaModel.AddAlpha ( PyObject  pyAlphaModel)

Adds a new AlphaModel

Parameters
pyAlphaModelThe alpha model to add

Definition at line 127 of file CompositeAlphaModel.cs.


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