Skip to content

Instantly share code, notes, and snippets.

@stepan-a
Created November 27, 2013 16:13
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/7678365 to your computer and use it in GitHub Desktop.
Save stepan-a/7678365 to your computer and use it in GitHub Desktop.
How to simulate a transition with noise using the extended_path 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;
extended_path(periods=500);
plot(oo_.endo_simul(1,:)); // Cannot use y variable directly here (this is a bug we need to fix).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment