When calculating an exponentially weighted covariance matrix for t observations, formula 10.2 here:


Uses observations 1 (earliest) to t-1 (oldest-1). Why doesn't it use the oldest observation, t, like a simple moving average or exponential moving average?

It says "For a sufficiently large t such that λt−1 ≈ 0....", so if you have a smaller number of observations where λt−1 >0, you would use observations 1 to t in formula 10.2?

Thank you

  • $\begingroup$ develarist: there's something weird going on with that formula for exponential smoothing. I don't see where the denominator on the outside, namely $(1-\lambda^{t-1})$ is coming from. If that term wasn't there and the numerator in the summation was $j+1$ instead of $j-1$, that would make sense to me because that formula then makes sense. But the denominator confuses me and that could be causing the indexing to be different. If anyone can see where the denominator arises, I'd be interested. $\endgroup$ – mlofton Sep 25 '20 at 6:58
  • $\begingroup$ compare the formula to the source shown in my answer since it's the original, not oreilly. Besides the question was on the ewma covariance matrix, not univariate ewma which is what the op shows $\endgroup$ – develarist Sep 25 '20 at 7:51
  • $\begingroup$ Hi: It doesn't really matter what the indices are in the summation as long as there is one $\lambda$ term that is raised to zero and one that is raised to $t$. How you get there is irrelevant. The question for me is the denominator. When I have more time, I'll check out the source you pointed to. But, as I said, how one does the indexing doesn't matter as long as $\lambda$ get raised to the powers from $0$ to $t$. $\endgroup$ – mlofton Sep 26 '20 at 14:20

Depends what smaller observations would mean. Page 81 of the RiskMetrics 1996 technical document where EWMA was introduced shows an example with only 22 observations for a commonly used $\lambda$ setting, so yes it decays fairly fast with lags farther in the past having an almost negligble contributing weight.

If you plan to use EWMA on financial data, don't. It's an outdated technique that doesn't actually match the autocorrelation function of financial time series like they said it does. A hyperbolically weighted moving average (RiskMetrics 2006 EWMA) decays slower than EWMA, and therefore matches real financial autocorrelation alot better. Kevin Sheppard used to have an implementation of the EWMA 2006 covariance matrix but I don't see it anymore.

by the way your link only shows univariate EWMA. Page 179 of RiskMetrics 1996 shows the actual EWMA covariance matrix.

  • 1
    $\begingroup$ I agree that the EWMA is quite well known as a smoother. But I just wanted to give a heads up to posterity that it shows up in a lot of other frameworks besides smoothing. All of the holt-winters machinery has its origins in exponential smoothing time series models. ( see Rob Hyndman's yellow book ). In Sargent's 1979 text, "Macro-economic Theory", there are a whole bunch of examples of how the ewma can arise as an optimal solution to various state space representations. It can also be viewed as an adaptive expectations model in econometrics where the $\beta$ parameter is set to 1.0. $\endgroup$ – mlofton Sep 25 '20 at 7:14
  • $\begingroup$ alright, if the above answered ur question vote if its useful $\endgroup$ – develarist Sep 25 '20 at 7:48
  • $\begingroup$ formula 8.28 matches formula 10.2 in the first link (except for sum index). the term in front in 10.2 is the geometric series of the term in front in 8.28. 10.2 is a formula for a covariance matrix not univariate so still not sure why the sum does not include day t $\endgroup$ – userrys70 Sep 25 '20 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.