Given the data $y_t$, $t=1, \cdots ,N$; I would like to estimate the decay parameter $\lambda$ in Exponentially Weighted Moving Average (EWMA) model, such that

$y_{t+1} = \sum_{k=0}^K \lambda^k y_{t - k} + e_t $, where $K<N$.

I am wondering, is there any common way and solver for this nonlinear least squares problem? Is it possible to make this problem more "friendly" by changing of the variables?

  • $\begingroup$ Please do not cross post at Quantitative Finance SE. $\endgroup$ Jul 11, 2023 at 14:10

1 Answer 1


Hi: The non geometric series version of the ES model is

$\tilde y_t = \lambda \tilde{y}_{t-1} + (1-\lambda) y_{t-1}$. ( you left out the multiplicative factor $(1-\lambda)$ on the outside of your sum ).

The equivalent time series model ( in the sense that they give the same predictions ) is an arima(0,1,1). So, if you fit the arima(0,1,1)

$y_t - y_{t-1} = \theta \epsilon_{t-1} + \epsilon_t$

and get back the value of the estimated MA coefficient $\theta$, then you can use the mapping : $\hat{\lambda} = ( 1 - \hat{\theta})$. That will give you the estimated value of $\lambda$.

Note that there's a proof somewhere that they are equivalent but it's been so long that I can't remember where you can find it. It might be in the Box-Jenkins-Reinsel text or in Harvey's structural time series text. Check Box-Jenkins-Reinsel first.

Note: The arima(0,1,1) is also equivalent to a random walk plus noise model so, if you're more familiar with the state space framework, you can fit that instead. See Harvey's text for details on that equivalence.

  • $\begingroup$ Your equation for ARIMA(0,1,1) is incorrect, and you do not explain how to estimate it. $\endgroup$ Jul 11, 2023 at 19:22
  • $\begingroup$ Thanks Richard. I fixed the arima(0,1,1). As far as estimating it, I would use R and the arima function ( which does have some pitfalls ) but estimation really depends on the software one is using so I didn't feel the need to go into that discussion. If the OP needs help with estimation, I assumed that he could just ask another question. $\endgroup$
    – mlofton
    Jul 11, 2023 at 21:26
  • $\begingroup$ The OP's question seems to be specifically about estimation. Anyway, the ARIMA equation still seems to be incorrect. You wrote ARIMA(1,1,0) instead of ARIMA(0,1,1), did you not? $\endgroup$ Jul 12, 2023 at 4:51
  • $\begingroup$ Oops. I'll fix it again. It's been so long since I looked at ARIMA model but that's no excuse. Thanks. As far as your second point, I took his question to be about how to re-write the exponential smoothing model so that it could be estimated. Hopefully, the OP will tell us whether I was correct ? $\endgroup$
    – mlofton
    Jul 12, 2023 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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