# What is the fastest common moving average?

I am trying to find what standard moving average would give me the fastest adjustment or strongest weight to most recent data, but without changing the number of periods.

Here is some sample data and some MAs.

data    5   5   5   10      10      10      10      10      10      10      10      10      10      10
wilde   5   5   5   5.3571  5.6888  5.9967  6.2827  6.5482  6.7948  7.0237  7.2363  7.4337  7.6170  7.7872
ma      5   5   5   5.3571  5.7143  6.0714  6.4286  6.7857  7.1429  7.5000  7.8571  8.2143  8.5714  8.9286
EMA     5   5   5   5.6667  6.2444  6.7452  7.1792  7.5553  7.8812  8.1637  8.4086  8.6208  8.8047  8.9640
weight  5   5   5   5.6667  6.2857  6.8571  7.3810  7.8571  8.2857  8.6667  9.0000  9.2857  9.5238  9.7143
exp wgh 5   5   5   5.9655  6.7980  7.5074  8.1034  8.5961  8.9951  9.3103  9.5517  9.7291  9.8522  9.9310


I start with all 5s and then move to all 10s. I am using 14 periods for all calculations.

The wilder ma is first as it seems to be the slowest with K = 1/N

The regular MA is next with the first value at 10 the same as wilder.

Then the standard EMA with K = 2/(N+1).

My preferred way is to multiply the most recent day by 14, previous by 13 and so on. Which seems is called the weighted moving average. The first values changing to 10 is the same for EMA and weighted.

Then the exponential weighted where I multiply by 14 squared or 196 and so on. This is really fast, but maybe too fast.

I am picking very specific data and clearly the exponential weighted is by far the fastest followed by weighted. Buy I don't think it is standard so no platform or software would have it built in.

What would be the fastest industry standard moving average and what are the known advantages and disadvantages of using it?

• I don't think your question makes sense. "5" is just an arbitrary parameter here. If you want zero lag you can just feed it through the same filter in both directions. – madilyn Apr 3 at 1:37
• When you say "fastest" are you referring to computationally fast as in Big O notation or do you mean the moving average that converges to the value 10 the fastest? Confusing: "give me the fastest adjustment or strongest weight to most recent data, but without changing the number of periods" Also if these are the standard SMA then what are non standard? – Jacques Joubert Apr 3 at 11:26
• That is why I gave so many examples. Typically googling fast only gives short periods. I am looking for one that adjusts to recent values faster. And standard means defined. Such that if I say the name someone should know what I am talking about, and I expect most financial tools to have it. – MichaelE Apr 3 at 12:26
• 5 is completely arbitrary, only used to demonstrate my examples as the data switches from 5 to 10. It still needs to lag as it is a moving average of some kind. The simpler the example the easier it is to express what I am looking for. Thank you. – MichaelE Apr 3 at 12:30

A weighted moving average at time, $$m_t$$, measured over 14 periods is defined as:

$$m_t = \sum_{i=t-13}^t w_i p_i$$

where $$w_i$$ (s.t. $$\sum w_i =1$$) is the weight of the prices and $$p_i$$ are the historic prices.

Clearly setting all $$w_i=0$$ except $$w_t=1$$ will return the specific price at that timestep, and in your description be identified as the "fastest", but this isn't really a moving average its just, in fact, the price itself.

So you are restricting yourself to $$w_i$$'s which are defined by some common industry standard, e.g.

standard 14 day moving average: $$w_i = \frac{1}{14}$$

You might observe that this formula can be written as:

$$m_{14} = w_{14} (p_{14}) + w_{13} (p_{14} - \delta p_{14}) + w_{12} (p_{14} - \delta p_{14} - \delta p_{13}) + ... + w_1 (p_{14} - \delta p_{14} - .. -\delta p_{2})$$

$$m_{14} = p_{14} - \delta p_{14} \sum_1^{13} w_i - \delta p_{13} \sum_1^{12} w_i - .. - \delta p_2 \sum_1^1 w_i$$

where $$\delta p_i = p_i - p_{i-1}$$ and this market movement is usually modelled as stationary and uncorrelated (akin to option theory)

Now you are specifically interested in your moving average, $$m_14$$, converging fast to your price $$p_{14}$$. In general you cannot know what trajectory the market is going to evolve along but of you would like the moving average to be as close to the price as often as possible you are interested in the variance being as low as possible. That is you wish to minimise:

$$\min Var(p_{14} - m_{14})$$

If you were to assume market movements were normally distributed then the variance of the above would be equal to:

$$Var(p_{14} - m_{14}) = \sigma^2 \left ( \left (\sum_1^{13} w_i \right )^2 + ... + \left (\sum_1^{1} w_i \right )^2 \right )$$

So what you do now is take all the weights of the 14 days under each available moving average model plug them into the above and select the one that gives the lowest Var, and it looks like the exponential weighting will be the most likely to yield the results you want.

Note that for $$w_{14}=1$$ and $$w_i = 0$$ for $$i \in [1,13]$$ you achieve zero variance - i.e. the moving average is precisely the price.

• Hi : one way is use simple exponential smoothing with a smoothing parameter ( $\alpha$) near 1.0 so that the most of the weight is given the latest value. – mark leeds Apr 6 at 23:15