_______________________________________________________________
The EMA is designed to improve on a simple moving average by giving more weight to the most recent price data, which is considered more relevant than older data. That is, it could better predict movements in the near future than earlier data.
Since new data carries greater weight, the EMA responds more quickly than the SMA to price changes.
The formula for calculating the EMA starts with the SMA and uses a multiplier. There are three steps in the calculation (although chart applications can do the math for you):
- Compute the SMA
- Calculate the multiplier for weighting the EMA
- Calculate the current EMA
The calculation for the SMA is the same as computing an average or mean. That is, the SMA for any given number of time periods is the sum of closing prices for that number of time periods, divided by the same number. So, for example, a 10-day SMA is just the sum of the closing prices for the past 10 days, divided by 10.
The mathematical formula looks like this:
SMA=A1+A2+…+Annwhere:An=Price of an asset at period nn=Number of total periodsSMA=nA1+A2+…+Anwhere:An=Price of an asset at period nn=Number of total periods
EMA=Price(t)×k+EMA(y)×(1−k)where:t=todayy=yesterdayN=number of days in EMAk=2÷(N+1)
The weighting given to the most recent price is greater for a shorter-period EMA than for a longer-period EMA. For example, an 18.18% multiplier is applied to the most recent price data for a 10-day EMA, as we did above, whereas for a 20-day EMA, only a 9.52% multiplier weighting is used.
There are also slight variations of the EMA arrived at by using the open, high, low, or median price instead of using the closing price.
_______________________________________________________________