Exponential Moving Average (EMA)
Exponential Moving average or EMA is basically exponentially weighted moving average. In Weighted Moving Average (WMA) more weight is given to the recent values unlike the simple moving average where each value has same weight. Unlike the Linearly Weighted moving average where we the weight given to each value decreases linearly, in exponential moving average (EMA) the weight reduces exponentially for older values.
Exponential vs Linearly Weighted Moving Average
Calculation Of Exponential moving Average
The first step is to calculate the Exponent, the factor which would changes the weight. Well, this exponent depends on the number of period (days for daily EMA) for which you wish to calculate the exponential moving average.
Exponent = 2/(number of periods +1)
Let’s say you wish to calculate EMA for 26 (periods i.e. 26 days for daily chart and 26 hours for hourly chart) then the exponent will be 2/(26+1) = 0.07407
Formula for Exponential moving average (EMA)
Current periods’ Exponential Moving Average = (Previous Period’s Closing Price x Exponent) + (Previous Period's EMA x (1-Exponent))
Let’s say that we are analyzing daily chart and hence 1 period = 1 day.
Let’s also suppose:
1) We wish to calculate exponential moving average of 26 days (EMA(26))
2) Today is 20th April
3) The closing price of April 19th was 135.80
4) EMA of April 19th was 132.60
So the Exponent = 2/(26+1) = 0.07407
The EMA on April 20th = (135.80 x 0.07407) + (132.80 x (1-0.07407) = 132.9629
Wait. Now what happens if we are only on day 2 and wish to calculate the EMA or exponential moving average? Because the first day’s EMA is not there. Simple, we take the closing price of the first day as EMA.
If we are on third day, we can take first 2 days’ simple moving average i.e. sum of first and second days’ closing price divided by 2 as the EMA of second day, to calculate the EMA of the third day.
The common setting for short term trading analysis for EMA (exponential moving average) is 12 and 26 periods. You can read about the signals generated by crossover etc on our Moving Averages page.
The period setting also depends on the volatility of the price movement. If the volatility is high, the period settings could be for shorter periods.
Exponential v/s Simple moving Average:
Exponential Moving averages could be used for considerably longer time analysis when the recent values (closing prices) should be getting considerably higher weight.
Exponential v/s Linearly Weighted Moving averages:
For shorter time frame analysis the best thing could be simple moving average but for moderately longer time frame technical analysis WMA or weighted moving average would be a better choice as we are assigning more weight to the recent values or closing prices.
EMA, WMA and SMA Comparison:
SMA: For short time frame technical analysis when even the old prices should get the same or similar weight as the recent prices because there may not be a substantial change in the situation.
WMA: For moderately longer term analysis when the recent prices should be getting more weight than the older prices but the market situations may not have a drastic change and hence the weight given to the recent values can be linearly high and not drastically high.
Exponential Moving Average (EMA): For longer time frame analysis when the older values may have much lesser importance than the recent values because the market situations may have changed drastically and hence much more or exponentially high weight to the recent values of closing prices than the older ones.
Volatility and selection of exponential moving average v/s SMA and WMA:
Volatility can be considered as inversely proportional to the time frame.
In a very high volatile market we can move from SMA to WMA to Exponential moving average (EMA) for even shorter time frame analysis. This is because what happened yesterday may have much less bearing on what is going to happen today and hence recent values have exponentially high importance than the values of even the recent past.