应用时间序列分析(2)平稳性及典型时间序列示例

1. 平稳性

  根据观测记录对随机过程的结构进行统计推断时,通常必须对其作出某些简化且大致合理的假设,其中最重要的假设是平稳性。平稳性的基本思想是,决定过程特性的统计规律不随时间的变化而改变。从一定意义上说,过程位于统计的平衡点上。特别地,如果对一切时滞 $k$ 和点 $t_1, t_2, \cdots, t_n$,都有 $Y_{t_1}, Y_{t_2}, \cdots, Y_{t_n}$ 与 $Y_{t_1-k}, Y_{t_2-k}, \cdots, Y_{t_n-k}$ 的联合分布相同,则称过程 $\{Y_t\}$ 为严平稳的。

  当 $n = 1$ 时,对一切 $t$ 和 $k$,$Y_t$ 的(单变量)分布与 $Y_{t-k}$ 相同,换言之,$Y$ 具有相同的(边际)分布。进而,对一切 $t$ 和 $k$,有 $E(Y_t) = E(Y_{t-k})$,因此均值函数恒为常数。另外,对所有 $t$ 和 $k$,有 $\mathrm{Var}(Y_t) = \mathrm{Var}(Y_{t-k})$,因此方差也恒为常数。

  在平稳性的定义中,令 $n = 2$,则可看出 $Y_t$ 和 $Y_s$ 的二元分布也必与 $Y_{t-k}$ 和 $Y_{s-k}$ 的二元分布相同,从而对一切 $t$,$s$ 和 $k$,有

\begin{equation}
\mathrm{Cov}(Y_t, Y_s) = \mathrm{Cov}(Y_{t-k}, Y_{s-k}) \tag{1}
\end{equation}

在上式中,先令 $k = s$,再令 $k = t$,有

\begin{equation}
\gamma_{t, s} = \mathrm{Cov}(Y_{t-s}, Y_0) = \mathrm{Cov}(Y_0, Y_{s-t}) = \mathrm{Cov}(Y_0, Y_{|t-s|}) = \gamma_{0, |t-s|} \tag{2}
\end{equation}

即 $Y_t$ 和 $Y_s$ 的协方差只与时间间隔 $|t – s|$ 有关,而与实际的时刻 $t$ 和 $s$ 无关。简化平稳过程的符号为

\begin{equation}
\gamma_k = \mathrm{Cov}(Y_t, Y_{t-k}) \tag{3}
\end{equation}

\begin{equation}
\rho_k = \mathrm{Corr}(Y_t, Y_{t-k}) = \frac{\gamma_k}{\gamma_0} \tag{4}
\end{equation}

于是有

\begin{align}
& \gamma_0 = \mathrm{Var}(Y_t) & \rho_0 = 1 \\
& \gamma_k = \gamma_{-k} & \rho_k = \rho_{-k} \\
& |\gamma_k| \leq \gamma_0 & |\rho| \leq 1
\end{align}

  如果一个过程是严平稳的,并且具有有限方差,那么协方差函数一定只依赖于时间的滞后长度。

  但在实际中严平稳的条件通常是难以满足的。一个类似严平稳但在数学上更弱的定义为:一个随机过程 $\{Y_t\}$ 称为弱平稳(或者二阶矩平稳)的条件是:

  1. 均值函数在所有时间上恒为常数。
  2. 对所有时间 $t$ 和滞后 $k$,有 $\gamma_{t, t-k} = \gamma_{0, k}$。

之后提及平稳的概念时,通常指的都是弱平稳。如果过程的联合分布族都是多元正态分布,那么可以证明这两个定义是一致的。对于平稳过程,通常只考虑 $k \geq 0$。

2. 白噪声

  白噪声指的是独立同分布的随机变量序列 $\{e_t\}$,$\{e_t\}$,由:

\begin{align}
&P(e_{t_1} \leq x_1, e_{t_2} \leq x_2, \cdots, e_{t_n} \leq x_n) \\
&= P(e_{t_1} \leq x_1) P(e_{t_2} \leq x_e) \cdots P(e_{t_n} \leq x_n) \quad 独立性\\
&= P(e_{t_1-k} \leq x_1) P(e_{t_2-k} \leq x_e) \cdots P(e_{t_n-k} \leq x_n) \quad 同分布 \\
&= P(e_{t_1-k} \leq x_1, e_{t_2-k} \leq x_2, \cdots, e_{t_n-k} \leq x_n)
\end{align}

可见白噪声是严平稳的。此外,$\mu_t = E(e_t)$ 是常数,且有

\begin{equation}
\gamma_k =
\begin{cases}
\mathrm{Var}(e_t) & k = 0 \\
0 & k \neq 0
\end{cases}
\end{equation}

\begin{equation}
\rho_k =
\begin{cases}
1 & k = 0 \\
0 & k \neq 0
\end{cases}
\end{equation}

3. 随机游动

  设 $\{e_t\}$ 为均值为 $0$,方差为 $\sigma_e^2$ 的白噪声,观测时间序列 $\{Y_t: t = 1, 2, \cdots\}$ 为

\begin{align}
Y_1 &= e_1 \\
Y_2 &= e_1 + e_2 \\
&\vdots \\
Y_t &= e_1 + e_2 + \cdots + Y_t \tag{5}
\end{align}

