C# Class Akka.Cluster.EWMA

The exponentially weighted moving average (EWMA) approach captures short-term movements in volatility for a conditional volatility forecasting model. By virtue of its alpha, or decay factor, this provides a statistical streaming data model that is exponentially biased towards newer entries. http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average An EWMA only needs the most recent forecast value to be kept, as opposed to a standard moving average model. INTERNAL API @param alpha decay factor, sets how quickly the exponential weighting decays for past data compared to new data, see http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average @param value the current exponentially weighted moving average, e.g. Y(n - 1), or, the sampled value resulting from the previous smoothing iteration. This value is always used as the previous EWMA to calculate the new EWMA.
Mostra file Open project: rogeralsing/akka.net Class Usage Examples

Public Methods

Method Description
CalculateAlpha ( System.TimeSpan halfLife, System.TimeSpan collectInterval ) : double

Calculate the alpha (decay factor) used in EWMA from specified half-life and interval between observations. Half-life is the interval over which the weights decrease by a factor of two. The relevance of each data sample is halved for every passing half-life duration, i.e. after 4 times the half-life, a data sample's relevance is reduced to 6% of its original relevance. The initial relevance of a data sample is given by 1 – 0.5 ^ (collect-interval / half-life).

EWMA ( double value, double alpha ) : System
operator ( ) : EWMA

Method Details

CalculateAlpha() public static method

Calculate the alpha (decay factor) used in EWMA from specified half-life and interval between observations. Half-life is the interval over which the weights decrease by a factor of two. The relevance of each data sample is halved for every passing half-life duration, i.e. after 4 times the half-life, a data sample's relevance is reduced to 6% of its original relevance. The initial relevance of a data sample is given by 1 – 0.5 ^ (collect-interval / half-life).
public static CalculateAlpha ( System.TimeSpan halfLife, System.TimeSpan collectInterval ) : double
halfLife System.TimeSpan
collectInterval System.TimeSpan
return double

EWMA() public method

public EWMA ( double value, double alpha ) : System
value double
alpha double
return System

operator() public static method

public static operator ( ) : EWMA
return EWMA