Negative shocks

How is one to generate negative shocks in Dynare? Thanks.

In which context? Simulations or IRFs?

IRFs predominantly and both secondly.

For simulations, Dynare randomly draws from the shock distribution and some shocks are negative, of course. If you use the simult_ function for generating your own simulations, you can select any shock you like.
For IRFs, Dynare by default draws a positive one standard deviation shocks. If you have an AR(1) process like


and you want an IRF to a negative shock, write the process as


Due to symmetry of the normal distribution, this change does not affect anything in your model.


That’s right; thank you, sir. By one’s own simulations do you mean typing up one’s own code? For instance, how could I get this one (attached) to generate IRFs to more than one of the three shocks present within the model? - As in, getting it to reproduce IRFs to the three shocks like in the Dynare code. Thanks.

Take a look at DSGE_mod/RBC_news_shock_model.mod at master · JohannesPfeifer/DSGE_mod · GitHub. It shows how to use the simult_ function in Dynare to build any shock sequence for IRFs you like.

Thank you; I shall. Yet, I beg your pardon, what I was mainly asking was how to modify the second code, in the “Solutions” section, so as to generate IRFs to more than just one shock, like in Dynare. I’d really appreciate your assistance thereat. I am attaching the notes just for clarity. Gratitude.

% Solutions

w_solution = NaN(10,T);
x_solution = NaN(10,T);

w_solution(:,1) = [0.1; 0.1; 0.1; 0.1; 0.1; 0.1; 0.1; 0.1; 0.1; 0.1];
x_solution(:,1) = inv(Pi_t_11) * w_solution(:,1);

for t = 2:T
        x_solution(:,t) = inv(Upsilon_11)*Psi_11*x_solution(:,t-1);
        w_solution(:,t) = Pi_t_11*x_solution(:,t);

I am not familiar with your code and what you are trying to achieve and thus cannot provide support.

I was trying to reproduce IRFs to the 3 shocks and not just the first one. Thank you, anyways.