Lean
$LEAN_TAG$
|
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...
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... | |
![]() | |
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... | |
![]() | |
int | WarmUpPeriod [get] |
Required period, in data points, for the indicator to be ready and fully initialized. More... | |
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.
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
name | The name of this indicator |
period | The period of this indicator |
targetSymbol | The target symbol of this indicator |
referenceSymbol | The reference symbol of this indicator |
|
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
input | The input value of this indicator on this time step. It can be either from the target or the reference symbol |
Definition at line 117 of file Beta.cs.
override void QuantConnect.Indicators.Beta.Reset | ( | ) |
override bool QuantConnect.Indicators.Beta.IsReady => _targetDataPoints.Samples >= WarmUpPeriod && _referenceDataPoints.Samples >= WarmUpPeriod |
|
get |