Simple Moving Average - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-01-20
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

The simple moving average (SMA) is the most basic type of moving average. It is calculated by taking the sum of a set of data points and dividing by the number of data points in the set. The formula for an SMA is:

SMA = (Sum of data over a specified number of periods) / (Number of periods)

For example, if you wanted to calculate a 10-day moving average of a stock's price, you would add up the closing prices of the stock over the past 10 days and divide by 10.