Moving averages are similar to averages we use in our daily lives and are used to identify trends. It is a popular technical indicator used in the stock analysis to predict the direction of a particular trend. Moving Averages are of two types: Simple and Exponential. Both simple and exponential are similar except for the fact that in exponential added weight is given to the latest data. An exponential average is considered to be more effective in predicting recent changes in the market.
How to calculate Simple Moving Averages?
Suppose you want to calculate the simple moving average closing price of SBI for last 5 days-
Day
SBI Closing Price
1
300
2
280
3
320
4
325
5
320
The average comes out to= 1545/5= 309
Now SBI price moves to 325 on the 6th day. What will be the moving average for last 5 days? To calculate the average you need to drop the value of day 1 and add the price for day 6 in the above calculation.
Suppose SBI moves to 320 on the 7th day. What will be the moving average for last 5 days? To calculate the average you need to drop the value of day 1 & 2 and add the price for day 6 & 7 in the above calculation.
Day
SBI Closing Price
Last 5 day Average
1
300
2
280
3
320
4
325
5
320
309 (Day 1-5)
6
325
314 (Day 2-6)
7
320
322(Day 3-7)
8
310
320 (Day 4-8)
9
315
318 (Day 5-9)
10
325
319 (Day 6-10)
The series of values you get in last 5-day average column is the moving average. It keeps on changing with each passing day.
How to calculate the exponential moving average (EMA)?