Page 1 of 1

Gertler/Kiyotaki/Prestipino (2016) Baseline Model

PostPosted: Mon Jun 13, 2016 4:00 pm
by Stefgeb
Hi everyone,

I am currently trying to replicate the baseline version of the 2-bank model in the Handbook of Macroeconomics chapter "Wholesale Banking and Bank Runs in Macroeconomic Modelling of Financial Crises" By Gertler/Kiyotaki/Prestipino (2016).

I wanted to keep the coded model as simple as possible (as I am still a Dynare beginner) and attached the respective *.mod file for review. To start with, I took the same parameters as the authors and the stated steady state values as initial guesses for my steady state calculations. However, the steady state cannot be found/computed.

I tried a lot of different things to get the steady state, and in the version attached I assume the problem to lie in some of the equations I included in the code, in particular the ones labeled as "Equ. (17, 19-21) combined (see Appendix)" might be wrongly included. However, I am not sure how to improve the code,i.e. which equations from the paper could alternatively be used or what other errors could cause the problem.

Has anyone tried to replicate the baseline model (no-bank run model) and can help me out with the problem?

Thanks a lot in advance!

Re: Gertler/Kiyotaki/Prestipino (2016) Baseline Model

PostPosted: Tue Jun 14, 2016 7:19 am
by federico
Hi,

I didn't have time to study the new paper of Gertler et al but on the american economic review website
you can find the dynare code of

"Banking, Liquidity, and Bank Runs in an Infinite Horizon Economy" by Gertler and Kiyotaki

Given the similarities of the topic maybe it can be a good idea to have a look to the code of the previous paper

Federico

Re: Gertler/Kiyotaki/Prestipino (2016) Baseline Model

PostPosted: Tue Jun 14, 2016 9:28 am
by Stefgeb
Hi federico,

thanks a lot for the advice, I already had a look on the codes provided for GK2015 and was able to replicate the baseline scenario results. I also tried to stick as close as possible to the layout of the one-bank problem they discuss in the AER paper (in the code, they have a Dynare file for the baseline case without bank runs on which they base their bank run analyses). However, as the problem becomes more complex when the second bank and all the associated issues of interbank intermediation, relative efficiency of the banks etc. are considered, there might be something I have overlooked or not adequately covered in the two-bank scenario... The fact that the steady state cannot be found even though I rely on their parameterization and the use of the steady state values stated in the paper as initial values (even though they do not report steady state values for all variables) maybe hints towards a more funamental issues with the equations coded or the solution method applied that I am not aware of...

Re: Gertler/Kiyotaki/Prestipino (2016) Baseline Model

PostPosted: Thu Jun 16, 2016 3:23 pm
by Stefgeb
Dear all,

I have actually edited the code in the meantime. In the current version, the steady state values I get from my pen and paper computations are reasonably close (even though not exactly the same) to the ones reported in the paper. However, there are several things that are still puzzling me. First, when I use the /check;/ option only, withaut any simulation of the model etc, I get the following:

"One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-06!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold."

I have thus used the /qz_zero_threshold/ option, and when I set the threshold to a very small number (as in the code), the computation of the steady state appears to work, however, the simulation is not successful, as I receive the error:

"Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something
wrong with your model."

When I furthrmore use /model_diagnostics(M_, options_, oo_)/, I get the message that:

"model_diagnostic: the Jacobian of the static model is singular
there is 1 colinear relationships between the variables and the equations
Colinear variables:
K_w
K_r
B
D_r
N_w
N_r
C_b
C_h
f_r
Q
R_b
R_kw
R_kr
spread
spread_kw
Phi_r
Phi_w
Psi_w
mu_kw
v_bw
Omega_w
Colinear equations
1

The presence of a singularity problem typically indicates that there is one
redundant equation entered in the model block, while another non-redundant equation
is missing. The problem often derives from Walras Law."

Could anyone help me out how to interpret these messages and how to get rid of the collinearity problem? From what I have seen in other postings with similar issues, there might be some problem with the equations in the /model;/ block? If so, does anyone have a clue where the (economic) problem may lie?

Thanks a lot in advance!

Re: Gertler/Kiyotaki/Prestipino (2016) Baseline Model

PostPosted: Fri Jun 17, 2016 6:45 am
by kenstrong110
Hi, Stefgeb

It's a pleasure to see your post.
I'm currently also replicating the GKP model, but the multiple equilibria and endogenous transition probability are hard to deal with.
I suggest you turn to MATLAB instead, rather than using dynare.
If you need any help, we can discuss more later.

Re: Gertler/Kiyotaki/Prestipino (2016) Baseline Model

PostPosted: Fri Jun 17, 2016 4:18 pm
by Stefgeb
Hi kenstrong110,

thanks a lot for your reply, awesome to hear that I am not alone :) Actually I am not too familiar with coding such models "directly" in Matlab, how exactly would you proceed there and did this work out for you? Did you try to use Dynare for this model before? Have you coded the baseline case only or replicated the bank run simulations as well?

I would highly appreciate further feedback on these issues, maybe you also have an idea what could be behind the errors I get with the Dynare file?

Thanks a lot in advance!