Page 1 of 1

Simulate cointegration

Posted: Sun Sep 22, 2013 6:28 pm
by garch2012
I am trying to generate a simulated cointegration relationship. I would appreciate if you would help me with this.

Code: Select all

create u 1 1000 scalar rho = 0.6 scalar beta = 5 series z = 0 series x = 0 smpl @first+1 @last series z = rho* z(-1) + nrnd 'so Z is a stationary AR(1) + nrnd series x = x(-1) + nrnd 'so X is a non-stationary random walk + nrnd series y = beta*x + z 'so y is a non-stationary random walk + AR(1) + nrnd where y is a function of X and Z
Will this generate exactly 2 cointegrated variables X and Y (obviously Z cannot be cointegrated with the other variables since it is stationary)? What is the cointegration vector in this case?

I am planning a simulation. How, do we simulate that e.g. Y X1 X2 X3 and X4 are cointegrated. What is the cointegration vector? Please change the program with these variables instead.

Any pedagogical information about the topic on a basic level is appreciated. Thanks for your assistance!