Dear friends,
I am having a few problems in comparing Dynare and Dynare++ impuse response functions for a very simple model of stochastic volatility (codes for test.mod for Dynare and test_dpp.mod for Dynare++ quoted below*). What is really strange is that, when simulating both files using a linear approximation, Dynare (correctly) provides IRFs only for the stochastic volatility of the shock, while Dynare++ provides some numbers for other variables that don’t make sense.
There are other issues I found playing with both codes, sometimes with Dynare providing the expected answer, sometimes with Dynare++ with an appropriate response. But I think it is better, for the sake of simplicity, to start with this simple model.
Any help would be greatly appreciated.
Thanks,
Angelo
(*) I’m an old user of the forum, but unfortunately I’m having problems to reset my account…
Code for test.mod:
var pi r sigma_epsr;
varexo epsr eps_sig eps_e;
parameters RHO_R RHO_PI pi_ss r_ss sigma_epsr_ss rho_sig tau;
RHO_R = 0.8;
RHO_PI = 1.1;
pi_ss = 1;
r_ss = 1;
sigma_epsr_ss = 0.003;
rho_sig = 0.5;
tau = sqrt(0.5);
model;
r = r_ss + RHO_R*(r(-1) - r_ss) + RHO_PI*(pi-pi_ss) + exp(sigma_epsr)epsr;
sigma_epsr = (1-rho_sig)sigma_epsr_ss + rho_sigsigma_epsr(-1) + taueps_sig;
pi = (1-rho_sig)pi_ss + rho_sigpi(+1) + eps_e;
end;
steady_state_model;
r = (r_ss);
pi = (pi_ss);
sigma_epsr = sigma_epsr_ss;
end;
shocks;
var epsr = 1;
var eps_sig = 1;
var eps_e = 1;
end;
stoch_simul(order=1,irf=20,pruning);
Code for test_dpp.mod:
var pi r sigma_epsr;
varexo epsr eps_sig eps_e;
parameters RHO_R RHO_PI pi_ss r_ss sigma_epsr_ss rho_sig tau;
RHO_R = 0.8;
RHO_PI = 1.1;
pi_ss = 1;
r_ss = 1;
sigma_epsr_ss = 0.003;
rho_sig = 0.5;
tau = sqrt(0.5);
model;
r = r_ss + RHO_R*(r(-1) - r_ss) + RHO_PI*(pi-pi_ss) + exp(sigma_epsr)epsr;
sigma_epsr = (1-rho_sig)sigma_epsr_ss + rho_sigsigma_epsr(-1) + taueps_sig;
pi = (1-rho_sig)pi_ss + rho_sigpi(+1) + eps_e;
end;
initval;
r = (r_ss);
pi = (pi_ss);
sigma_epsr = sigma_epsr_ss;
end;
vcov = [1 0 0
0 1 0
0 0 1];