7.00.02 - Background - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Aster Analytics
Release Number
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
English (United States)

A Simple Moving Average (SMA) is the unweighted mean of the previous n data points. For example, a 10-day simple moving average of closing price is the mean of closing prices for the previous 10 days.

To calculate the SMA:
  1. Compute the arithmetic average of first R rows, as specified by the Window_Size argument, N.
  2. For each subsequent row, compute new value as:

    new_smavg = old_smavg - (PM-n-PM) / N