Skip to content
All library documents

Interpreting EWMA Effective Windows Across Return Frequencies

Article Quant Q&A · Author: user64706

Summary

The discussion examines how to interpret the effective window of an exponentially weighted moving average (EWMA), especially when the input uses two-day rather than daily returns. For an infinite geometric weighting scheme, a tolerance threshold and decay factor yield an effective observation count through their logarithms. The accepted answer cautions that the threshold is a weight tolerance, not a statistical confidence level, and that finite samples have total weight below one unless the weights are renormalized.

A second answer maps the discrete decay factor to a continuous-time decay rate, accounting for the number of observations per year. Integrating the resulting exponential weights gives a mean effective lookback that approaches the reciprocal decay rate over an unlimited horizon. This makes the time scale depend on the observation frequency; asynchronous observations can be handled through elapsed time in the continuous formulation. The replies give alternative interpretations rather than one unified convention, so the intended meaning of “effective days” should be specified before applying the calculation.

Key ideas

  • The EWMA decay factor determines how quickly past observations lose weight.
  • The tolerance calculation describes a weight cutoff, not a statistical confidence level.
  • Finite EWMA samples may require weight normalization because their weights do not sum to one.
  • A continuous-time decay rate can express the lookback in calendar time and accommodate asynchronous observations.
  • Changing return duration changes the span of calendar time represented by a given number of observations.

Tags

Full text
# Question on effective days of an exponentially weighted moving average model


# Question on effective days of an exponentially weighted moving average model












I have been reading the book "RiskMetrics —Technical Document" by Longerstaey (J.P.Morgan) and Spencer (Reuters) (4th Edition, 1996). I am wondering what the effective days of the exponentially weighted moving average model (EWMA) mentioned in the book would be if I use a 2-day percentage change as also explained below.

On pages 93-95 of the book, it is stated that $K$, the effective days of the EWMA, can be calculated by: $$ K = \frac{\log(\alpha)}{\log(\lambda)}.$$

For example, if one is interested in a confidence level of $\alpha=1\%$ with $\lambda=0.99$, $K$ comes out as 458 days, as also shown in the table on page 94.

On page 93, it is also stated that the formula above for $K$ is what one gets if the following equation is solved for $K$:

$$\lambda^{K}(1-\lambda)(1+\lambda+\lambda^2+\dots)=\alpha.$$

I have proven this as follows:

\begin{align*} \lambda^{K}(1-\lambda)(1+\lambda+\lambda^2+\dots)&=\alpha \\ \lambda^{K}&=\frac{ \alpha}{(1-\lambda)(1+\lambda+\lambda^2+\dots)} \\ \log( \lambda^{K})&=\log\left(\frac{ \alpha}{(1-\lambda)(1+\lambda+\lambda^2+\dots)} \right) \end{align*}

Because $1+\lambda+\lambda^2+\dots$ is a geometric series and $|\lambda|<1$, it converges to $\frac{1}{1-\lambda}$. Then,

\begin{align*} K\log( \lambda) &= \log\left(\frac{ \alpha}{(1-\lambda)(\frac{1}{1-\lambda})} \right)\\ K\log( \lambda) &= \log(\alpha)\\ K &= \frac{\log(\alpha)}{\log( \lambda)}. \\ \end{align*}

My questions are:

- What happens if I use a 2-day percentage change such as $r_{t} = \frac{y_{t-2}}{y_t}-1$?

- With $r_{t}$ defined just as above, how would the effective number of days change when, for example, $\lambda=0.99$ and $\alpha=1\%$? Or would it remain the same at 458, and why?

## Answer by Kermittfrog (score 0, accepted)

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

The EWMA is a weighting scheme. Calculating the EWMA $Z$ of some input signal $X$, the EWMA is defined as:

$$ Z_t\equiv (1-\lambda)\sum_{t=1}^T \lambda^{t-1}X_t $$

At closer inspection, we find that, usually, $T<<\infty$, and hence the weights do not sum to 1:

$$ (1-\lambda)\sum_{t=1}^T\lambda^{t-1}=(1-\lambda)\frac{1-\lambda^T}{1-\lambda}=1-\lambda^T<1 $$

If you'd simply replace the leading $1-\lambda$ with $\frac{1-\lambda}{1-\lambda^T}$, there would be no need for a 'tolerance level'. It has nothing to do with a confidence level (in the statistical sense).

Regarding your question: It does not matter whether you use daily or 2-day returns. Instead of $N$ daily returns, you now use $N$ returns, looking back for a longer time period.

HTH?

## Answer by James Spencer-Lavan (score 0)

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

Define the continuous-time analogue of the discrete time EWMA: $ \quad e^{-H \tau} := \lambda^M$

Therefore $H = -252 ln (\lambda)$, assuming $M=252$ (number of daily observations in $\tau = 1yr$)

We wish to calculate the effective window length, define as $L = \frac{ \int_0^T \tau . e^{-H \tau} d \tau } { \int_0^T e^{-H \tau} d \tau }$

Integrating top and bottom we find $L = \frac{ \frac{1}{H^2} \Big [ 1 - e^{-H T}(1 + H T) \Big ] } { \frac{1}{H} \Big [ 1 - e^{-H T} \Big] }$

As $T \rightarrow \infty$, we have $L \rightarrow \frac{ \frac{1}{H^2} \Big [ 1 - 0 \Big ] } { \frac{1}{H} \Big [ 1 - 0 \Big] } = \frac{1}{H}$

So given $\lambda$ (which is typically quoted as a daily-discrete observation, you find that the effective window length is $\frac{1}{-252 ln(\lambda)}$.

Obviously if your $\lambda$ is monthly, then this becomes $L= \frac{1}{-12 ln(\lambda)}$, etc

Aside: the nice thing about the continuous-time EWMA is it can be applied $\textit{without adjustment}$ to observations which are asynchronous. i.e. intraday measures where the return between adjacent spot observations include close-to-open as well as intraday ones.

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.