The SSM Procedure (Experimental)

Predefined Trend Models

The statistical models that govern the predefined trend components available in the SSM procedure are divided into two groups: models that are applicable to equally spaced data (possibly with replication), and models that are applicable more generally (the irregular data type). Each trend component can be described as a dot product $\mb {Z} \pmb {\alpha }_{t}$ for some (time-invariant) vector $\mb {Z}$ and a state vector $ \pmb {\alpha }_{t}$. The component specification is complete after the vector $\mb {Z}$ is specified and the system matrices that govern the equations of $ \pmb {\alpha }_{t}$ are specified. For trend models for regular data, all the system matrices are time-invariant. For irregular data, $\mb {T}_{t}$ and $\mb {Q}_{t}$ depend on the spacing between the distinct time points: $(\tau _{t+1} - \tau _{t})$.

Trend Models for Regular Data

These models are applicable when the data type is either regular or regular-with-replication. A good reference for these models is Harvey (1989).

Random Walk Trend

This model provides a trend pattern in which the level of the curve changes slowly. The rapidity of this change is inversely proportional to the disturbance variance $\sigma ^2$ that governs the underlying state. It can be described as $\mb {Z} \alpha _{t}$, where $Z= (1)$ and the (one-dimensional) state $\alpha _{t}$ follows a random walk:

\[  \alpha _{t+1} = \alpha _{t} + \eta _{t+1}, \; \;  \eta _{t} \sim N(0, \sigma ^2)  \]

Here $\mb {T} = 1$ and $\mb {Q} = \sigma ^2$. The initial condition is fully diffuse. Note that if $\sigma ^{2} = 0$, the resulting trend is a fixed constant.

Local Linear Trend

This model provides a trend pattern in which both the level and the slope of the curve vary slowly. This variation in the level and the slope is controlled by two parameters: $\sigma ^{2}_{1}$ controls the level variation, and $\sigma ^{2}_{2}$ controls the slope variation. If $\sigma ^{2}_{1} = 0$, the resulting trend is called an integrated random walk. If both $\sigma ^{2}_{1} = 0$ and $\sigma ^{2}_{2} = 0$, then the resulting model is the deterministic linear time trend. Here $\mb {Z}= (1 \;  0)$, $\mb {T}= (1 \;  1,\;  0\;  1)$, and $\mb {Q} = \mr {Diag} (\sigma ^{2}_{1}, \;  \sigma ^{2}_{2})$. The initial condition is fully diffuse.

Damped Local Linear Trend

This trend pattern is similar to the local linear trend pattern. However, in the DLL trend the slope follows a first-order autoregressive model, whereas in the LL trend the slope follows a random walk. The autoregressive parameter or the damping factor, $\phi $, must lie between 0.0 and 1.0, which implies that the long-run forecast according to this pattern has a slope that tends to 0. Here $\mb {Z}= (1 \;  0)$, $\mb {T}= (1 \;  1,\;  0\;  \phi )$, and $\mb {Q} = \mr {Diag}(\sigma ^{2}_{1}, \;  \sigma ^{2}_{2})$. The initial condition is partially diffuse with $\mb {Q_{1}} = \mr {Diag}(0, \;  \sigma ^{2}_{2}/(1-\phi *\phi ))$.


This section describes the state space form for a trend that follows an ARIMA(p,d,q)${\times }$(P,D,Q)$_{\mi {s}}$ model. The notation for ARIMA models is explained in the TREND statement. A number of alternate state space forms are possible in this case; the one given here is based on Jones (1980). With slight abuse of notation, let $p = p + s *P + d + s*D $ denote the effective autoregressive order, and let $q = q + s Q$ denote the effective moving average order of the model. Similarly, let $\phi $ be the effective autoregressive polynomial, and let $\theta $ be the effective moving average polynomial in the backshift operator with coefficients $\phi _{1}, \;  \ldots , \;  \phi _{p}$ and $\theta _{1}, \;  \ldots , \;  \theta _{q}$, obtained by multiplying the respective nonseasonal and seasonal factors. Then, a random sequence $\mu _ t$ that follows an ARIMA(p,d,q)${\times }$(P,D,Q)$_{\mi {s}}$ model with a white noise sequence $a_ t$ has a state space form with state vector of size $m = \max (p, q+1)$. The system matrices are as follows: $ \mb {Z} = \left[1 \;  0 \;  \ldots \;  0 \right]$, and the transition matrix $\mb {T}$, in a blocked form, is given by

\[  \mb {T} = \left[ \begin{tabular}{cc} $0$   &  $I_{m-1}$   \\ $\phi _{m}$ \;  \ldots   &  $ \phi _1$   \end{tabular} \right]  \]

where $\phi _{i} = 0$ if $i > p$ and $I_{m-1}$ is an $(m-1)$ dimensional identity matrix. The covariance of the state disturbance matrix $ \mb {Q} = \sigma ^{2} \psi \psi ^{} $, where $\sigma ^{2}$ is the variance of the white noise sequence $a_ t$ and the vector $\psi = \left[\psi _{0} \ldots \psi _{m-1} \right]^{} $ contains the first $m$ values of the impulse response function—that is, the first $m$ coefficients in the expansion of the ratio ${\theta } / {\phi }$. The sequnce $\mu _ t$ is stationary if and only if $d=0$ and $D=0$; in this case the initial state is nondiffuse. The covariance matrix of the initial state, $\mb {Q}_1$, in the stationary case is computed by

