Skip to content

Instantly share code, notes, and snippets.

@stepan-a
Created November 27, 2013 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stepan-a/7678197 to your computer and use it in GitHub Desktop.
Save stepan-a/7678197 to your computer and use it in GitHub Desktop.
How to simulate a transition with noise using the stoch_simul command (Dynare)?
var y;
varexo e;
parameters rho, sigma, ybar;
ybar = 2;
rho = .99;
sigma = .01;
model;
y = (1-rho)*ybar + rho*y(-1) + sigma*e;
end;
shocks;
var e; stderr 1;
end;
histval;
y(0) = 0;
end;
stoch_simul(order=1,periods=500,drop=0);
plot(y);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment