# Simple Moving Average

## Contents

## Description

The Simple Moving Average is one of the most common smoothing functions used on time series data. It takes one parameter, the period n. Larger values for n will have a greater smoothing effect on the input data but will also create more lag.

In financial applications a simple moving average (SMA) is the unweighted mean of the previous n data. An example of a simple equally weighted running mean for a n-day sample of closing price is the mean of the previous n days' closing prices, with the formula being:

## Syntax