Lean  $LEAN_TAG$
QuantConnect.Indicators.Beta Class Reference

In technical analysis Beta indicator is used to measure volatility or risk of a target (ETF) relative to the overall risk (volatility) of the reference (market indexes). The Beta indicators compares target's price movement to the movements of the indexes over the same period of time. More...

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

Public Member Functions

 Beta (string name, int period, Symbol targetSymbol, Symbol referenceSymbol)
 Creates a new Beta indicator with the specified name, period, target and reference values More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => _targetDataPoints.Samples >= WarmUpPeriod && _referenceDataPoints.Samples >= WarmUpPeriod
 Gets a flag indicating when the indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (TradeBar input)
 Computes the next value for this indicator from the given state. More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.TradeBarIndicator
 TradeBarIndicator (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 technical analysis Beta indicator is used to measure volatility or risk of a target (ETF) relative to the overall risk (volatility) of the reference (market indexes). The Beta indicators compares target's price movement to the movements of the indexes over the same period of time.

It is common practice to use the SPX index as a benchmark of the overall reference market when it comes to Beta calculations.

Definition at line 30 of file Beta.cs.

Constructor & Destructor Documentation

◆ Beta()

QuantConnect.Indicators.Beta.Beta ( string  name,
int  period,
Symbol  targetSymbol,
Symbol  referenceSymbol 
)

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

Parameters
nameThe name of this indicator
periodThe period of this indicator
targetSymbolThe target symbol of this indicator
referenceSymbolThe reference symbol of this indicator

Definition at line 85 of file Beta.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.Beta.ComputeNextValue ( TradeBar  input)
protected

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

As this indicator is receiving data points from two different symbols, it's going to compute the next value when the amount of data points of each of them is the same. Otherwise, it will return the last beta value computed

Parameters
inputThe input value of this indicator on this time step. It can be either from the target or the reference symbol
Returns
The beta value of the target used in relation with the reference

Definition at line 117 of file Beta.cs.

Here is the call graph for this function:

◆ Reset()

override void QuantConnect.Indicators.Beta.Reset ( )

Resets this indicator to its initial state

Definition at line 171 of file Beta.cs.

Here is the call graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.Beta.IsReady => _targetDataPoints.Samples >= WarmUpPeriod && _referenceDataPoints.Samples >= WarmUpPeriod

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

Definition at line 75 of file Beta.cs.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.Beta.WarmUpPeriod
get

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

Definition at line 70 of file Beta.cs.


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