Lean  $LEAN_TAG$
QuantConnect.Indicators.Alpha Class Reference

In financial analysis, the Alpha indicator is used to measure the performance of an investment (such as a stock or ETF) relative to a benchmark index, often representing the broader market. Alpha indicates the excess return of the investment compared to the return of the benchmark index. More...

Inheritance diagram for QuantConnect.Indicators.Alpha:
[legend]

Public Member Functions

 Alpha (string name, Symbol targetSymbol, Symbol referenceSymbol, int alphaPeriod, int betaPeriod, IRiskFreeInterestRateModel riskFreeRateModel)
 Creates a new Alpha indicator with the specified name, target, reference, and period values More...
 
 Alpha (string name, Symbol targetSymbol, Symbol referenceSymbol, int alphaPeriod, int betaPeriod, decimal? riskFreeRate=null)
 Creates a new Alpha indicator with the specified name, target, reference, and period values More...
 
 Alpha (Symbol targetSymbol, Symbol referenceSymbol, int alphaPeriod, int betaPeriod, decimal? riskFreeRate=null)
 Creates a new Alpha indicator with the specified target, reference, and period values More...
 
 Alpha (Symbol targetSymbol, Symbol referenceSymbol, int period, decimal? riskFreeRate=null)
 Creates a new Alpha indicator with the specified target, reference, and period value More...
 
 Alpha (string name, Symbol targetSymbol, Symbol referenceSymbol, int period, decimal? riskFreeRate=null)
 Creates a new Alpha indicator with the specified name, target, reference, and period value More...
 
 Alpha (Symbol targetSymbol, Symbol referenceSymbol, int alphaPeriod, int betaPeriod, IRiskFreeInterestRateModel riskFreeRateModel)
 Creates a new Alpha indicator with the specified target, reference, and period values More...
 
 Alpha (Symbol targetSymbol, Symbol referenceSymbol, int period, IRiskFreeInterestRateModel riskFreeRateModel)
 Creates a new Alpha indicator with the specified target, reference, and period value More...
 
 Alpha (string name, Symbol targetSymbol, Symbol referenceSymbol, int period, IRiskFreeInterestRateModel riskFreeRateModel)
 Creates a new Alpha indicator with the specified name, target, reference, and period value More...
 
 Alpha (string name, Symbol targetSymbol, Symbol referenceSymbol, int alphaPeriod, int betaPeriod, PyObject riskFreeRateModel)
 Creates a new Alpha indicator with the specified name, target, reference, and period values More...
 
 Alpha (Symbol targetSymbol, Symbol referenceSymbol, int alphaPeriod, int betaPeriod, PyObject riskFreeRateModel)
 Creates a new Alpha indicator with the specified target, reference, and period values More...
 
 Alpha (Symbol targetSymbol, Symbol referenceSymbol, int period, PyObject riskFreeRateModel)
 Creates a new Alpha indicator with the specified target, reference, and period value More...
 
 Alpha (string name, Symbol targetSymbol, Symbol referenceSymbol, int period, PyObject riskFreeRateModel)
 Creates a new Alpha indicator with the specified name, target, reference, and period value More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => _targetROC.IsReady && _beta.IsReady && _referenceROC.IsReady
 Gets a flag indicating when the indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (IBaseDataBar input)
 Computes the next value for this indicator from the given state. More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.BarIndicator
 BarIndicator (string name)
 Creates a new TradeBarIndicator with the specified name More...
 

Properties

int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

In financial analysis, the Alpha indicator is used to measure the performance of an investment (such as a stock or ETF) relative to a benchmark index, often representing the broader market. Alpha indicates the excess return of the investment compared to the return of the benchmark index.

The S P 500 index is frequently used as a benchmark in Alpha calculations to represent the overall market performance. Alpha is an essential tool for investors to understand the idiosyncratic returns of their investment that aren't caused by movement in the underlying benchmark.

Definition at line 34 of file Alpha.cs.

Constructor & Destructor Documentation

◆ Alpha() [1/12]

