Cointegration and the ECM Two nonstationary time series are cointegrated if they tend to move together through time. For instance, we have established that the levels of the Fed Funds rate and the 3-year bond rate are nonstationary, whereas their differences are stationary. In the opaque terminology used in the time series literature, each series is said to be integrated of order 1 or I(1). If the two nonstationary series move together through time then we say they are cointegrated. Economic theory would suggest that they should be tied together via arbitrage, but that is no guarantee, so we perform a formal statistical test. The test procedure is very simple. Regress one I(1) variable on another using least squares. Then test the residuals for nonstationarity using the (augmented) Dickey-Fuller test. If the series are cointegrated, the Dickey-Fuller test statistic will be statistically significant. The null hypothesis is that the residuals are nonstationary. Rejection of this leads to the conclusion that the residuals are stationary and the series are cointegrated. Time Series Plots qui tsline f, name(f, replace) qui tsline D.f, name(df, replace) yline(0) qui tsline b, name(b, replace) qui tsline D.b, name(db, replace) yline(0) graph combine f df b db, cols(2) This produces the set of graphs federal funds rate 0 5 10 15 federal funds rate, D -2-1 0 1 3-year Bond rate 2 4 6 8 10 12 3-year Bond rate, D -2-1 0 1 2
Neither series looks stationary in levels; their general trend is downward. The differences do look stationary. I see no trend in the differences and both are centered about zero. Proceed with the formal stationarity tests. Here are the DF-GLS test results for the levels: DF-GLS for f Number of obs = 91 Maxlag = 12 chosen by Schwert criterion DF-GLS tau 1% Critical 5% Critical 10% Critical [lags] Test Statistic Value Value Value 12-3.035-3.575-2.753-2.479 11-3.025-3.575-2.783-2.508 10-2.905-3.575-2.813-2.537 9-3.107-3.575-2.842-2.565 8-3.097-3.575-2.870-2.591 7-3.602-3.575-2.898-2.617 6-3.732-3.575-2.924-2.641 5-3.436-3.575-2.949-2.664 4-3.290-3.575-2.972-2.686 3-3.793-3.575-2.994-2.706 2-3.499-3.575-3.014-2.723 1-3.278-3.575-3.031-2.739 Opt Lag (Ng-Perron seq t) = 1 with RMSE.3535111 Min SC = -1.980541 at lag 1 with RMSE.3535111 Min MAIC = -1.808821 at lag 1 with RMSE.3535111. dfgls b DF-GLS for b Number of obs = 91 Maxlag = 12 chosen by Schwert criterion DF-GLS tau 1% Critical 5% Critical 10% Critical [lags] Test Statistic Value Value Value 12-2.556-3.575-2.753-2.479 11-2.571-3.575-2.783-2.508 10-2.265-3.575-2.813-2.537 9-2.787-3.575-2.842-2.565 8-3.270-3.575-2.870-2.591 7-2.896-3.575-2.898-2.617 6-3.185-3.575-2.924-2.641 5-3.206-3.575-2.949-2.664 4-2.995-3.575-2.972-2.686 3-3.392-3.575-2.994-2.706 2-2.924-3.575-3.014-2.723 1-3.095-3.575-3.031-2.739 Opt Lag (Ng-Perron seq t) = 3 with RMSE.4644163 Min SC = -1.371452 at lag 1 with RMSE.4793635 Min MAIC = -1.216796 at lag 1 with RMSE.4793635 The lags appear to be fairly short (actually, 1 in both cases). The statistic is in the 5% rejection region for both series (lag=1). That doesn t bode well for the rest of the example, which relies on these series to be random walks. A Phillips-Perron test, which also has a null-hypothesis of unit root, is performed for both series. We include the trend option since the level of each appears to have a deterministic downward trend (though this certainly could not be true in the population, could it? I mean, can interest rates go down forever?). In neither case could the unit root null be rejected at 5% level. So, we will assume that b and f are I(1). Here are some details about the pperron command in Stata.
Syntax pperron varname [if] [in] [, options] options Main noconstant trend regress lags(#) description suppress constant term include trend term in regression display regression table use # Newey-West lags You must tsset your data before using pperron; see [TS] tsset. varname may contain time-series operators; see tsvarlist. Menu Statistics > Time series > Tests > Phillips-Perron unit-root test Description pperron performs the Phillips-Perron test that a variab le has a unit root. The null hypothesis is that the variable contains a unit root, and the alternative is that the variable was generated by a stationary process. pperron uses Newey-West standard errors to account for serial correlation, whereas the augmented Dickey-Fuller test implemented in dfuller uses additional lags of the first-difference variable. and the results for each series. pperron b, trend Phillips-Perron test for unit root Number of obs = 103 Newey-West lags = 4. pperron f, trend Interpolated Dickey-Fuller Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value Z(rho) -16.361-27.420-20.712-17.510 Z(t) -2.978-4.039-3.450-3.150 MacKinnon approximate p-value for Z(t) = 0.1382 Phillips-Perron test for unit root Number of obs = 103 Newey-West lags = 4 Interpolated Dickey-Fuller Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value Z(rho) -13.209-27.420-20.712-17.510 Z(t) -2.560-4.039-3.450-3.150 MacKinnon approximate p-value for Z(t) = 0.2985 Engle-Granger Test The test described below is commonly referred to as the Engle-Granger test. Regress b on f and a constant, save the residuals then use these in an augmented Dickey-Fuller regression. Manually, this is done regress b f predict ehat, residual regress D.ehat L.ehat L.D.ehat, noconstant
Notice that the DF test is augmented using 1 lag of differences.. regress D.ehat L.ehat L.D.ehat, noconstant Source SS df MS Number of obs = 102 F( 2, 100) = 10.16 Model 3.53907328 2 1.76953664 Prob > F = 0.0001 Residual 17.4123657 100.174123657 R-squared = 0.1689 Adj R-squared = 0.1523 Total 20.951439 102.205406265 Root MSE =.41728 D.ehat Coef. Std. Err. t P> t [95% Conf. Interval] ehat L1. -.2245093.0535039-4.20 0.000 -.3306595 -.1183592 LD..2540448.0937006 2.71 0.008.0681454.4399442 The t-ratio on the lagged value of ê is -4.20. The critical value has to be obtained from the proper table. The 5% critical value for a cointegrating regression containing an intercept is -3.37 and the t-ratio is less than this. The null hypothesis of no cointegration is rejected when t tc, and not rejected when t > tc. The t-statistic in this case is 4.196< 3.37 and the null hypothesis that the least squares residuals are nonstationary is rejected; the residuals are stationary. This implies that the bond rate and the federal funds rate are cointegrated. The Error Correction Model Cointegration is a relationship between two nonstationary, I(1), variables. These variables share a common trend and tend to move together in the long-run. In this section, a dynamic relationship between I(0) variables which embeds a cointegrating relationship known as the short-run error correction model is examined. Start with an ARDL(1,1) y =δ+θ y +δ x +δ x + v t 1 t 1 0 t 1 t 1 t after some manipulation (see POE4 for details) y = (1 θ )( y β β x ) +δ x +δ x + v t 1 t 1 1 2 t 1 0 t 1 t 1 t The term in the second set of parentheses is a cointegrating relationship. The levels of y and x are linearly related. Let α= (1 θ1) and the equation s parameters can be estimated by nonlinear least squares. gen Db=D.b nl (Db = -{alpha}*(l.b-{beta1}-beta2}*l.f)+ /// {delta0}*d.f+{delta1}*d.l.f), variables(l.b L.f D.L.f) The only trick here is that the time-series operator D. cannot be used in the formation of the dependent variable. It has to be generated separately before it can be used in nl. The lag and difference operators can be used on the right-hand side of the equation if listed in the variables option. The results are:
Source SS df MS Number of obs = 102 Model 15.0345905 4 3.75864763 R-squared = 0.5146 Residual 14.1807005 97.146192788 Adj R-squared = 0.4946 Root MSE =.3823517 Total 29.215291 101.289260307 Res. dev. = 88.20819 Db Coef. Std. Err. t P> t [95% Conf. Interval] /alpha.1418774.0496561 2.86 0.005.0433237.240431 /beta1 1.429188.6246253 2.29 0.024.18948 2.668897 /beta2.7765569.1224753 6.34 0.000.5334773 1.019637 /delta0.8424631.0897482 9.39 0.000.6643378 1.020588 /delta1 -.3268445.0847928-3.85 0.000 -.4951347 -.1585544 Parameter beta1 taken as constant term in model & ANOVA table By using nonlinear least squares, we are able to estimate the parameters of the error correction model and the cointegrating relationship all at once. To estimate θ 1 scalar theta1 = 1-_b[alpha:_cons] scalar list theta1. scalar list theta1 theta1 =.85812265 Finally, obtain the residuals and perform the ADF test for stationarity. The variable called ehat is the cointegrating relationship, which is lagged in the subsequent regression. gen ehat = L.b - _b[beta1:_cons]-_b[beta2:_cons]*l.f reg D.ehat L.ehat L.D.ehat, noconst di di _b[l.ehat]/_se[l.ehat]. di _b[l.ehat]/_se[l.ehat] -3.9108174 As before, the null is that (y, x) are not cointegrated. Since the cointegrating relationship includes a constant term, the critical value is 3.37. Comparing the calculated value ( 3.912) with the critical value, we reject the null hypothesis and conclude that (y, x) are cointegrated. Stata Code use usa, clear gen = q(1984q1) + _n - 1 format %tq tsset qui tsline f, name(f, replace) qui tsline D.f, name(df, replace) yline(0) qui tsline b, name(b, replace) qui tsline D.b, name(db, replace) yline(0) graph combine f df b db, cols(2) * DF-GLS tests with built in functions dfgls f dfgls b
* DF-GLS on differences dfgls D.f, notrend dfgls D.b, notrend * Engle Granger cointegrations test regress b f predict ehat, residual regress D.ehat L.ehat L.D.ehat, noconstant gen Db=D.b nl (Db = -{alpha}*(l.b-{beta1}-{beta2}*l.f)+{delta0}*d.f+{delta1}*d.l.f), \\\ variables(l.b L.f D.L.f) scalar theta1 = 1-_b[alpha:_cons] scalar list theta1 gen ehat = L.b - _b[beta1:_cons]-_b[beta2:_cons]*l.f qui reg D.ehat L.ehat L.D.ehat, noconst di _b[l.ehat]/_se[l.ehat]