I have written the code from Adam (2011) - “Government debt and optimal monetary and ﬁscal policy” in Dynare and used the deterministic simulation to solve it. After letting it run the code seems to be converging as
MODEL SIMULATION :
Total time of simulation :0.07
However, the debt stock decreases continuously and jumps in the last period. In that period, the equations do not sum to 0 as imposed by the model.
To be precise just use the following commands:
uc = 1./c;
uh = -omegah*h.^phi;
and when evaluating the budget constraint at the second last and the very last (basically the endpoint) one gets completely different results:
Does that mean the code did not converge or am I interpreting something wrong here?
Thanks in advance!
For those not familiar with the paper, it is a standard NKM with optimal fiscal and monetary policy.
adam_dynare.mod (3.55 KB)
Try a stochastic simulation:
var z c pi h b R tau g gamma2 gamma1 gamma4 gamma3 uc uh ug ucc uhh ugg;
parameters eta omegah phi beta theta omegag arz;
b_ss = 0; // 0 steady state real government debt
beta = 1/(1+0.035/4); // quarterly discount factor (with annual average real interest rate 3.5//)
theta = 17.5; // degree of price stickiness
phi = 1.0; // 1/elasticity of labor supply
fw = 0; // directly wasteful government spending, called x in the model
eta = -6;
arz = 0.95; // ar coefficient of z process,
muz = 1.0; // mean of technology shock
vf = (1-arz^2)/(1-0.95^2); // scales the variance of the prod schock so that unconditional variance is independent of autoregressive parameter arz
constz = muz*(1-arz); // constant in the law of motion of technology
varz = vf*(0.006)^2; // " innovation's quarterly variance
mz0 = 1;
c_ss = 0.16-fw; // private consumption, net of fiscal waste
h_ss = 0.2; // labor effort
g_ss = 0.04; // fiscal spending
pi_ss = 1; // gross inflation rate
R_ss = 1/beta; // gross nominal interest rate
// utility parameters that give rise to the targeted Ramsey steady
// state and steady state Lagrange multipliers
uc_ss = 1./c_ss;
ucc_ss = -c_ss.^(-2);
uh_ss = -omegah*h_ss.^phi;
uhh_ss = -omegah*phi*h_ss.^(phi-1);
tau_ss = (g_ss+x_tilde)/(g_ss+x_tilde+omegah*(h_ss^phi)*c_ss*h_ss); // income tax rate
ug_ss = omegag/g_ss;
ugg_ss = -omegag/g_ss^2;
uc = 1/c; // log utility in consumption
uh = -omegah*h^phi;
ug = omegag/g;
ucc = -1/c^2;
uhh = -omegah*phi*h^(phi-1);
ugg = -omegag/g^2;
// Define the FOCs (7 eqns)
// FOC for c
uc + (gamma1-gamma1(-1))*ucc*(pi-1)*pi-gamma1*(ucc*z/theta*h)*(1+eta+uh*eta/(uc*(1-tau)*z))
// FOC for h
// FOC for pi
// FOC for R
// FOC for tau
// FOC for g
ug -gamma3 - gamma4;
// FOC for b
// Define the ICs (3 eqns)
// Phillips curve
// Euler equation
// Ressource constraint
// Budget constraint
There is a unit root that makes b non-stationary. This seems to be the reason it explodes.
Now I am puzzled even more by the existence of a unit root. Are log linearization around a steady state and the resulting policy functions valid description if any transitory shock pushes some variables permanently away from the steady state? I know unit roots from technology shocks but then one detrends those variables such that they are stationary. Can you/anybody maybe help me understand how to think about that intuitively?
Local approximations by nature are local. If you shock is not too big, the policy functions will still be an accurate description of the true model even if a unit root is present. That is why IRFs for small shocks are still ok. You cannot run simulations as they will explode and the policy functions obtained at the steady state will be a poor representation of the true dynamics.
For non-linear deterministic simulations, this might not be that relevant, because away from the steady state, the true dynamics might be different. Unfortunately, in your case there the current model seems to display slow divergence outside of the steady state. This might indicate that your model implementation is still wrong.
I only pointed out that you have a unit root at the deterministic steady state that probably should not be there at all and there might still be a mistake in your model.
As noted above, the model features a unit root as discussed in the paper. Thus, the steady state changes/is indeterminate. Deterministic simulations of the type you conduct here requires the specification of an initial and terminal condition. For stationary models, this is easy as the terminal condition typically is the steady state. But in the Adam (2011) model the steady state changes after a shock. Hence, specifying the terminal condition as the initial steady state is wrong and convergence to this wrong steady state cannot be obtained.
That makes perfect sence - thank you very much!