# Optimal parameter $\alpha$ for exponential smoothing using least squares

I was reading about exponential smoothing on Wikipedia. I saw a sentence saying that I could find the optimal parameter $\alpha$ by using the method of least squares. How do I go about doing that? Are there other ways I can find the right $\alpha$?

Edit: Also, if possible, I'd like a way to handle missing values.

-

Minimize the sum of squared one-step forecast errors. If $\hat{Y}_t$ is the prediction of $Y_t$ given $Y_1,\dots,Y_{t-1}$, then $e_t=Y_t-\hat{Y}_t$ is the one-step forecast error. So minimize $e_2^2+\cdots+e_n^2$.

You can also use maximum likelihood estimation as discussed in my Springer book.

If you're just using simple exponential smoothing, and are happy to assume normal errors with constant variance, then an ARIMA(0,1,1) model is equivalent.

When you use a state space representation (such as in the innovations state space form, or by writing the ARIMA model in state space form), then handling missing values is easy. For example, the R function arima() will handle missing values without complaint.

-
Sorry if I'm being a bit slow. How do I do the minimization? Is there a formula or an algorithm that I need to use? –  Henry B. Nov 16 '10 at 10:15
You need to use a nonlinear optimization algorithm. –  Rob Hyndman Nov 16 '10 at 10:19
Okay. I've got as far as using ARIMA(0,1,1). I am assuming that the code, arima(x, order = c(0, 1, 1)) is how one does that. (I spent a few hours learning R first so I am completely new to this.) How do I apply the output to my smoothing problem? –  Henry B. Nov 17 '10 at 7:22
Using R's parameterization, $\alpha = 1+\theta$ where $\theta$ is the moving average parameter. –  Rob Hyndman Nov 17 '10 at 7:32
arima() will handle the missing values appropriately. There's no need for you to do anything. Just use the forecasts it provides. –  Rob Hyndman Nov 17 '10 at 12:37