another Moving Average
We were playing with moving averages here.
We were looking for something that smooothed out the wrinkles in the stock chart and ...

>And didn't have too much lag, eh?
Yes, that's right.
I like the Exponential Moving Average (EMA) 'cause it gives more weight to recent stock prices (Fig. 1).

>But to avoid lots of lag you gotta take the average over just a few days.
Yes ... then you get wrinkles, like the 5-day EMA (as in Fig. 1)


Figure 1: EMA
However, suppose we look carefully at the 5-day EMA and pretend it's the chart of some stock.
Then we calculate the average daily return for this new 5-day EMA stock-graph.
Then, each day, we increase the price for this fictitious stock by that 5-day average gain.
Then we plot that graph.
Then we'd get yet another graph which we'll call the 5-day gEMA ... as in Fig. 2.

>Uh ... it has more lag.
And not so wrinkled, I think.

>Why g moving average?
It's a great moving average, don't you think?

>NO!


Figure 2: gEMA
Having done that once ...

>Don't tell me you're gonna do it again!
Why not?
We pretend that the 5-day gEMA graph is a stock chart and we calculate the average daily return over the past n days ...

>And, each day, we increase the price for a fictitious stock by that n-day average gain?
Sounds good to me!
For n = 10, we can call this new graph the 10/5-day ggEMA.

>Huh?
It uses the 10-day average return of the 5-day gEMA ...

>Which uses the 5-day average return of the regular, garden-variety EMA.
You got it!


Figure 3: ggEMA
>I assume you have a gggEMA and a gggggEMA and ...
That's left as an exercise ... for you.

Anyway, you can play with this spreadsheet: (Click on the picture to download.)