Wiki Wiki Web

Holt-Winters double exponential smoothing

The predictor with drift without seasonality is as follows:

\begin{eqnarray} a_0& =& x_0 \\ b_0& =& 0 \\ a_{t}& =& \alpha x_{t} + (1-\alpha)(a_{t-1} + b_{t-1}) \\ b_{t}& =& \beta (x_t - x_{t-1}) + (1-\beta)b_{t-1} \\ F_{t+m}& =& a_t + m.b_t \end{eqnarray}

where $alpha$ is the data smoothing factor, $0 \leq \alpha \leq 1$. $\beta$ is the trend smoothing factor, $0 \leq \beta \leq 1$. The case $\beta=0$ correspond to the simple EWMA.

Brown formulation

\begin{eqnarray} u_0& = x_0\\ v_0& = x_0\\ u_{t}& = \mu x_{t} + (1-\mu)u_{t-1}\\ v_{t}& = \mu u_{t} + (1-\mu)v_{t-1}\\ a_t& = 2u_t - v_t \\ b_t& = \frac \mu {1-\mu} (u_t - v_t) \\ F_{t+m}& = a_t + mb_t \end{eqnarray}

is equivalent to Holt-Winters with $\alpha = (2-\mu) \mu$ and $\beta = \frac{\mu}{2-\mu}$. Brown formulation gives both EWMA and slope prediction with a single smoothing parameter. The parameter is implicitly dispatched to $\alpha,\beta$. For $\mu \in [0,1]$, $\alpha>\mu>\beta$

Exponential Moving Average as a 1D Kalman filter

See Kalman Regression for the setup and math of Kalman filter for time series.

The state $x$ is the hidden, optimal, filtered price with noise $Q$. The observation $z$ is the market price with noise $R$. $H=F=1,B=0$. The update rules are:

\begin{eqnarray} x_k &=& x_{k-1} + \frac{P+Q}{P+Q+R} (z_k-x_{k-1}) \\ P_k &=& \left(1 - \frac{P_{k-1}+Q}{P_{k-1}+Q+R}\right)(P_{k-1}+Q) \end{eqnarray}

$P_k$ quickly reaches a stable point solution of $P=\left(1 - \frac{P+Q}{P+Q+R}\right)(P+Q)$ which is the positive root of a quadratic equation $x^2 + Qx -QR=0$.

$K = \frac{P+Q}{P+Q+R}$ tends to a constant, and the filter update rule looks like an ewma with weight that tends to K: $$x_k = K z_k + (1-K)x_{k-1}$$