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:
=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:
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.
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.