How to Use Moving Averages Part -I

By | February 20, 2016

Introduction

The Moving Average is one of the classical and most reliable tool for technical  analysis.A Moving Average is an indicator that shows the average value of a security’s price over a period of time. When calculating a moving average, a mathematical analysis of the security’s average value over a predetermined time period is made. As the security’s price changes, its average price moves up or down. Moving averages can be calculated on any data series including a security’s open, high, low, close, volume, or another indicator. The critical element in a moving average is the number of time periods used in calculating the average. The key is to find a moving average that will be consistently profitable.

There are two popular types of moving averages:

  1. Simple Moving Average (SMA)
  2. Exponential Moving Average (EMA)

The only significant difference between the EMA and SMA is the weight assigned to the most recent data.

  • Simple moving averages apply equal weight to the prices.
  • Exponential moving averages apply more weight to recent prices.

GDX Daily chart is shown below with a 20 Day moving average in red and 50 Day Exponential Moving Average in Blue.

GDX
Calculation for SMA

A “Simple” moving average is calculated by adding the security’s price for the most recent “n” time period and then diving by “n”. SMA is lagging moving average.

For Eg. 5-day simple moving average is the five day sum of closing prices divided by five.

Daily Closing Prices: 101,102,103,104,105,106,107

First day of 5-day SMA: (101 + 102 + 103 + 104 + 105) / 5 = 103

Second day of 5-day SMA: (102 + 103 + 104 + 105 + 106) / 5 = 104

Third day of 5-day SMA: (103 + 104 + 105 + 106 + 107) / 5 = 105

In the above example we have shown 5 SMA on daily chart of XOP, Note as SMA is lagging moving average so it do show whipsaw. To avoid whipsaw we use EMA.

XOP

 

 

Calculation for EMA

“Exponential” moving averages reduce the lag by applying more weight to recent prices. The weighting applied to the most recent price depends on the number of periods in the moving average.

Steps to calculating an exponential moving average:

  1. Calculate the simple moving average.
  2. Calculate the weighting multiplier.
  3. Calculate the exponential moving average.

Lets take an example of how to calculate 5 EMA:

SMA: 5 period sum / 5

Multiplier: (2 / (Time periods + 1) ) = (2 / (5 + 1) ) = 0.33 (33.33%)

EMA: {Close – EMA(previous day)} x multiplier + EMA(previous day).

 

A 5-period exponential moving average applies an 33.33 % weighting to the most recent price.

Below is an example of a 5-day  “SMA” and “ EMA” for Apple. Simple moving averages are calculated as discussed in above example. The exponential moving average starts with the simple moving average value 449.61 in the first calculation. After the first calculation, the  EMA formulae as discussed above will take effect.

DateClose Price5 SMAMultiplier5 EMA
25-01-2012446.66   
26-01-2012444.63   
27-01-2012447.28   
30-01-2012453.01   
31-01-2012456.48449.61 449.61
01-02-2012456.19451.520.33451.80
02-02-2012455.12453.620.33452.91
03-02-2012459.68456.100.33455.17
06-02-2012463.97458.290.33458.10
07-02-2012468.83460.760.33461.68
08-02-2012476.68464.860.33466.68
09-02-2012493.17472.470.33475.51
10-02-2012493.42479.210.33481.48
13-02-2012502.60486.940.33488.52

 

Apple

 

As EMA gives more weight to recent price action whipsaws are quiet less. As seen in above example Apple just kept trading above its 5 EMA in the uptrend which started in January 2012.

To be Continued

4 thoughts on “How to Use Moving Averages Part -I

  1. Mohit Talwar

    Thanks for the post, waiting for part 2 because i want to know which moving averages are important , there are so many moving averages and i am always confused which one to use …

Leave a Reply