Skip to content
All library documents

Comparing Moving Average Speed Through Price-Tracking Error

Article Quant Q&A · Author: MichaelE

Summary

The document compares several 14-period moving averages after prices shift from a constant level to another. Wilder smoothing, a simple moving average, a standard exponential moving average, a linearly weighted average, and a more heavily exponential weighting scheme respond at different speeds. The example illustrates that increasing the weight on recent observations makes the average catch up more quickly, though it does not establish which scheme is best across real market data.

An answer proposes comparing weight schemes by minimizing the variance between the current price and its moving average. Under the stated assumption that price changes are stationary, uncorrelated, and normally distributed, this tracking error can be expressed from cumulative weights. Strong emphasis on the latest price lowers that error, but the limiting case is simply the price itself. The argument addresses closeness to current price, not whether a faster average produces better trading signals; conclusions depend on the model assumptions and the chosen objective.

Key ideas

  • Moving averages with greater weight on recent observations adjust faster to a price change.
  • The example compares several 14-period smoothing schemes using a step change in the input data.
  • A proposed speed criterion is minimizing the variance between current price and the average.
  • That criterion assumes stationary, uncorrelated price changes and does not measure trading performance.
  • Giving all weight to the latest price eliminates tracking lag but ceases to be a meaningful average.

Tags

Full text
# What is the fastest common moving average?


# 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?

## Answer by Bob Baerker (score 1)

https://quant.stackexchange.com/a/60172

This isn't rocket science. If you want a faster moving average, select a smoothing constant that weights the current data more heavily whether it be an EMA or a weighted EMA.

## Answer by Attack68 (score 0)

https://quant.stackexchange.com/a/44914

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.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.