\begin{equation}
Y_t = Y_{t – 1} + e_t \tag{6}
\end{equation}

  由式 $(5)$ 易知

\begin{align}
\mu_t = E(Y_t) &= E(e_1 + e_2 + \cdots + e_t) \\
&= E(e_1) + E(e_2) + \cdots + E(e_t) \quad 独立性 \\
&= 0 + 0 + \cdots + 0 = 0 \tag{7}
\end{align}

\begin{align}
\mathrm{Var}(Y_t) &= \mathrm{Var}(e_1 + e_2 + \cdots + e_t) \\
&= \mathrm{Var}(e_1) + \mathrm{Var}(e_2) + \cdots + \mathrm{Var}(e_1) \quad 独立性 \\
&= \sigma_e^2 + \sigma_e^2 + \cdots + \sigma_e^2 = t \sigma_e^2 \tag{8}
\end{align}

可见随机游动的均值为 $0$,方差随时间增长,是非平稳的。

  假设 $1 \leq t \leq s$,则协方差函数

\begin{equation}
\gamma_{t, s} = \mathrm{Cov}(Y_t, Y_s) = \mathrm{Cov}(e_1 + e_2 + \cdots + e_t, e_1 + e_2 + \cdots + e_{t} + \cdots + e_s)
\end{equation}

前文式$(7)$,有

\begin{equation}
\gamma_{t, s} = \sum_{i=1}^s \sum_{j=1}^t \mathrm{Cov}(e_i, e_j)
\end{equation}

由于 $\{e_t\}$ 是白噪声,仅在 $i = j$ 时有 $\mathrm{Cov}(e_i, e_j) = \mathrm{Var}(e_i) = \sigma_e^2$;对于 $i \neq j$,$\mathrm{Cov}(e_i, e_j) = 0$。于是上式可以化简为 $\gamma_{t, s} = t \sigma_e^2$。又由于 $\gamma_{t, s} = \gamma_{s, t}$,故在所有时点 $t$ 和 $s$ 上,可以确定自协方差函数

\begin{equation}
\gamma_{t, s} = t \sigma_e^2 \quad 1 \leq t \leq s \tag{9}
\end{equation}

自相关函数为

\begin{equation}
\rho_{t, s} = \frac{\gamma_{t, s}}{\sqrt{\gamma_{t, t} \gamma_{s, s}}} = \frac{t \sigma_e^2}{\sqrt{t \sigma_e^2 \cdot s \sigma_e^2}} = \sqrt{\frac{t}{s}} \tag{10}
\end{equation}

可见 $t$ 和 $s$ 越接近、值越大,则正相关程度越强;$t$ 和 $s$ 相差越大,则相关程度越弱。

4. 滑动平均

  假设 $\{Y_t\}$ 构造如下

\begin{equation}
Y_t = \frac{e_t + e_{t-1}}{2} \tag{11}
\end{equation}

其中 $\{e_t\}$ 是均值为 $0$、方差为 $\sigma_e^2$ 的独立同方分布的随机变量序列。此时有

\begin{equation}
\mu_t = E(Y_t) = E\bigg\{ \frac{e_t + e_{t-1}}{2} \bigg\} = \frac{E(e_t) + E(e_{t-1})}{2} = 0
\end{equation}

\begin{equation}
\mathrm{Var}(Y_t) = \mathrm{Var}\bigg\{ \frac{e_t + e_{t-1}}{2} \bigg\} = \frac{\mathrm{Var}(e_t) + \mathrm{Var}(e_{t-1})}{4} = 0.5\sigma_e^2
\end{equation}

\begin{align}
\gamma_{t, t-1} &= \mathrm{Cov}(Y_t, Y_{t-1}) = \mathrm{Cov}(\frac{e_t + e_{t-1}}{2} + \frac{e_{t-1} + e_{t-2}}{2}) \\
&= \frac{1}{4} [Cov(e_t, e_{t-1}) + Cov(e_t, e_{t-2}) + Cov(e_{t-1}, e_{t-1}) + Cov(e_{t-1}, e_{t-2})] \\
&= \frac{1}{4} (0 + 0 + \sigma_e^2 + 0) \\
&= 0.25 \sigma_e^2
\end{align}

\begin{equation}
\gamma_{t, t-2} = \mathrm{Cov}(Y_t, Y_{t-2}) = \mathrm{Cov} \bigg\{ \frac{e_t + e_{t-1}}{2} + \frac{e_{t-2} + e_{t-3}}{2} \bigg\} = 0
\end{equation}

  综上,有

\begin{equation}
\gamma_{t, s} =
\begin{cases}
0.5 \sigma_e^2 & |t – s| = 0 \\
0.25 \sigma_e^2 & |t – s| = 1 \\
0 & |t – s| > 1 \\
\end{cases}
\end{equation}

\begin{equation}
\rho_{t, s} =
\begin{cases}
1 & |t – s| = 0 \\
0.5 & |t – s| = 1 \\
0 & |t – s| > 1 \\
\end{cases}
\end{equation}

可见滑动平均的均值函数为常数,协方差函数只与 $t$ 和 $s$ 之间的距离有关,与 $t$ 和 $s$ 的具体数值无关,滑动平均是平稳的。上式可以写成

\begin{equation}
\rho_k =
\begin{cases}
1 & k = 0 \\
0.5 & |k| = 1 \\
0 & |k| > 1 \\
\end{cases}
\end{equation}