**Moving Averages**

By: Gaurav Taneja, Financial Trainer, Venteskraft May 25, 2020

**What is an Average?**

In this blog we will go through moving averages, a really powerful technical indicator. Often we have learnt in our schools what an average is. Let us revise the concept one more time. Just imagine, you with your 4 other friends went to a panipuri shop, you decided to eat some panipuris at the shop. You all together ate 70 panipuris. The number of panipuris each of you had looked something like this;

Friend | A | B | C | D | E |

No of Panipuris | 12 | 17 | 19 | 8 | 14 |

When you went for billing the shopkeeper might have come to a conclusion that each of you had an average of 14 panipuris. It was just simple mathematics dividing 70/5 gives 14. Although you can clearly see some of your friends ate way lesser than 14 and some of them ate more than 14. But at the end the average came to be 14. This is the concept of averages.

Let us apply the same concept in the case of stocks, and see what we can derive from them. Here we have the closing price of ADANIPORTS for the past 5 sessions.

ADANIPORTS | 18 May, 2020 | 19 May, 2020 | 20 May, 2020 | 21 May, 2020 | 22 May, 2020 |

Closing Price | 293.30 | 319.20 | 323.75 | 317.15 | 310.6 |

Now applying the average concept which we learnt previously we will get the average closing price of ADANIPORTS to be 1564/5 = 312.8 But we can see that some days the price was below the average and some days higher.

But still we haven’t come to know what moving averages are. Observe the table below and you will understand. Below is the average closing price of ADANIPORTS calculated for different days.

ADANIPORTS | Closing Price | Average | Formula |

D1 | 291.50 | – | - |

D2 | 309.35 | – | - |

D3 | 308.40 | – | – |

D4 | 309.25 | – | – |

D5 | 293.30 | 302.36 | Average(D1:D5) |

D6 | 319.20 | 307.9 | Average(D2:D6) |

D7 | 323.75 | 310.78 | Average(D3:D7) |

D8 | 317.15 | 312.53 | Average(D4:D8) |

D9 | 310.60 | 312.80 | Average(D5:D9) |

In the above table there is no average for the first 4 days that is because as we are following the 5 day average here, so there is not enough data for the first four days to calculate the average. But on the 5^{th} day we can clearly see the average. The magic happens on the 6^{th} day, as we move on to 6^{th} day we get a new data point to calculate average, but if we add the 6^{th} point and not remove any point then again the average would be not be accurate for 5 days. So in order to achieve the accurate average we add the 6^{th} day data point and remove the 1^{st} day data point. And so forth we keep doing the same, add the latest and remove the last. And when we plot the average for each day and connect them with a line, it appears to be moving. Hence those lines are called moving average.

Here is how a moving average looks like. Moving averages which we just discussed above are also known as simple moving averages.

**What are exponential moving averages?**

Another type of moving average which traders use a lot are known as exponential moving averages. These Exponential Moving Averages or EMA, are different in appearance as well as in calculation. The way average is calculated exponentially is by giving more importance to the latest data point than the previous and so on. For example, we are calculating the exponential average for a particular stock and the period is 5 (it can be days, minutes or anything). The latest data point that is the 5^{th} day will be given more importance and the 4^{th} data point will be given second highest important and the 3^{rd} data point will be given 3^{rd} highest importance and so on. Now because of calculating this way the EMA stick closer to the latest prices.

In the below chart, the SMA for 50 period (Black line) and the EMA 50 period (Red line) shows a lot of difference between each other.

**How to Use Moving Averages?**

Usually when the stock is trading above the average price it means that the people are optimistic and are willing to pay more than the average price to buy the stocks. So in these cases you can go for a long position or buy the shares.

Sometimes the opposite happens when the stock starts trading at a price lower than the average price, meaning that the people are not willing to pay more than the average price and they are pessimistic about the stock performing good. In these cases you can go for short positions or sell.

Trading with indicators is all about generating an entry signal and then generating an exit signal. Moving averages makes it easy to find entries. For example, you can take a buy position when the price starts trading above the moving average and exit as soon as it comes below the average price. There will be trades when the target will be low or there will be times when you might make a loss, because ultimately the market is superior. But the good thing about the moving averages is that they give either big profits or less profits, but rarely losses that to small losses.

And you are always free to experiment and make your own setups using different values of moving average.

One more way which traders find quite helpful is to go for crossovers, what is does is it reduces the total number of entries and it also removes most of the loss trades. And you can make difference combinations of moving averages with different values.