negative shock in stochastic simulation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

negative shock in stochastic simulation

Postby LittleFish » Sun Feb 19, 2012 1:55 am

Does anybody know how to impose a negative shock, say a decrease in government spending, in a stochastic simulation? Thanks!

I tried: var g = -0.1. But there seems to be some problem with the cholesky decomposition.

??? Error using ==> chol
Matrix must be positive definite.

Error in ==> th_autocovariances at 142
cs = chol(SS)';

Error in ==> disp_th_moments at 37
[oo_.gamma_y,stationary_vars] = th_autocovariances(dr,ivar,M_,options_);

Error in ==> stoch_simul at 134
disp_th_moments(oo_.dr,var_list);

Error in ==> model4a at 323
info = stoch_simul(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;
LittleFish
 
Posts: 12
Joined: Sun Jan 29, 2012 4:27 pm

Re: negative shock in stochastic simulation

Postby jpfeifer » Sun Feb 19, 2012 9:56 am

Leave everything as in the positive shock case, but instead of adding a positive shock, subtract a positive one. In the model block, if you had something like:
Code: Select all
G=rho*G+eps_g;

it should read
Code: Select all
G=rho*G-eps_g;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests