Dear Professor Jpfeifer,
Thank so much for your response. I recently included learning and using Dynare to solve problems in DSGE models in one of the courses that I am teaching at the University. I visited some few Dynare users’ websites and drafted those questions for the purpose of teaching and learning. Hence, the problem set is actually from a university course designed to learn, teach and understand modelling DSGE models using Dynare.
I have made an effort to answer few questions via simulation. However, I need someone who is an expert to double check the work to ensure that the work is properly done for me. I have few challenges in the process of trying to solve those questions. How is volatility computed in Dynare? How do we identify forward-looking and backward-looking variables in Dynare? Given a loss function, how is welfare function calculated in Dynare? These are very few challenges that I need help. Meanwhile, I tried to calculate welfare function based on the Mod files I downloaded from your link but I encountered further challenges.
Please find attached the progress I have made. Please assist me to calculate welfare function of this economy. Your assistance on this direction will be highly appreciated.
// Declare variables
var y pi i g mu upsilon;
varexo g1 g2 g3;
parameters sigma beta phip omega alpha kappa rho1 rho2 rho3;
//Value of parameters
sigma = 1;
beta = 0.99;
phip = 1.5;
omega = 0.5;
alpha = 3;
kappa = ((1-omega)(1-betaomega)/(alpha*omega));
rho1 = 0.3;
rho2 = 0.8;
rho3 = 0.5;
model;
y = y(+1) - (1/sigma)(i - pi(+1)) + g;
pi = betapi(+1) + kappay + mu;
i = phippi + upsilon;
g = rho1g(-1) + g1;
mu = rho2mu(-1) + g2;
upsilon = rho3*upsilon(-1) + g3;
end;
initval;
y = 0;
pi = 0;
i = 0;
end;
shocks;
var g1; stderr 1;
var g2; stderr 0.5;
var g3; stderr 1;
end;
stoch_simul(linear,irf=20)i,pi,y;
=======================================================================
// Welfare analysis
// Declare variables
var y pi i g mu upsilon;
@#define Ramsey_policy_timeless=1
@#define Ramsey_policy_t0_optimal=0
@#define discretionary_policy=0
varexo g1 g2 g3;
parameters sigma beta phip omega alpha kappa rho1 rho2 rho3;
//Value of parameters
sigma = 1;
beta = 0.99;
phip = 1.5;
omega = 0.5;
alpha = 3;
kappa = ((1-omega)(1-betaomega)/(alpha*omega));
rho1 = 0.3;
rho2 = 0.8;
rho3 = 0.5;
model(linear);
y = y(+1) - 1/sigma*(i - pi(+1)) + g;
pi = betapi(+1) + kappay + mu;
i = phippi + upsilon;
g = rho1g(-1) + g1;
mu = rho2mu(-1) + g2;
upsilon = rho3upsilon(-1) + g3;
end;
initval;
y = 0;
pi = 0;
i = 0;
end;
planner_objective(pi^2 + y^2);
ramsey_model(planner_discount=0.99);
steady;
simul(periods=50);
shocks;
var g1; stderr 1;
var g2; stderr 0.5;
var g3; stderr 1;
end;
Regards,
Maxwell