Moving averages are favored tools of active traders to measure momentum. The primary difference between a simple moving average, weighted moving average, and exponential moving average is the formula used to create the average.

Simple Moving Average

The simple moving average (SMA) was prevalent before the emergence of computers because it is easy to calculate. Today's processing power has made other types of moving averages and technical indicators easier to measure. A moving average is calculated from the average closing prices for a specified period. A moving average typically uses daily closing prices, but it can also be calculated for other timeframes. Other price data such as the opening price or the median price can also be used. At the end of the new price period, that data is added to the calculation while the oldest price data in the series is eliminated.

For a simple moving average, the formula is the sum of the data points over a given period divided by the number of periods. For example, the closing prices of Apple Inc (AAPL) from June 20 to 26, 2014, were as follows:

A five-period moving average, based on the prices above, would be calculated using the following formula:

﻿\begin{aligned} &\text{MA} = \frac{ P_1 + P_2 + P_3 + P_4 + P_5 }{ 5 } \\ &\textbf{where:} \\ &P_n = \text{Price for time period} \\ \end{aligned}﻿

or:

﻿\begin{aligned} &\frac{ 90.90 + 90.36 + 90.28 + 90.83 + 90.91 }{ 5 } = 90.656 \\ \end{aligned}﻿

The equation above shows that the average price over the period listed was 90.66. Using moving averages is an effective method for eliminating strong price fluctuations. The key limitation is that data points from older data are not weighted any differently than data points near the beginning of the data set. This is where weighted moving averages come into play. Weighted Moving Average Weighted moving averages assign a heavier weighting to more current data points since they are more relevant than data points in the distant past. The sum of the weighting should add up to 1 (or 100 percent). In the case of the simple moving average, the weightings are equally distributed, which is why they are not shown in the table above. For example: The weighted average is calculated by multiplying the given price by its associated weighting and totaling the values. The formula for the WMA is as follows: ﻿\begin{aligned} &\text{WMA} = \frac{ \text{Price}_1 \times n + \text{Price}_2 \times ( n - 1 ) + \cdots \text{ Price}_n }{ \frac{ n \times ( n + 1 ) }{ 2} } \\ &\textbf{where:} \\ &n = \text{Time period} \\ \end{aligned}﻿ The denominator of the WMA is the sum of the number of price periods as a triangular number. In the example from the table above, the weighted five-day moving average would be90.62:

﻿\begin{aligned} & \left ( 90.90 \times \frac{ 5 }{ 15 } \right )\ +\ \left ( 90.36 \times \frac{ 4 }{ 15 } \right )\ +\ \left ( 90.28 \times \frac{ 3 }{ 15 } \right )\ +\ \left ( 90.83 \times \frac{ 2 }{ 15 } \right )\ +\ \left ( 90.91 \times \frac{ 1 }{ 15 } \right ) = \90.62 \\ \end{aligned}﻿

In this example, the recent data point was given the highest weighting out of an arbitrary 15 points. You can weigh the values out of any value you see fit. The lower value from the weighted average above relative to the simple average suggests that recent selling pressure could be more significant than some traders anticipate. For most traders, the most popular choice when using weighted moving averages is to use a higher weighting for recent values. (For more information, see: Moving Average Tutorial.)

Exponential Moving Averages

Exponential moving averages (EMAs) are also weighted toward the most recent prices, but the rate of decrease between one price and its preceding price is not consistent. The difference in the decrease is exponential. Rather than every preceding weight being 1.0 smaller than the weight in front of it, there might be a difference between the first two period weights of 1.0, a difference of 1.2 for the two periods after those periods, and so on. The formula for EMA is