Moving Averages

We have all learnt about averages in school, moving average is just an extension of that. Moving averages are trend indicators and are frequently used due to their simplicity and effectiveness. Before we learn moving averages, let us have a quick recap on how averages are calculated.


Assume 5 people are sitting on a nice sunny beach enjoying a nice chilled bottled beverage. The sun is so bright and nice that each one of them end up drinking several bottles of the beverage. Assume the final count to be something like this:

Sl NoPersonNo of Bottles01A0702B0503C0604D0305E08Total # of bottles consumed29

Assume a 6th person walks in to find out 29 bottles of beverages lying around them. He can quickly get a sense of ‘roughly’ how many bottles each of them consumed by dividing [the total number of bottles]  by [total number of people].

In this case it would be:

=29/5 =5.8 bottles per head.

So, the average in this case tells us roughly how many bottles each person had consumed. Obviously there would be few of them who had consumed above and below the average. For example, Person E drank 8 bottles of beverage, which is way above the average of 5.8 bottles. Likewise, person D drank just 3 bottles of beverage, which is way below the average of 5.8 bottles. Therefore average is just an estimate and one cannot expect it to be accurate.

Extending the concept to stocks, here are the closing prices of ITC Limited for the last 5 trading sessions. The last 5 day average close would be calculated as follows:

DateClosing Price14/07/14344.9515/07/14342.3516/07/14344.2017/07/14344.2518/07/14344.0Total1719.75

= 1719.75 / 5 = 343.95

Hence the average closing price of ITC over the last 5 trading sessions is 343.95.

13.1 – The ‘moving’ average (also called the simple moving average)

Consider a situation where you want to calculate the average closing price of Marico Limited for the latest 5 days. The data is as follows:

DateClosing Price21/07/14239.222/07/14240.623/07/14241.824/07/14242.825/07/14247.9Total1212.3

= 1212.3/ 5 = 242.5

Hence the average closing price of Marico over the last 5 trading sessions is 242.5

Moving forward, the next day i.e 28th July (26th and 27th were Saturday and Sunday respectively) we have a new data point. This implies now the ‘new’ latest 5 days would be 22nd, 23rd, 24th, 25th and 28th. We will drop the data point belonging to the 21st as our objective is to calculate the latest 5 day average.

DateClosing Price22/07/14240.623/07/14241.824/07/14242.825/07/14247.928/07/14250.2Total1223.3

= 1223.3/ 5 = 244.66

Hence the average closing price of Marico over the last 5 trading sessions is 244.66

As you can see, we have included the latest data (28th July), and discarded the oldest data (21st July) to calculate the 5 day average.  On 29th, we would include 29th data and exclude 22nd data, on 30th we would include 30th data point but eliminate 23rd data, so on and so forth.

So essentially, we are moving to the latest data point and discarding the oldest to calculate the latest 5 day average. Hence the name “moving” average!

In the above example, the calculation of moving average is based on the closing prices.  Sometimes, moving averages are also calculated using other parameters such as high, low, and open. However the closing prices are used mostly by the traders and investors as it reflects the price at which the market finally settles down.

Moving averages can be calculated for any time frame, from minutes, hours to years.  Any time frame can be selected from the charting software based of your requirements.

For those of you familiar with excel, here is a screenshot of how moving averages are calculated on MS Excel. Notice how the cell reference moves in the average formula, eliminating the oldest to include the latest data points.

Cell RefDateClose Price5 Day AverageAverage FormulaD31-Jan-141287.7D42-Jan-141279.25D53-Jan-141258.95D66-Jan-141249.7D77-Jan-141242.4D88-Jan-141268.751263.6=AVERAGE(D3:D7)D99-Jan-141231.21259.81=AVERAGE(D4:D8)D1010-Jan-141201.751250.2=AVERAGE(D5:D9)D1113-Jan-141159.21238.76=AVERAGE(D6:D10)D1214-Jan-141157.251220.66=AVERAGE(D7:D11)D1315-Jan-141141.351203.63=AVERAGE(D8:D12)D1416-Jan-141152.51178.15=AVERAGE(D9:D13)D1517-Jan-141139.61162.41=AVERAGE(D10:D14)D1620-Jan-141140.61149.98=AVERAGE(D11:D15)D1721-Jan-141166.351146.26=AVERAGE(D12:D16)D1822-Jan-141165.41148.08=AVERAGE(D13:D17)D1923-Jan-141168.251152.89=AVERAGE(D14:D18)

As it is evident, the moving average changes as and when the closing price changes. A moving average as calculated above is called a ‘Simple Moving Average’ (SMA). Since we are calculating it as per the latest 5 days of data it is called referred to as 5 Day SMA.

The averages for the 5 day (or it could be anything like 5, 10, 50, 100, 200 days) are then joined to form a smooth curving line known as the moving average line, and it continues to move as the time progresses.

In the chart shown below, I have overlaid a 5 day SMA over ACC’s candlestick graph.

📷

So what does a moving average indicate and how does one use it?  Well, there are many applications of moving average and shortly I will introduce a simple trading system based on moving averages. But before that, let us learn about the Exponential Moving Average.

Email

Drop Me a Line, Let Me Know What You Think

© 2019 - 2020 by Tamil Trading.