QuantConnect.Indicators.Alpha.Alpha ( string  name,
Symbol  targetSymbol,
Symbol  referenceSymbol,
int  alphaPeriod,
int  betaPeriod,
IRiskFreeInterestRateModel  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified name, target, reference, and period values

Parameters
nameThe name of this indicator
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator
alphaPeriodPeriod of the indicator - alpha
betaPeriodPeriod of the indicator - beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 95 of file Alpha.cs.

◆ Alpha() [2/12]

QuantConnect.Indicators.Alpha.Alpha ( string  name,
Symbol  targetSymbol,
Symbol  referenceSymbol,
int  alphaPeriod,
int  betaPeriod,
decimal?  riskFreeRate = null 
)

Creates a new Alpha indicator with the specified name, target, reference, and period values

Parameters
nameThe name of this indicator
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator
alphaPeriodPeriod of the indicator - alpha
betaPeriodPeriod of the indicator - beta
riskFreeRateThe risk free rate of this indicator for given period

Definition at line 140 of file Alpha.cs.

◆ Alpha() [3/12]

QuantConnect.Indicators.Alpha.Alpha ( Symbol  targetSymbol,
Symbol  referenceSymbol,
int  alphaPeriod,
int  betaPeriod,
decimal?  riskFreeRate = null 
)

Creates a new Alpha indicator with the specified target, reference, and period values

Parameters
targetSymbol
referenceSymbol
alphaPeriodPeriod of the indicator - alpha
betaPeriodPeriod of the indicator - beta
riskFreeRateThe risk free rate of this indicator for given period

Definition at line 153 of file Alpha.cs.

◆ Alpha() [4/12]

QuantConnect.Indicators.Alpha.Alpha ( Symbol  targetSymbol,
Symbol  referenceSymbol,
int  period,
decimal?  riskFreeRate = null 
)

Creates a new Alpha indicator with the specified target, reference, and period value

Parameters
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator
periodPeriod of the indicator - alpha and beta
riskFreeRateThe risk free rate of this indicator for given period

Definition at line 165 of file Alpha.cs.

◆ Alpha() [5/12]

QuantConnect.Indicators.Alpha.Alpha ( string  name,
Symbol  targetSymbol,
Symbol  referenceSymbol,
int  period,
decimal?  riskFreeRate = null 
)

Creates a new Alpha indicator with the specified name, target, reference, and period value

Parameters
name
targetSymbol
referenceSymbol
periodPeriod of the indicator - alpha and beta
riskFreeRateThe risk free rate of this indicator for given period

Definition at line 178 of file Alpha.cs.

◆ Alpha() [6/12]

QuantConnect.Indicators.Alpha.Alpha ( Symbol  targetSymbol,
Symbol  referenceSymbol,
int  alphaPeriod,
int  betaPeriod,
IRiskFreeInterestRateModel  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified target, reference, and period values

Parameters
targetSymbol
referenceSymbol
alphaPeriodPeriod of the indicator - alpha
betaPeriodPeriod of the indicator - beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 191 of file Alpha.cs.

◆ Alpha() [7/12]

QuantConnect.Indicators.Alpha.Alpha ( Symbol  targetSymbol,
Symbol  referenceSymbol,
int  period,
IRiskFreeInterestRateModel  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified target, reference, and period value

Parameters
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator
periodPeriod of the indicator - alpha and beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 203 of file Alpha.cs.

◆ Alpha() [8/12]

QuantConnect.Indicators.Alpha.Alpha ( string  name,
Symbol  targetSymbol,
Symbol  referenceSymbol,
int  period,
IRiskFreeInterestRateModel  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified name, target, reference, and period value

Parameters
name
targetSymbol
referenceSymbol
periodPeriod of the indicator - alpha and beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 216 of file Alpha.cs.

◆ Alpha() [9/12]

QuantConnect.Indicators.Alpha.Alpha ( string  name,
Symbol  targetSymbol,
Symbol  referenceSymbol,
int  alphaPeriod,
int  betaPeriod,
PyObject  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified name, target, reference, and period values

Parameters
nameThe name of this indicator
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator
alphaPeriodPeriod of the indicator - alpha
betaPeriodPeriod of the indicator - beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 230 of file Alpha.cs.

◆ Alpha() [10/12]

QuantConnect.Indicators.Alpha.Alpha ( Symbol  targetSymbol,
Symbol  referenceSymbol,
int  alphaPeriod,
int  betaPeriod,
PyObject  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified target, reference, and period values

Parameters
targetSymbol
referenceSymbol
alphaPeriodPeriod of the indicator - alpha
betaPeriodPeriod of the indicator - beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 243 of file Alpha.cs.

◆ Alpha() [11/12]

QuantConnect.Indicators.Alpha.Alpha ( Symbol  targetSymbol,
Symbol  referenceSymbol,
int  period,
PyObject  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified target, reference, and period value

Parameters
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator
periodPeriod of the indicator - alpha and beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 255 of file Alpha.cs.

◆ Alpha() [12/12]

QuantConnect.Indicators.Alpha.Alpha ( string  name,
Symbol  targetSymbol,
Symbol  referenceSymbol,
int  period,
PyObject  riskFreeRateModel 
)

Creates a new Alpha indicator with the specified name, target, reference, and period value

Parameters
name
targetSymbol
referenceSymbol
periodPeriod of the indicator - alpha and beta
riskFreeRateModelThe risk free rate model of this indicator

Definition at line 268 of file Alpha.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.Alpha.ComputeNextValue ( IBaseDataBar  input)
protected

Computes the next value for this indicator from the given state.

Parameters
input
Returns
Exceptions
ArgumentException

Definition at line 279 of file Alpha.cs.

◆ Reset()

override void QuantConnect.Indicators.Alpha.Reset ( )

Resets this indicator to its initial state

Definition at line 332 of file Alpha.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.Alpha.IsReady => _targetROC.IsReady && _beta.IsReady && _referenceROC.IsReady

Gets a flag indicating when the indicator is ready and fully initialized

Definition at line 84 of file Alpha.cs.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.Alpha.WarmUpPeriod
get

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 79 of file Alpha.cs.


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