# Gertler and Karadi dynare simulation

Hey guys!
I am writing a dynare code following Gertler and Karadi’s paper “A model of unconventional monetary policy”. I want to introduce a credit policy shock but the code cannot run!
The problem is:
"Error: File: GK_creditpolicy2018.m Line: 416 Column: 18
Unexpected MATLAB expression.

Error in dynare (line 223)
evalin(‘base’,fname) ;"
GK_creditpolicy2018.mod (9.8 KB)

I cannot find the errors! Would anyone help me?
I post the code here…

``````title('Household's consumption')
``````

needs to be

``````title('Household''s consumption')
``````

to be recognized as a string in Matlab

Thank you professor! Now the error is:

"Error using print_info (line 83)
Impossible to find the steady state. Either the model doesn’t have a steady state, there are an infinity of
steady states, or the guess values are too far from the solution

Error in check (line 76)
** print_info(info, 0, options);**

Error in GK_creditpolicy2018 (line 386)
oo_.dr.eigval = check(M_,options_,oo_);

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

What is wrong in your opinion? Thanks for the attention!

You need to find out why your changes imply that the steady state cannot be found.

Thank you professor!
Now I changed some equations and I added the initval block!
The error now is:
"Error using print_info (line 37)
The generalized Schur (QZ) decomposition failed. For more information, see the documentation for Lapack function
dgges: info=28, n=26. You can also run model_diagnostics to get more information on what may cause this problem.

Error in check (line 76)
print_info(info, 0, options);

Error in PROVA (line 491)
oo_.dr.eigval = check(M_,options_,oo_);

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

What is wrong now? I post, as usually, the code…PROVA.mod (10.7 KB)

`model_diagnostics` returns

``````MODEL_DIAGNOSTICS:  The Jacobian of the static model is singular
MODEL_DIAGNOSTICS:  there is 1 colinear relationships between the variables and the equations
Colinear variables:
psi
Colinear equations
32    36
``````

The equation

``````psi    =   psi+kap*(Rk(+1)-R-SPRSS)+shockpsi;
``````

is strange, because it implies

``````0    =   kap*(Rk(+1)-R-SPRSS)+shockpsi;
``````

i.e. the `psi` drops out.

Hi everyone! I’m still working on Gertler and Karadi paper…
Now I’m trying to study this model with EU calibration. Now I have a problem: the residual of equation 21 is not zero and I don’t understand why.
I attach the code here…Could anyone help me?
Thank you in advanceGK18EU.mod (10.2 KB)

``````gov = 0.215;        % government spending over GDP
``````

seems to be inconsistent with

``````GSS = 0.38;   % ... government spending
``````