Hello Professor,
Ok. I hope it is understood. I have a stochastic model (DSGE) that has a single steady state. With the model I can solve it and perform Bayesian estimation.
Now, my challenge is to do a same, but with transition steady state. That is, with the same model I must agregate transition steady state. So, Im confused, becouse I don’t know where should I make changes.
For example, I attach a simple model. How to declarate transition steady state?
//=========================================================================
// Part I: Declarate
// I.1 - Endogenous variables
var piV xV iV piObs xObs iObs;
// I.2 - Exogenous variables
varexo epsm epsd epsi;
// I.3 - Name of the parameters
parameters betta iota xi h sigma phi alfa rho ipi ix sigm sigd sigi;
// I.3.1 Initialize parameters
betta = 0.995; //household discount factor
xi = 0.75; //price stickiness (Calvo)
iota = 0.75; //price indexation
h = 0.75; //habit persistence
sigma = 2; //inverse intertemporal elasticity of subst.
phi = 2; //inverse Frisch labor supply elast.
alfa = 0.3; //1-labor share
rho = 0.75; //interest rate smoothing
ipi = 1.5; //inflation coeff.
ix = 0.125; //output gap coeff.
sigm = 0.25; //Std. dev. markup shock
sigd = 0.25; //Std. dev. demand shock
sigi = 0.25; //Std. dev. monetary policy shock
//=========================================================================
//=========================================================================
// Part II: Declarate Enviroment
// II.1 - Equations
model;
piV=betta/(1+iota*betta)*piV(+1)+iota/(1+iota*betta)*piV(-1)
+(1-xi*betta)*(1-xi)/(1+iota*betta)/xi*((alfa+phi)/(1-alfa)+sigma/(1-h))*xV
-(1-xi*betta)*(1-xi)/(1+iota*betta)/xi*sigma*h/(1-h)*xV(-1)+sigm*epsm; //Phillips curve
xV=1/(1+h)*xV(+1)+h/(1+h)*xV(-1)-(1-h)/sigma/(1+h)*(iV-piV(+1))+sigd*epsd; //IS curve
iV=rho*iV(-1)+(1-rho)*(ipi*piV+ix*xV)+sigi*epsi; //Taylor rule
// II.2 Measurement equation inflation
piObs=4*piV; //inflation
xObs=xV; //ouput gap
iObs=4*iV; //interest rate
end;
//=========================================================================
//=========================================================================
// Part III: Results and Estimations
// III.1 - Initial guesses for steady state computations
initval;
piV=0;
xV=0;
iV=0;
piObs=0;
xObs=0;
iObs=0;
end;
// III.2 Calculate steady state
steady;
// III.3 Compute eigenvalues
check;
// III.4 Define variance of shocks
shocks;
var epsm=1;
var epsd=1;
var epsi=1;
end;
// III.5 Solve and simulate model
stoch_simul(order=1,irf=20,nograph) piObs xObs iObs;
//=========================================================================
//=========================================================================
// IV. Empirical Estimation (Full Information Bayesian Approach)
// IV.1 - Observed data (in usdata.m)
varobs piObs xObs iObs;
// IV.2 - Priors of estimated parameters
// (parameter_name, start_value, lower_bound, upper_bound, distr, mean, sd)
estimated_params;
xi,,,,beta_pdf,0.75,0.1;
iota,,,,beta_pdf,0.75,0.1;
h,,,,beta_pdf,0.75,0.05;
sigma,,,,gamma_pdf,2,0.5;
rho,,,,gamma_pdf,0.75,0.05;
ipi,,1.01,,gamma_pdf,1.5,0.1;
ix,,,,gamma_pdf,0.125,0.05;
sigm,,,,inv_gamma_pdf,.25,inf;
sigd,,,,inv_gamma_pdf,.25,inf;
sigi,,,,inv_gamma_pdf,.25,inf;
end;
// IV.3 - Options for reporting of credible sets
options_.mh_conf_sig= 0.95;
options_.prior_interval= 0.95;
options_.conf_sig= 0.95;
options_.nograph=0;
//estimate model using Bayesian Maximum Likelihood
estimation(first_obs=1,
datafile=usdata,
order=1,
lik_init=1,
mode_compute=4,
mode_check,
%mode_file=nk_fullinfo_estimation_mode,
%mode_file=nk_fullinfo_estimation_mh_mode,
%load_mh_file,
mh_replic=2000,
mh_nblocks=2,
mh_init_scale=.75,
mh_jscale=.75,
mh_drop=0.25,
filtered_vars,
bayesian_irf,
moments_varendo,
forecast=4,
smoother) piObs xObs iObs;