Hi professor Pfeifer:

Thanks for your reply! I think thereās something wrong in my model or code. To simplify the model, i remove the financial friction (set parameter of Gertler and Karadi incentive constraint = 0). The code is:

tomeme_frictionless.m (2.4 KB)

tomeme_frictionless.mod (16.8 KB)

But we i run the code, it reported the mistake that:

Error using print_info (line 32)

The generalized Schur (QZ) decomposition failed. For more information, see the documentation for Lapack function

dgges: info=76, n=74. You can also run model_diagnostics to get more information on what may cause this problem.

Error in stoch_simul (line 103)

print_info(info, options_.noprint, options_);

Error in tomeme_frictionless.driver (line 1009)

[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list_);

Error in dynare (line 293)

evalin(ābaseā,[fname ā.driverā]) ;

Error in tomeme_frictionless (line 124)

dynare tomeme_frictionless.mod

When i use model_diagnostics(M_,options_,oo_) to check the, it reports that:

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular

MODEL_DIAGNOSTICS: there is 3 colinear relationships between the variables and the equations

Relation 1

Colinear variables:

Ce

Cc

Ge

Gc

Ke

Kc

Ie

Ic

Ihe

Ihc

Ye

Yc

Ywe

Ywc

Le

Lc

Lde

Ldc

f1e

f1c

f2e

f2c

x1e

x1c

x2e

x2c

mue

muc

fwe

fwc

fe

fc

ne

nc

dc

de

be

V

rer

Pe

Pc

Relation 2

Colinear variables:

Ce

Cc

Ge

Gc

Ke

Kc

Ie

Ic

Ihe

Ihc

Ye

Yc

Ywe

Ywc

Le

Lc

Lde

Ldc

f1e

f1c

f2e

f2c

x1e

x1c

x2e

x2c

mue

muc

fwe

fwc

fe

fc

ne

nc

dc

de

be

V

rer

Pe

Pc

Relation 3

Colinear variables:

Ce

Cc

Ge

Gc

Ke

Kc

Ie

Ic

Ihe

Ihc

Ye

Yc

Ywe

Ywc

Le

Lc

Lde

Ldc

f1e

f1c

f2e

f2c

x1e

x1c

x2e

x2c

mue

muc

fwe

fwc

fe

fc

ne

nc

dc

de

be

V

rer

Pe

Pc

Relation 1

Colinear equations

1 2 7 8 9 32 33 38 44 45 46 71 72

Relation 2

Colinear equations

7 8 9 32 33 38 44 45 46 71 72

Relation 3

Colinear equations

7 8 9 32 33 38 44 45 46 71 72

MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one

MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation

MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

I saw your suggestions on others related questions that start from a simplified model. I have coded the simplified before. In each side of the economy they are exactly the same. There are trade between the two countries but thereās no capital flow between the two. So the financial indermediaries only get deposit from its own household and lend loans to the local firms. The model works very well even with financial friction. The code is:

tomeme_excutive.m (2.2 KB)

tomeme1.mod (15.6 KB)

After i added the capital flow between two economy it reported BK condition is not satisfied. And after i remove financial friction it reported " The generalized Schur (QZ) decomposition failed". I am very confused since the financial intermediary is the same as Banerjee, Devereux and Lombardo(2016). So could you please tell me what might be the reasons for the mistake? Or which direction i should explore to debug.

Moreover, what are ācolinear equationsā it reported? For example, the equation 1 and 2 are just defining SDF in two countries. Yes they are same but with different variables. I am confused how can those ācolinearā?

Thanks a lot! Your comments are really helpful!

Rahul