Exponential Moving Average - Teradata® Database

Database Analytic Functions

Product
Teradata® Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/wnd1589838592459.ditamap
dita:ditavalPath
Teradata_Vantage™___Advanced_SQL_Engine_Analytic_Functions.withLogo_upload_July2021/ayr1485454803741.ditaval
dita:id
B035-1206
lifecycle
previous
Product Category
Teradata Vantage™

Exponential moving average (EMA), or exponentially weighted moving average (EWMA), 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.

With MAvgType ('E'), the MovingAverage function uses this procedure:
  1. Compute the arithmetic average of the first n rows.

    The value n is specified by the StartRows syntax element.

  2. For each subsequent row, compute the new exponential moving average value with this formula:

    EMAM = alpha * V + (1 - alpha) * EMAM-1

    The value alpha is specified by the Alpha syntax element. V is the new value.