\[  \mi {vec}(\mb {Q}_{1}) = (\mb {I} - \mb {T}\bigotimes \mb {T})^{-1} \mi {vec}(\mb {Q})  \]

where $\bigotimes $ denotes the Kronecker product and the $\mi {vec}$ operation on a matrix creates a vector formed by vertically stacking the rows of that matrix. If either $d$ or $D$ is nonzero, the initial state is treated as fully diffuse.

Trend Models for Irregular Data

A good reference for these models is de Jong and Mazzi (2001). Throughout this section $h_ t = (\tau _{t+1} - \tau _{t})$ denotes the difference between the successive time points. The system matrices $\mb {T}_{t}$ and $\mb {Q}_{t}$ that govern these models depend on $h_ t$. However, whenever the notation is unambiguous, the subscript $t$ is omitted.

Polynomial Spline Trend

This model is a general-purpose tool for extracting a smooth trend from the noisy data. The order of the spline governs the order of the local polynomial that defines the spline. In the SSM procedure, the order is restricted to be an integer 1, 2, or 3; the default order is 1. The order-1 spline corresponds to a random walk, the order-2 spline corresponds to an integrated random walk, and the order-3 spline provides a locally quadratic trend. The dimension of the state underlying this component is the same as the order of the spline. The system matrices for the different orders are described below (in all the cases the initial condition is fully diffuse):

  • order-1 spline: $\mb {Z}= (1)$, $\mb {T}= (1)$, and $\mb {Q}= \sigma ^{2} (h)$

  • order-2 spline: $\mb {Z}= (1\;  0)$, $\mb {T}= (1\;  h, \; 0 \;  1)$, and $\mb {Q} = \sigma ^{2} \left( \frac{h^3}{3} \; \;  \frac{h^2}{2}, \frac{h^2}{2} \; \;  h \right)$

  • order-3 spline: $\mb {Z}= (1\;  0\;  0)$, $\mb {T}= \left( 1 \; \;  h \; \;  \frac{h^2}{2}, 0 \; \;  1 \; \;  h, 0 \; \;  0 \; \;  1 \right)$, and

    \[  \mb {Q}[i, j] = \sigma ^{2}* \frac{h^{6-i-j+1}}{(6-i-j+1)(3-i)! (3-j)! } \; \;  1 \leq i, j \leq 3  \]
Decay and Growth Trends

There are two choices for the decay trend: DECAY and DECAY(OU). Similarly, there are two choices for the growth trend: GROWTH and GROWTH(OU). The OU stands for the Ornstein-Uhlenbeck form of these models. The decay trend is a sum of two correlated components: one component is a random walk, and the other component is a stationary autoregression. In its Ornstein-Uhlenbeck form, the random walk component is replaced by a constant. The growth trend (and its Ornstein-Uhlenbeck variant) has the same form as the decay trend except that the autorgression is nonstationary (in fact, it is explosive). For growth trend models, floating-point errors can result for even moderately long forecast horizons because of the explosive growth in the trend values.

The system matrices for the decay and the growth types in their respective cases are identical, except for the sign of the rate parameter $\phi $: $\phi < 0.0$ for the decay type, and $\phi > 0.0$ for the growth type. In addition, the initial conditions for the growth models are fully diffuse; they are only partially diffuse for the decay models. The underlying state vector for all these models is two-dimensional.

The system matrices for the DECAY type are:

$\displaystyle  \mb {Z}  $
$\displaystyle =  $
$\displaystyle  (1 \;  1) \nonumber  $
$\displaystyle \mb {T}  $
$\displaystyle  =  $
$\displaystyle  \mr {Diag} (1, \;  \exp (h \phi )) \nonumber  $
$\displaystyle \mb {Q}  $
$\displaystyle =  $
$\displaystyle \frac{ \sigma ^{2}}{\phi ^{3}} \left(\;  h \phi \; \;  1 - \exp (h \phi ),\; \;  1 - \exp (h \phi )\; \;  (\exp (2 h \phi ) - 1)/2 \;  \right) \nonumber  $

The initial condition is partially diffuse with $\mb {Q_{1}}= \mr {Diag} (0, \;  \frac{- \sigma ^{2}}{2 \phi ^{3}} )$. The system matrices for the GROWTH type are the same (with $\phi > 0.0$), except that the initial condition is fully diffuse; so $\mb {Q_{1}}=0$.

For the DECAY(OU) type, $\mb {Z}$ and $\mb {T}$ are the same as DECAY, whereas

\[  \mb {Q}= \mr {Diag} \left(\; 0, \;  \sigma ^{2} \frac{(\exp (2 h \phi ) - 1)}{2\phi } \;  \right) \; \; \mr {and} \; \;  \mb {Q_{1}}= \mr {Diag} (0, \;  \frac{- \sigma ^{2}}{2 \phi } )  \]

The system matrices for the GROWTH(OU) type are the same (with $\phi > 0.0$), except that the initial condition is fully diffuse; so $\mb {Q_{1}}=0$.