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

Alpha model that uses an EMA cross to create insights More...

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

Classes

class  SymbolData
 Contains data specific to a symbol required by this model More...
 

Public Member Functions

 EmaCrossAlphaModel (int fastPeriod=12, int slowPeriod=26, Resolution resolution=Resolution.Daily)
 Initializes a new instance of the EmaCrossAlphaModel 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 More...
 
override void OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes)
 Event fired each time the we add/remove securities from the data feed More...
 
- Public Member Functions inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel
 AlphaModel ()
 Initialize new AlphaModel More...
 

Protected Attributes

readonly Dictionary< Symbol, SymbolDataSymbolDataBySymbol
 This is made protected for testing purposes 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

Alpha model that uses an EMA cross to create insights

Definition at line 28 of file EmaCrossAlphaModel.cs.

Constructor & Destructor Documentation

◆ EmaCrossAlphaModel()

QuantConnect.Algorithm.Framework.Alphas.EmaCrossAlphaModel.EmaCrossAlphaModel ( int  fastPeriod = 12,
int  slowPeriod = 26,
Resolution  resolution = Resolution.Daily 
)

Initializes a new instance of the EmaCrossAlphaModel class

Parameters
fastPeriodThe fast EMA period
slowPeriodThe slow EMA period
resolutionThe resolution of data sent into the EMA indicators

Definition at line 46 of file EmaCrossAlphaModel.cs.

Member Function Documentation

◆ Update()

override IEnumerable<Insight> QuantConnect.Algorithm.Framework.Alphas.EmaCrossAlphaModel.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

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

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

Definition at line 67 of file EmaCrossAlphaModel.cs.

Here is the call graph for this function:

◆ OnSecuritiesChanged()

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

Definition at line 102 of file EmaCrossAlphaModel.cs.

Here is the call graph for this function:

Member Data Documentation

◆ SymbolDataBySymbol

readonly Dictionary<Symbol, SymbolData> QuantConnect.Algorithm.Framework.Alphas.EmaCrossAlphaModel.SymbolDataBySymbol
protected

This is made protected for testing purposes

Definition at line 38 of file EmaCrossAlphaModel.cs.


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