Main Content

协整检验使用Engle-Granger测试工程师t

This example shows how to test the null hypothesis that there are no cointegrating relationships among the response series composing a multivariate model.

LoadData_Canadainto the MATLAB® Workspace. The data set contains the term structure of Canadian interest rates[141]. Extract the short-term, medium-term, and long-term interest rate series.

loadData_CanadaY = Data(:,3:end);% Multivariate response series

Plot the response series.

figure plot(dates,Y,'LineWidth',2) xlabel'Year'; ylabel'Percent'; names = series(3:end); legend(names,'location','NW') title'{\bf Canadian Interest Rates, 1954-1994}'; axistightgridon

Figure contains an axes object. The axes object with title blank C a n a d i a n blank I n t e r e s t blank R a t e s , blank 1 9 5 4 - 1 9 9 4 contains 3 objects of type line. These objects represent (INT_S) Interest rate (short-term), (INT_M) Interest rate (medium-term), (INT_L) Interest rate (long-term).

情节显示证据之间的协整three series, which move together with a mean-reverting spread.

To test for cointegration, compute both the τ (t1) and z (t2) Dickey-Fuller statistics.egcitestcompares the test statistics to tabulated values of the Engle-Granger critical values.

[h,pValue,stat,cValue] = egcitest(Y,'test',{'t1','t2'})
h =1x2 logical array0 1
pValue =1×20.0526 0.0202
stat =1×2-3.9321 -25.4538
cValue =1×2-3.9563 -22.1153

The τ test fails to reject the null of no cointegration, but just barely, with ap-value only slightly above the default 5% significance level, and a statistic only slightly above the left-tail critical value. The z test does reject the null of no cointegration.

The test regressesY(:,1)onY(:,2:end)and (by default) an interceptc0. The residual series is

[Y(:,1) Y(:,2:end)]*beta-c0=Y(:,1)-Y(:,2:end)*b-c0.

The fifth output argument ofegcitestcontains, among other regression statistics, the regression coefficientsc0andb.

Examine the regression coefficients to examine the hypothesized cointegrating vectorbeta=[1; -b].

[~,~,~,~,reg] = egcitest(Y,'test','t2'); c0 = reg.coeff(1); b = reg.coeff(2:3); beta = [1;-b]; h = gca; COrd = h.ColorOrder; h.NextPlot ='ReplaceChildren'; h.ColorOrder = circshift(COrd,3);

Figure contains an axes object. The axes object with title blank C a n a d i a n blank I n t e r e s t blank R a t e s , blank 1 9 5 4 - 1 9 9 4 contains 3 objects of type line. These objects represent (INT_S) Interest rate (short-term), (INT_M) Interest rate (medium-term), (INT_L) Interest rate (long-term).

plot(dates,Y*beta-c0,'LineWidth',2); title'{\bf Cointegrating Relation}'; axistight; legendoff; gridon;

Figure contains an axes object. The axes object with title blank C o i n t e g r a t i n g blank R e l a t i o n contains an object of type line.

The combination appears relatively stationary, as the test confirms.

See Also

Apps

Functions

Related Topics