### Moving Averages

======= as we move along our time period.

Below we’ll explore the 2 most commonly used moving averages – The Simple Moving Average and The Exponential Moving average. There are others like the weighted moving average, the double exponential moving average, the triple exponential moving average and the displaced moving average. We won’t touch on these here.

The Simple Moving Average (SMA)

There are 2 main types of moving average the simple moving average (SMA) and the exponential moving average (EMA). The SMA is the easiest to understand. The SMA is calculated by taking the arithmetical mean of a series of price data points generated by all the closing prices in that time period. If we are looking at a 15-day moving average we count the last 15 days closing price data we have and divide by 15 to get the 15-day SMA for the last period. I.e. if we are counting back from yesterday (which is the last end of day price point we have), day 15 will be yesterday and day 1 will be 16 days ago (yesterday minus 15). To get the SMA for 2 days ago, day 15 will be 2 days ago and day 1 will be 17 days ago (the day before yesterday minus 15), etc...

Here's the last 15-day closing prices for our chart and the 15-day SMA calculation - Starting from our last known data point on the 6th Aug 2009:

Our closing prices: 52+ 51 + 56 + 55 + 51 + 52 + 48 + 48 + 49 + 48 + 47 + 47 + 48 + 49 + 48 = Total 749
Our 15-Day SMA:  749/15 = 49.9

This also works in other time frames.  If the chart was an hourly chart, i.e.calculating data on an hourly basis, our 15-period SMA (note: it's not a 15-day SMA any more, because we're working with hourly data) for the last period will be calculated by adding the last 15 end of period prices we have and dividing by 15.

To get a 45-day SMA we add the last 45 days closing prices and divide by 45 to get the last period's 45-day simple moving average. All these SMA points will then be linked to smooth out our SMA price line as in the chart below. The SMA is smoother if the SMA has a higher number, as the volatility has been airbrushed out. You can see this quite clearly in the below Simple Moving Average Chart. Let's look at the 12th May on the chart, there was a spike in price, but the moving averages ironed this spike out. Some argue that the SMA is limited because it weights all it’s price points equally, i.e data taken 45-days ago is equally as important to data accumulated 2 days ago. These people argue that more recent data is more significant. This is where the EMA comes into play - both have their advantages and drawback, which will be explained in the next paragraph.

Simple Moving Average Chart Example

The Exponential moving average

The EMA gives more weight to recent past closing prices rather than give the same weight to all the price points in the last data period. E.g. In a 15-day EMA more weight is given to day 15 than day 1 prices. The EMA gives a greater weight to more recent price action, reacting faster to future price movement and determining where the price is heading in the future. This is why many traders prefer the EMA, but in the below paragraph we’ll look at the differences.

Learning the EMA equation is unnecessary as most trading chart software calculates this for you. But here it is anyway:

SMA v EMA

In the below chart (EMA versus SMA) we can see the reaction speed between the EMA and SMA. The blue EMA reacts more quickly to price movement than the black SMA line. Traders will generally use the EMA to determine short-term price movements and the SMA when trading longer term as the SMA generates less false trading signals.

EMA versus SMA Comparison Example

More...