{"word_count": 258, "character_count": 2377}
Consider here some  model,We've seen in class that stationnarity of that time series, in the sense that  and , was valid if the roots (in ) of the characteristic polyonomial - - were outside the unit circle.To visualize this point, consider the following time seriesTo generate that time series, we need to generate a bivariate white noise, i.e.  (not necessarily a diagonal matrix), and . For instance&#62; n=500&#62; r=0.7&#62; set.seed(1)&#62; Z1=rnorm(n)&#62; Z2=rnorm(n)&#62; E1=Z1&#62; E2=r*Z1+sqrt(1-r^2)*Z2To generate now our time series, use&#62; A=matrix(c(.7,.2,.4,.3),2,2)&#62; X1=X2=rep(0,n)&#62; for(t in 2:n){+   X1[t]=A[1,1]*X1[t-1]+A[1,2]*X2[t-1]+E1[t]+   X2[t]=A[2,1]*X1[t-1]+A[2,2]*X2[t-1]+E2[t]  + }Here, we have&#62; plot(X1,type="l",col="red")&#62; lines(X2,col="blue")Those two time series seem to be stationnary. And, indeed,&#62; polyroot(c(1,-sum(diag(A)),det(A)))[1] 1.18+0i 6.51-0i&#62; Mod(polyroot(c(1,-sum(diag(A)),det(A))))[1] 1.18 6.51The two roots of the characteristic polynomial are outsite the unit circle. Now, what if we consider&#62; A=matrix(c(.9,.2,.1,.8),2,2)&#62; A     [,1] [,2][1,]  0.9  0.1[2,]  0.2  0.8This time, one of the two roots is exactly on the border of the circle (i.e. there is a unit root here)&#62; polyroot(c(1,-sum(diag(A)),det(A)))[1] 1.00+0i 1.43-0i&#62; Mod(polyroot(c(1,-sum(diag(A)),det(A))))[1] 1.00 1.43What our series look like, here?&#62; X1=X2=rep(0,n)&#62; for(t in 2:n){+   X1[t]=A[1,1]*X1[t-1]+A[1,2]*X2[t-1]+E1[t]+   X2[t]=A[2,1]*X1[t-1]+A[2,2]*X2[t-1]+E2[t]  + }&#62; plot(X1,type="l",col="red")&#62; lines(X2,col="blue")Here, the two series are integrated. But observe, further more, that those two series are here cointegrated (as defined in class this morning). Indeed, it seems that there is a common factorand the remaining series are stationary.&#62; Z=(X1+X2)/2&#62; plot(Z,type="l")&#62; plot(X1-Z,type="l",col="red")&#62; lines(X2-Z,col="blue")A very different graph would be&#62; A=matrix(c(1,0,0,1),2,2)&#62; A     [,1] [,2][1,]    1    0[2,]    0    1&#62; polyroot(c(1,-sum(diag(A)),det(A)))[1] 1+0i 1-0i&#62; Mod(polyroot(c(1,-sum(diag(A)),det(A))))[1] 1 1Here, the series would be non-stationary, but here, there is no cointegration (even if there might be simultaneous correlation, because of the white noise)&#62; plot(X1,type="l",col="red",ylim=c(-20,20))&#62; lines(X2,col="blue")