ExponentialMovAvg - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

The ExponentialMovAvg function computes the exponential moving average of a time series. The exponential moving average applies a damping factor, alpha, that exponentially decreases the weights of older values. This technique gives much more weight to recent observations, while retaining older observations.

The ExponentialMovAvg function computes the arithmetic average of the first n rows and then, for each subsequent row, computes the new value with this formula:

new_emavg = alpha * new_value + (1 - alpha) * old_emavg

The initial value of old_emavg is the arithmetic average of the first n rows.