Advanced Time Series - Part II - PS1

You are hired in the central bank of country Listoland. They forecast GDP with univariate methods. Their goal is to forecast quarterly GDP growth. As of today (april 6th 2018), the last observation available is 2017Q4. You think that there is information in other variables that could be related to GDP growth. In particular, they have available employment, credit levels, industrial production and they have a good economic sentiment survey . All variables are monthly.

You know that employment is related to current and lagged activity. In particular, employment growth in month “t” is related to activity in “t”, “t-1” and “t-2”. The last observation of employment available is March 2018.

You know that credit is a leading variable. Credit growth in period “t” is related to activity in “t+1”.The last observation of credit available is March 2018.

Industrial production (IP) is a coincident variable. IP growth in period “t” is related to current activity. The last observation of IP available is February 2018.

They are not sure about the use of the economic sentiment survey. Actually, in a first approach you are not going to use it, but the last observation available is for March 2018.

You want to go step by step. First you write a model with just the three monthly variables in monthly growth rates (IP, credit and employment).

Question 1:Write the state space representation of this three variable model. With the previous model you obtain a monthly factor.

Solution

The first thing to do is to demean all variables. The second to take logs and first differences to express the variables in growth rates. After doing so, we will denote the vector of observable variables as \(y_t\)

\[ {y_t} =\begin{bmatrix} \Delta y_{1t} \\ \Delta y_{2t}\\ \Delta y_{3t}\end{bmatrix} = \begin{bmatrix} Employment\quad Growth_t \\Industrial \quad Production_t\\Credit\quad Grwoth\end{bmatrix} \]

We want to obtain a monthly factor that embeds all the information contained in this three variables. To do so, we will describe the dynamics of the observable variables, the unobservable variables, and the idiosyncratic shocks affecting the observable variables. Without the loose of generality we can assume that the factor and the idiosyncratic shock follows a AR(2).

\[ \begin{align*} \Delta y_{i,t} &= \gamma_i f_t + \epsilon_{i,t} \\ f_t &= \phi_1 f_{t-1} + \phi_2 f_{t-2} \\ e_{i,t} &= \psi_{i,1} \epsilon_{i, t-1} + \psi_{i,1} \epsilon_{i, t-2} + \epsilon_{t} \end{align*} \]

From this point, we can write the model in the general state space formulation:

\[ \begin{align*} y_t &= A'x_t + H'h_t +w_t \quad Observation \quad Eq. \\ h_t &= Fh_{t-1} + v_t \quad \quad \quad \quad State\quad Eq. \end{align*} \]

Where, \(F=(rxr)\) and \(A'=(nxk)\) and \(H'=(nxr)\).

We also assume that the vectors \(w_t\) and \(v_t\) are withe noise with a VCV matrix such as \(R=(nxn)\) and \(Q=(rxr)\) and orthogonal to each other:

\[ \begin{align*} \mathbb{E}(w_t w_\tau') &= R \quad for \quad t=\tau \quad and \quad 0 \quad o.w. \\ \mathbb{E}(v_t v_\tau') &= Q \quad for \quad t=\tau \quad and \quad 0 \quad o.w. \end{align*} \]

