Econ 616: Problem Set 1

Problem 1

Let \(\phi (z) \equiv 1 - \phi_1 z - \phi_2 z^2\). What we need to show is the solution of the equation \(\phi ( z) =0\) lies outside of unit circle. Let \(z_1\) and \(z_2\) be the solutions of \(\phi (z) =0\).

Combining all, we have

\begin{eqnarray*} \phi _{1}+\phi _{2}<1,\quad \phi _{2}-\phi _{1}<1\mbox{ and }\phi _{2}>-1. \end{eqnarray*}

Problem 2

Multiplying both sides of the equation by \(y_{t-j}\), we have

\begin{eqnarray*} y_{t}y_{t-j}=\sum_{i=1}^{p}\phi _{i}y_{t-i}y_{t-j}+\epsilon _{t}y_{t-j}. \end{eqnarray*}% Taking the expectation, we have \begin{eqnarray*} E(y_{t}y_{t-j})=\sum_{i=1}^{p}\phi _{i}E(y_{t-i}y_{t-j})+E(\epsilon _{t}y_{t-j}). \end{eqnarray*}% Or we can rewrite the above as \begin{eqnarray*} \gamma _{yy,j}=\sum_{i=1}^{p}\phi _{i}\gamma _{yy,|i-j|}+E(\epsilon _{t}y_{t-j}). \end{eqnarray*}

For \(j=0\), \(E(\epsilon _{t}y_{t-j})=E(\epsilon _{t}y_{t})=E(\epsilon _{t}^{2})=\sigma _{\epsilon }^{2}\) which gives the first equation. For \(% j=1,\dots ,p\), \(E(\epsilon _{t}y_{t-j})=0\) which gives the rest.

For the AR(3) process in Problem 2, we have

\begin{eqnarray*} 1 &=& \gamma_{yy,0}-(1.3\gamma_{yy,1}-0.9\gamma_{yy,2}+0.3\gamma_{yy,3}) \\ 0 &=& 1.3\gamma_{yy,0}-\gamma_{yy,1}+(-0.9\gamma_{yy,1}+0.3\gamma_{yy,2}) \\ 0 &=& -0.9\gamma_{yy,0}-\gamma_{yy,2}+(1.3\gamma_{yy,1}+0.3\gamma_{yy,1})\\ 0 &=& 0.3\gamma_{yy,0}-\gamma_{yy,3}+(1.3\gamma_{yy,2}-0.9\gamma_{yy,1}) \end{eqnarray*}

Solutions to this system of equations are

\(\gamma_{yy,0}=3.38\quad \gamma_{yy,1}=2.45\qquad \gamma_{yy,2}=0.88\qquad \gamma_{yy,3}=-0.48\)

Problem 3

See jupyter notebook

Problem 4

Problem 5

Recall from the lecture notes that the HP filter can be written as:

\begin{eqnarray} f^{HP}(\omega) = \left[\frac{16\sin^4(\omega/2)}{1/1600 + 16\sin^4(\omega/2)}\right]^2. \end{eqnarray}

The spectrum for the AR1 can be written as:

\begin{eqnarray} f^{AR}(\omega) = \left[ 1 - 2 \phi \cos \omega + \phi^2( \cos \omega^2 + \sin^2 \omega ) \right]^{-1}. \end{eqnarray}

From the lecture notes, we know that:

\begin{eqnarray} f^{Y}(\omega) = f^{HP}(\omega) f^{AR}(\omega) \end{eqnarray}

The spectrum for \(\phi=0.95\) and \(\phi=0.70\) is plotted in Figure 3. The spectrum peaks at about \(\pi/8\), which is associated with a cycle lasting about 16 quarters \(=(2\pi/(\pi/8))\). As \(\phi\) increases, this peak sharpens. So here the HP filter is introducing as spurious periodicity in our data.

<ipython-input-4-04db9a7f9b5a>:6: RuntimeWarning: divide by zero encountered in divide
  return ( (sigma**2/(2*omega)) /
<ipython-input-4-04db9a7f9b5a>:9: RuntimeWarning: invalid value encountered in multiply
  f = lambda omega, **kwds: f_HP(omega)*f_AR1(omega, **kwds)
<matplotlib.legend.Legend at 0x7f5cf62fac40>
Figure 1: Spectrum Associated with HP filtering an AR(1)

Figure 1: Spectrum Associated with HP filtering an AR(1)

Another way to see this is look at the autocovariance function of the implied process, which we can recover by the inverse fourier transform as discussed in class:

\begin{eqnarray} \gamma_k = \int_{-\pi}^{\pi} f^{Y}(\omega)e^{i\omega k}. \end{eqnarray}

The HP filter induces complex dynamics into the process!

from scipy.integrate import quad
H = 20
really_small = 1e-8
acf = [quad(lambda omega:
                 2*f(omega)*np.cos(omega*k), really_small, np.pi)[0]
            for k in np.arange(H)]
plt.plot(acf)

phi = 0.95
acf = [ phi**j / (1-phi**2) for j in np.arange(H)]
plt.plot(acf, linestyle='dashed')
Figure 2: ACF of AR(1) vs. ACF of HP filtered Component

Figure 2: ACF of AR(1) vs. ACF of HP filtered Component