Dynare command help

dear dynare, I want to know the following command’s means, and what is it?

stoch_simul(order=1,irf=20,nomoments) y ce ch re rh abh ;
ex_=[  0.001169*ones(12,1); zeros(16,1)];

Thanks a lot.


The first line solves a first order approximation of the model, and computes IRFs. The following lines use the reduced form solution of the approximated model to simulate the model with a sequence of unexpected shocks: the first shock (the name of the shock is not visible in this code sample) is assumed to be equal to 0.001169 in each period. Note that these realizations are not expected.


Thanks a lot, but I want to know the command simult_ is dynare or matlab, thank you.

And the shocks only last period 1:12, so we must use the command simult_ to get the paths of variables. If no these command, only use stoch_simul(…), no IRFs in dynare outputs. Why?

Hi, simult_.m is a matlab routine distributed with Dynare. This routine is called by the stoch_simul command and only simulates paths for the endogenous variables given paths for the innovations (there is no output except the array y_ for the simulated endogenous variables, where each row corresponds to an endogenous variable, in the order of declaration in the .mod file). Normally users do not have to call directly this routine, except if a non standard output is required (which seems to be the case here with a non expected constant non zero level of the first shock, even if it does not make a lot of sense to me).


Thank you very much! I want to know if we only use the shock for some periods, then how we use the dynare command stoch_simul to achieve? Just like deterministic case, how we get the the responses of macroeconomic variables to a shock lasted for some periods. It’s confusing with me, thanks a lot.

My best,

I am not understanding your question. https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod shows how to use the simult_-command to simulate a sequence of shocks.

Thank you so much. I will check your code.

A little confusion, professor jpfeifer, why the interest rate r is level rather than exp® in the dynare code, thanks so much.

My best,

If you put something in exp(), you are doing a log transformation, i.e. you transform everything in percent. But interest rates are already in percent. So there is no need for an additional transformation.

Thank you so much, but I had a question about linearized interest rate. Please see the attach and I want to know why this is correct, and I can’t from first equation to obtain the log-linearized equation (i.e., equation 2) , please give me some help, thanks a lot.

What exactly is your problem here? Please outline your steps and where the issue arises. Note that you can enter \LaTeX using dollar signs