Help with implementing ZLB in Gertler and Karadi (2011)

Hi, I’m relatively new on Dynare. I’m trying to replicate the Zero Lower Bound results (in the context of Credit Policies with the Credit policy coefficient kappa equal to 10) in the Gertler and Karadi (2011) paper, “A model of unconventional monetary policy” (page 14-15 in the PDF file). To do that, I looked at the paper of Guerrieri and Iacoviello (2015) “OccBin: A toolkit for solving dynamic models with occasionally binding constraints easily”. So I changed some of the parameters (in the mod file are named betta, varrphi, epsilon, gam, kappa_pi, kappa_y, rho_a, sigma_a) and impose the Steady State of inflation (iin the mod file infl_ss) equal to 1.005, according to table 3 on the paper of Guerrieri and Iacoviello (2015) (page 13/17 in the PDF file). When I tried to run the file unfortunately a set of errors occurred:

Error using print_info (line 45)
Blanchard Kahn conditions are not satisfied: indeterminacy

Error in stoch_simul (line 100)
print_info(info, options_.noprint, options_);

Error in Zero_Lower_Bound_GK11 (line 546)
info = stoch_simul(var_list_);

Error in dynare (line 235)
evalin(‘base’,fname) ;

What can I do to fix these problems and eventually succeed to replicate figure 4 and figure 5 of Gertler and Karadi’s paper? I looked at the mod files of Guerrieri and Iacoviello (2015) in the personal page of Iacoviello, but still didn’t exactly know how can I apply those to the GK11 model. Thanks in advance for the help. I attach the mod file here. Zero_Lower_Bound_GK11.mod (11.2 KB)

Hi fram9,

why do you change the parameters (betta, varrphi, epsilon, gam, kappa_pi, kappa_y, rho_a, sigma_a)?
Maybe this modification is the explanation for the indeterminacy.

Personally, I think you cannot replicate the results in figure 4 and 5 of Gertler and Karadi’s paper using OccBin, because the authors use a different approach to take into account the ZLB.
But you may obtain similar results with OccBin.

To use OccBin you should have two mod-files. One with the baseline model without ZLB (“reference regime”) and one with the exact same implementation of the model but with ZLB on the interest rate (“alternative regime”). Note that only the “reference regime” is required to satisfy the BK-condition.
It is also important to take into account the “additional notes” within the readme.pdf.
Finally, you have to set up a main file (.m-file) where you use solve_one_constraint.

Maybe this is helpful.
Solution_attempt.zip (21.9 KB)
I tried to implement the model, but due to limited time I can only offer you a sketch.
I am also not yet familiar with the paper, but I plan to read it soon.
So please consider it only as a starting point where possibly some bugs are included.

If I haven’t messed up with scaling or something else, then at a first glance it looks like we need lager Capital quality shocks to reach the ZLB under the OccBin solution.

1 Like

Thanks a lot for the help, I appreciate it! I took a quick look at your files and the first question that comes to my mind while reading them is: why create a new variable for the ZLB model named inot? (different from i but with the same equation)

inot is the shadow interest rate (or unrestricted interest rate in the absence of the ZLB) which is governed by the Taylor Rule. Within the model equations (except the Taylor Rule) you should have the regular (constrained) interest rate. As long as the ZLB is non-binding, both are the same (i=inot). But in case the Taylor Rule implies a negative interest rate (inot<0) the actual rate that influences private agents’ decisions is zero (i=0). In other words, you implement the max operator i=\max(0,inot).

It’s a simple perfect foresight exercise. A student of mine replicated the figure using

perfect_foresight_setup(periods=40);
perfect_foresight_solver(lmmcp);

together with an mcp tag on the level of the nominal interest rate

[mcp = 'Rn > 1']

I once replicated the results from the paper with occbin and could dig out the files if you still need them@fram9.

I used occbin instead of the perfect_foresight_setup suggested by Prof. Pfeifer because the results from the latter differed dramatically from the ones in the paper due to non-linearities in the model. As occbin linearizes the model I was only able to replicate the results from the paper when using occbin. I dropped an E-mail to Peter Karadi and he told me that they indeed used a linearized version of the model for this analysis.

Ben

Dear @BSchumann. Thanks a lot if you’ll dig them out. I’d really appreciate it, since I’d like the replications to be as accurate as possible. (However, thanks also to all the other people that replied to me with some suggestions. Now I’m currently trying to use the perfect foresight implementation, as suggested by jpfeifer, but I’m looking for all of the possible solutions)

For the shock e_ksi,if given lager Capital quality shocks, the output indicated that “Did not converge – increase maxiter_”.

As I have mentioned above, it is likely that there is an issue with the code.

I had the same issue once. Just increase the number of iteration or lower the persistence of the shock. For large shocks it doesnt need to be the case that the perfect foresight solution converges as you solve the model non-linearly.

It seems that occbin toolkit is not suitable for nonlinear model,or we ignore some details.

we have Increase larger value of maxiter, but the output results still prompt us “Did not converge – increase maxiter_”.output shows no constrained when given largee shocks .

As I said, for large shock the deterministic solution does not need to converge :frowning: Try reducing the persistence of the shock.

OccBin uses dynare’s solution for the first-order approximation around the steady state and combines these approximations of all regimes according to the current guess about the sequence of regimes.

At a first glance, it seems to be the case that for a certain size of the shock there is no convergence of the solution algorithm. This means that the initial guess and all subsequent updated guesses about the sequence of regimes turn out to be wrong. In other words, the interest rate seems to behave unexpected as there is always an unexpected regime change once you set the shock to a certain size.

At the moment, I have not enough time to look deeper into this problem. My guess is that there is a mistake in the code (the mod-files not the toolkit).

Setting a breakpoint within the file mkdatap_anticipated.m reveals that

Tmax = regimestart(nregimes)-1;  % Tmax is the position of the last period
% when the constraint binds

is continuously jumping between 0 and 7 (e.g. if you set irfshock ='e_ksi'; shockssequence = 2;).