Now we are in a position to write the matrices. It is clear that there are not exogenous variables in the model so \(A'=0\). We also know that \(y_{1t}\) is related to \(f_t, f_{t-1}, f_{t-2}\), we know that \(y_{2,{t-1}}\) is related to \(f_t\), and \(y_{3t}\) is related to \(f_t\),

Observation Equation

\[ \begin{bmatrix} \Delta y_{1t} \\ \Delta y_{2t-1}\\ \Delta y_{3t}\end{bmatrix} = \begin{bmatrix} 0& \gamma_{1,1} & \gamma_{1,2} &\gamma_{1,3} & 1& 0& 0& 0& 0 &0 \\ 0& 0& \gamma_2 & 0 &0 & 0& 1& 0& 0& 0\\ \gamma_3 & 0 &0 & 0& 0& 0& 0& 0& 1& 0 \end{bmatrix} \begin{bmatrix} f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ e_{1t} \\ e_{1t-1} \\ e_{2t} \\ e_{2t-1} \\ e_{3t} \\ e_{3t-1} \\ \end{bmatrix} \]

Transition equation

\[ \begin{bmatrix} f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ e_{1t} \\ e_{1t-1} \\ e_{2t-1} \\ e_{2t-2} \\ e_{3t} \\ e_{3t-1} \\ \end{bmatrix} = \begin{bmatrix} \theta_1 & \theta_2 &0&0&0&0&0&0 &0&0\\ 0 &\phi_1 & \phi_2 &0&0&0&0&0&0 &0\\ 0& 1 &0&0&0&0&0&0&0&0 \\ 0& 0 &1&0&0&0&0&0&0&0 \\ 0 & 0&0&0 &\psi_{11}&\psi_{12}&0&0&0&0 \\ 0& 0 &0&0&1&0&0&0 &0&0 \\ 0 & 0 & 0 & 0&0&0&0 \psi_{21}&\psi_{22}&0&0 \\ 0& 0 &0&0&0&0&1&0 &0&0\\ 0 & 0 & 0 & 0&0&0&0&0&0 \psi_{21}&\psi_{22} \\ 0& 0 &0&0&0&0&0&0 &1&0&\\ \end{bmatrix} \begin{bmatrix} f_{t}\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ e_{1t-1} \\ e_{1t-2} \\ e_{2t-2} \\ e_{2t-3} \\ e_{3t-1} \\ e_{3t-2} \\ \end{bmatrix} + \begin{bmatrix} w_{t+1}\\w_t\\0 \\0\\\epsilon_{1t} \\0\\\epsilon_{2t} \\0\\\epsilon_{3t} \\0\\ \end{bmatrix} \]

Question 2. (5 points) You want to check the correlation between this monthly factor and the quarterly GDP growth. How can you calculate the correlation of a monthly factor and quarterly GDP growth? Explain your answer.

You want to check the correlation between this monthly factor and the quarterly GDP growth. The GDP growth is denoted as \(x_t\) and the factor is denoted \(f_t\). The GDP growth is in quaterly frequency while the factor is in monthly frequency. The cross-covariance function is:

\[ \sigma_{xf} (T) = \frac{1}{N-1}\sum_{t=1} ^T (x_t - \mu_x) (f_t - \mu_f) \]

And its normalized cross-correlation is:

\[ \rho_{xf}(T) = \frac{\sigma_{xf} (T)}{\sqrt{\sigma_{xx} (0)\sigma_{ff} (0)}} \]

Because of the different frequency there are two main options. The first one is to enlarge the GDP growth time series to a higher frequency with a temporal disagregation method such as Chow Lin. The second one is to approximate the quarterly growth rates of our factor.

Following Camacho and Martínez-Martín (BdE, 2014) Let us assume that the level of GDP in quarter \(\tau\), \(Y^*_\tau\) can be decomposed as the sum of three unobservable monthly values Yt, Yt-1, Yt-2, where t, t-1 and t-2 refer to the three months of quarter \(\tau\) in this case. For instance, the GDP for the third quarter of a given year is the sum of the GDP corresponding to the three months of the third quarter

\[ Y^*_{III} = Y_{09} +Y_{08}+Y_{07} \]

Or equvalently

\[ Y^*_{III} = 3 \frac{Y_{09} +Y_{08}+Y_{07}}{3} \]

This sample mean can be approximated by the geometric mean:

\[ Y^*_{III} = 3 (Y_{09} +Y_{08}+Y_{07})^{1/3} \]

then the quarterly growth rates can be decomposed as weighted averages of monthly growth rates. Taking logs of expression above leads to: \[ lnY^*_{III} = ln3 + \frac{1}{3}(lnY_{09} + lnY_{08}+lnY_{07}) \]

Which allows us to compute the quarterly growth rate for the third quarter as

\[ \begin{align*} lnY^*_{III} - lnY^*_{II} =& \frac{1}{3}(lnY_{09} + lnY_{08}+lnY_{07})-\frac{1}{3}(lnY_{06} + lnY_{05}+lnY_{04})\\ =& \frac{1}{3}[(lnY_{09}-lnY_{06})+ (lnY_{08}-lnY_{05}) + (lnY_{07}-lnY_{04})] \end{align*} \]

We now can redefine \(y^*_{III}= lnY^*_{III} - lnY^*_{II}\) and generally \(y_j = lnY_j - lnY_{j-1}\) to define:

\[ y^*_{III} = \frac{1}{3}(lnY_{09}-lnY_{08}+ 2lnY_{08}-lnY_{07}+ 3lnY_{07}- 3lnY_{06}+ 2lnY_{06}-2lnY_{05} + lnY_{05} -lnY_{04} ) \]

\[y^*_{III} = \frac{1}{3} y_{09}+ \frac{2}{3}y_{08}+ y_{07}+ \frac{2}{3}y_{06} + \frac{1}{3}y_{05}\]

Calling \(y^*_\tau\) the quarter-over-quarter growth rate in quarter \(\tau\), and \(y_t\) the respective month-over-month growth rate that refers to the last month of the quarter, this expression can directly be generalized as \[y^*_{\tau} = \frac{1}{3} y_{t}+ \frac{2}{3}y_{t-1}+ y_{t-2}+ \frac{2}{3}y_{t-3} + \frac{1}{3}y_{t-4}\]

This aggregation rule represents the quarterly growth rate as the weighted sum of five monthly growth rates. Therefore, previous process can be followed to aggregate the monthly factor into quarterly growth rates and calculate the correlation using the correlation function stated at the beginning of the solution.

Question 3. (5 points) Suppose now that you decide to use GDP growth in the Kalman filter as one more additional variable.Write the state space representation.

Because of the quarterly nature of the GDP

The observation equation:

\[ \begin{bmatrix} y^*_t\\ \Delta y_{1t} \\ \Delta y_{2t-1}\\ \Delta y_{3t}\end{bmatrix} = \begin{bmatrix} 0& \frac{\gamma_{y}}{3} & \frac{2\gamma_{y}}{3} &\gamma_{y} & \frac{2\gamma_{y}}{3}& \frac{\gamma_{y}}{3}& 1/3& 2/3& 1 &2/3 &1/3 &0& 0&0& 0 &0 &0 \\ 0& \gamma_{1,1} & \gamma_{1,2} &\gamma_{1,3} & 0& 0& 0& 0 &0 &0 &0 & 1& 0& 0& 0& 0 &0 \\ 0& 0& \gamma_2 & 0 &0 & 0& 0& 0& 0& 0 & 0& 0& 0&1 &0 & 0& 0\\ \gamma_3 & 0 &0 & 0& 0& 0& 0& 0& 0& 0 & 0& 0& 0&0 &0 & 1& 0 \end{bmatrix} \begin{bmatrix} f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ f_{t-4}\\ e^y_{t} \\ e^y_{t-1} \\ e^y_{t-2} \\ e^y_{t-3} \\ e^y_{t-4} \\ e_{1t} \\ e_{1t-1} \\ e_{2t} \\ e_{2t-1} \\ e_{3t} \\ e_{3t-1} \\ \end{bmatrix} \]

The state equation:

\[ \begin{bmatrix}f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ f_{t-4}\\ e^y_{t} \\ e^y_{t-1} \\ e^y_{t-2} \\e^y_{t-3} \\ e^y_{t-4} \\ e_{1t} \\ e_{1t-1} \\ e_{2t} \\ e_{2t-1} \\ e_{3t} \\ e_{3t-1} \\\end{bmatrix} = \begin{bmatrix}\theta_1 & \theta_2 &&&&&& &&&&&&&&&\\ &\phi_1 & \phi_2 &&&&&& &&&&&&&&\\& 1 &&&&&&&& &&&&&&&\\& &1&&&&&&& &&&&&&&\\& &&1&&&&&& &&&&&&&\\& &&&1&&&&& &&&&&&&\\& &&&&&&&& &&&&&&&\\& &&&&1&&&& &&&&&&&\\& &&&&&1&&&&&&&&&& \\& &&&&&&1&& &&&&&&&\\& &&&&&&&1&&&&&&&& \\&&&&&&&&&1 &&&&&&&\\& &&&&&&&&&&&&&&& \\&& & && & & & & & &\psi_{11}&\psi_{12}&&&& \\& &&&&&& &&&&&1&&&& \\&&&&&& & & &&&& & \psi_{21}&\psi_{22}&&& \\& &&&&&& &&&&&&1&&&\\&&&&&&& & & & &&&&& \psi_{21}&\psi_{22} \\& &&&&&& &&& &&&&&1&\\\end{bmatrix} \begin{bmatrix}f_t\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ f_{t-4}\\f_{t-5} \\ e^y_{t-1} \\ e^y_{t-2} \\e^y_{t-3} \\ e^y_{t-4} \\ e^y_{t-5}\\ e_{1t-1} \\ e_{1t-2} \\ e_{2t-1} \\ e_{2t-2} \\ e_{3t-1} \\ e_{3t-2} \\\end{bmatrix} + \begin{bmatrix}w_t\\0 \\0 \\0\\0 \\0\\0\\ \epsilon^y_{t} \\ 0 \\ 0 \\ 0 \\ 0 \\\epsilon_{1t}\\ 0 \\\epsilon_{2t}\\ 0 \\\epsilon_{3t}\\0 \end{bmatrix} \]

Question 4. (5 points) Now you have two models, model of question 1 and model of question 3. How would you forecast GDP growth in each of these models and which forecast should be better? Explain your answer.

To decide which model is better it is possible to estimate one of the most importants KPI’s, the Root Mean Squared Error. If we define the error as the difference between the forecasts for t and the actual value:

\[ e_t = y^f_t - y_t \]

Then we can compute the RMSE as:

\[ RSME = \sqrt{\frac{1}{n}\sum e^2_t} \]

Then the method with lower RMSE should be the better.

Question 5 (5 points) Write the state space representation of the model that contain GDP and the four indicators (IP, employment and credit in monthly growth rate and the economic sentiment survey in levels)

The state equation

\[ \begin{bmatrix} y^*_t\\ \Delta y_{1t} \\ \Delta y_{2t-1}\\ \Delta y_{3t} \\ \Delta y_{4t}\end{bmatrix} = \begin{bmatrix} 0& \frac{\gamma_{y}}{3} & \frac{2\gamma_{y}}{3} &\gamma_{y} & \frac{2\gamma_{y}}{3}& \frac{\gamma_{y}}{3}& 1/3& 2/3& 1 &2/3 &1/3 &0& 0&0& 0 &0 &0 &0 &0\\ 0& \gamma_{1,1} & \gamma_{1,2} &\gamma_{1,3} & 0& 0& 0& 0 &0 &0 &0 & 1& 0& 0& 0& 0 &0&0 &0 \\ 0& 0& \gamma_2 & 0 &0 & 0& 0& 0& 0& 0 & 0& 0& 0&1 &0 & 0& 0&0 &0\\ \gamma_3 & 0 &0 & 0& 0& 0& 0& 0& 0& 0 & 0& 0& 0&0 &0 & 1& 0 &0 &0\\ \gamma_4 & \gamma_4 &\gamma_4 & \gamma_4 & \gamma_4 & \gamma_4 & \gamma_4 & \gamma_4 & \gamma_4 & 0& 0& 0&0 &0 & 1& 0 & 0 &0 &0 \end{bmatrix} \begin{bmatrix} f_{t+3}\\ f_{t+2}\\ f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ f_{t-4}\\ e^y_{t} \\ e^y_{t-1} \\ e^y_{t-2} \\ e^y_{t-3} \\ e^y_{t-4} \\ e_{1t} \\ e_{1t-1} \\ e_{2t} \\ e_{2t-1} \\ e_{3t} \\ e_{3t-1} \\\\ e_{4t} \\ e_{4t-1} \\ \end{bmatrix} \]

The observation equation

\[ \begin{bmatrix} f_{t+3}\\ f_{t+2}\\ f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ f_{t-4}\\ e^y_{t} \\ e^y_{t-1} \\ e^y_{t-2} \\ e^y_{t-3} \\ e^y_{t-4} \\ e_{1t} \\ e_{1t-1} \\ e_{2t} \\ e_{2t-1} \\ e_{3t} \\ e_{3t-1} \\\\ e_{4t} \\ e_{4t-1} \\ \end{bmatrix} = \begin{bmatrix}\theta_1 & \theta_2 &&&&&& &&&&&&&&&\\ & 0 \ &&&&&& &&&&&&&&\\&& 1 &&&&&&&& &&&&&&&\\& & &1&&&&&&& &&&&&&&\\&& &&1&&&&&& &&&&&&&\\& & &&&1&&&&& &&&&&&&\\& &&&&&1&&&&&&&&&&&\\& &&&&&&1&&&& &&&&&&&\\& &&&&&&&0&&&&&&& \\&&& & & & & & &\psi_{11}&\psi_{12}&&&& \\& &&&&&&& &&1&&&&&&& \\& && &&&&&& &&1&&&&&&& \\& &&&&&& & &&&&1&&&&&&& \\ \\&&&&&& & & &&&& & \psi_{21}&\psi_{22}&&& \\& &&&&&&& &&&&&1&&&\\&&&&&&& & & & &&&&& \psi_{21}&\psi_{22} \\& &&&&&& &&& &&&&&1&\\ &&&&&&&&&&&&&&&&&\psi_{21}&\psi_{22} \\& &&&&&& &&&&& &&&&&1& \\ &&&&&&&&&&&&&&&&&&&\psi_{21}&\psi_{22} \\& &&&&&& &&&&&&& &&&&&1& \end{bmatrix} \begin{bmatrix} \\ f_{t+2}\\ f_{t+1}\\ f_t\\ f_{t-1}\\ f_{t-2}\\ f_{t-3}\\ f_{t-4}\\ f_{t-5}\\ e^y_{t} \\ e^y_{t-1} \\ e^y_{t-2} \\ e^y_{t-3} \\ e^y_{t-4} \\ e_{1t} \\ e_{1t-1} \\ e_{2t} \\ e_{2t-1} \\ e_{3t} \\ e_{3t-1} \\\\ e_{4t} \\ e_{4t-1} \\ \end{bmatrix} \]

And withe error matrix:

\[ \begin{bmatrix} w_t \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \epsilon^y_{t} \\ 0 \\ 0 \\ 0 \\ 0 \\ \epsilon_{1t}\\ 0 \\\epsilon_{2t}\\ 0 \\ \epsilon_{3t} \\0 \end{bmatrix} \]

Question 6 (5 points) How can you check if the model in question 5 is better than the model in question 3?

Again, using the RMSE and seeking the model with lower RMSE.

Question 7. (5 points) Suppose now that the survey is only available quarterly, not monthly, but still, they tell you that they use it in levels and it is related to annual activity three months lead. Write the state space representation of the model that contain GDP and the four indicators (IP, employment and credit in monthly growth rate and the economic sentiment survey in levels)

Question 8. (5 points) Suppose now that the IMF visits your country and they claim that the recovery is being slow because in your country there is a credit crunch. Basically banks are not giving enough credit to the non-financial sector. You want to formally corroborate or refuse that statement and you decide to do the following. You delete the observations of credit for the last 5 years and you estimate the model with the missing observations for credit for this 5 years period.

After you estimate the model you “backcast” the 5 years of credit growth. Suppose that you estimate a path in the level of credit associated with the estimated credit growth that is way below the path of credit observed in the data. What is this evidence telling you about the statement of the IMF?

The evidence suggests that they are right. Because that level of growth should, ceteris paribus, be sustained with higher level of credit. Therefore there is a credit crunch and the model supports the idea.