Moving Average
Moving Average also called Rolling average, is simply the mean or average of the specified data field for a given set of consecutive periods. As new data becomes available, the mean of the data is computed by dropping the oldest value and adding the latest one. So, in essence the mean or average is rolling along with the data, and hence the name ‘Moving Average’.
While calculating a simple moving average (SMA), a parameter ‘n’ is chosen, which denotes the rolling window for which the SMA is to be calculated.
An example for calculating the moving average is as follows:
Let us assume a window of 10, n = 10:
Sr. No |
Data |
Simple Moving Average (SMA) |
Data points used |
1 |
20 |
-na- |
|
2 |
25 |
-na- |
|
3 |
29 |
-na- |
|
4 |
12 |
-na- |
|
5 |
29 |
-na- |
|
6 |
35 |
-na- |
|
7 |
15 |
-na- |
|
8 |
10 |
-na- |
|
9 |
9 |
-na- |
|
10 |
15 |
19.9 |
Simple average from data point 1 to data point 10 |
11 |
26 |
20.5 |
Simple average from data point 2 to data point 11 |
12 |
35 |
21.5 |
Simple average from data point 3 to data point 12 |
13 |
9 |
19.5 |
Simple average from data point 4 to data point 13 |
14 |
45 |
22.8 |
Simple average from data point 5 to data point 14 |
15 |
60 |
25.9 |
Simple average from data point 6 to data point 15 |
A moving average is a technical indicator commonly used with time series data to smoothen the short-term fluctuations and reduce the temporary variation in data. There are three popular types of moving averages available to analyze the market data: Simple Moving Average, Exponential Moving Average, and Weighted Moving Average. There are also several technical analysis tools based on the usage of moving average such as Bollinger Band, Moving Average Crossover, and Moving average convergence divergence (MACD).