IRFs using decision rules

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.

IRFs using decision rules

Postby mharding » Mon Jun 08, 2015 7:47 am

Dear all,

I am trying to produce IRFs using the decision rules generated by Dynare. According to the manual, at the first order approximation the stylized approximation of the model is: y_{t}=y_s+A*(y_{t-1}-y_s)+B*u_{t}. If I get this correctly, feeding a 1sd to the first exogenous variable (sd=0.0073) to get a 20 period IRF should be like this:

Code: Select all
u_1 = [0.0073 0 0 0 0]';
u_f = zeros([5 19]);
u_t = [u_1 u_f];

y = oo_.dr.ys;

for i=1:20
    y(:,i+1) = oo_.dr.ys + oo_.dr.ghx*(y([3 6 7 12 17 18 19 20],i)-oo_.dr.ys([3 6 7 12 17 18 19 20])) + oo_.dr.ghu*u_t(:,i);
    IRF(:,i) = y(:,i+1)-oo_.dr.ys;
end


where I have 8 state variables, the monetary base, capital, net worth, the price of capital and 4 variables ruling the shocks process (m, k, n, q, e, b, A, x). The state variables are selected in order declaration, which in this case is the same as DR-order, since I have no mixed variables.

My problem is that with this I cannot replicate the IRFs produced automatically with stoch_simul, but rather get some explosive path for the IRFs. The code of the model is also attached.

Any help is much appreciated!
Attachments
CD08_nonlinear_ss5_ed.mod
(9.47 KiB) Downloaded 59 times
mharding
 
Posts: 18
Joined: Mon Mar 16, 2015 2:18 pm

Re: IRFs using decision rules

Postby jpfeifer » Tue Jun 09, 2015 8:38 am

For things like this, please use the simult_ function of Dynare. For an example, see e.g. https://sites.google.com/site/pfeiferecon/RBC_news_shock_model.mod
------------
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

Re: IRFs using decision rules

Postby mharding » Wed Jun 10, 2015 7:48 am

Thank you Johannes! This is very helpful, it works perfectly fine for first, second and third order approximations.
Best,
Martin
mharding
 
Posts: 18
Joined: Mon Mar 16, 2015 2:18 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests