Evaluates the (
-day) Exponentially Weighted Moving Average (EWMA) of a time
series provided where
is the length of the time series array which is provided as a
parameter, for all periods for which sufficient data is provided.
|Visual Basic (Usage)||Copy Code|
Dim seriesName As String
Dim s As Series
Dim smoothingFactor As Double
Dim lengthOfMA As Integer
Dim value As Series
value = StatisticalEngine.ExponentiallyWeightedMovingAverage(seriesName, s, smoothingFactor, lengthOfMA)
- The name of the series which will be displayed on the chart, i.e. its label.
- A statistical series.
- The number between 0 and 1 which is known as a smoothing factor.
The closer the value is to zero the more influence more resent measurements
will have on the EWMA.
- The number of periods over which the moving average is evaluated
for each period.
A series where the first term is the EWMA for the most recent period,
the second term is the EWMA for the previous period and so on.
|ArgumentException||Thrown if the Series is empty or if the value
given for the smoothing factor lies outside the closed range [0,1].|