### Visual Depiction of SMA vs EMA Weighting

28Apr13

Inspired by Hyperq (hat tip The Whole Street)…

The graph below shows how each day is weighted in a 10-day simple moving average (grey) versus exponential moving average (red). For the uninitiated, the SMA and EMA are the two types of moving averages most commonly employed by traders.

In the 10-day SMA, each day from 0 (the most recent) to 9 (the most distant) is equally weighted (10%).

In the EMA, day 0 makes up 18.2% of the average. That falls to just 3.0% by day 9. The left tail on the graph (day 20 and beyond) extends indefinitely, but in total makes up just 1.8% of the average.

The next graph show the daily weighting for a 50-day SMA/EMA, and the graph below that compares a 10-day EMA to a 50-day EMA.

For those familiar with how these averages are calculated, none of this is new information, but I thought it was interesting to see it visually.

For me personally it’s a reminder of how arbitrary an SMA is, weighting the very last day in the average equally with the most recent day, and how much of an impact it can have when that last day falls out of the average despite not telling you much about what’s going on today.

Happy Trading,
ms

. . . . .

To stay up to date with what’s happening at the MarketSci Blog, we recommend subscribing to our RSS Feed or Email Feed.

#### 5 Responses to “Visual Depiction of SMA vs EMA Weighting”

1. 1 MarketSci

P.S. I think this post also shows why questions like “what’s better, a 200-day SMA or 200-day EMA?” are silly. They’re entirely different animals with nothing in common beyond having “200-day” in their names. michael

2. 2 Paul

It’s illustrative to show that for the same numeric designation, e.g., a 50d SMA vs. a 50d EMA, that the 50d EMA will trigger before the SMA. it is also illustrative to show that in a flat market that there is no advantage to either method….

• 3 MarketSci

Hello Paul – good comment – the only caveat I would add to that is that in a perfectly flat market, the EMA actually becomes the “longer” of the two moving averages. What I mean is, using the 10-day EMA as an example, 13.4% of the EMA is comprised of what’s happening beyond the 10th day. So in a perfectly flat market, the EMA includes everything from the last 10 days (flat) plus a trail of days prior. michael

3. 4 greyzy

Is there a formula that would take the value of the SMA and tell me what number to use as the “period” in the EMA so that bar 0 has the same weight in both the SMA and the EMA?
Basically I want the rightmost red bar to have the same height as the grey bar. That would make it easier to replace any SMA by an EMA of equal “starting weight”.

• 5 MarketSci

Hello Greyzy – good question – the formula would be:

(SMA Length * 2) – 1

I calculated by solving:

(1/SMA) = [2/(EMA+1)]

So for example, bar 0 of a 10-day SMA would be equally weighted with bar 0 of a 19-day EMA.

michael