BK conditions are not satisfied

Hi everyone,
I’m trying to replicate the paper “Financial Intermediation and Credit Policy in Business Cycle Analysis”(Mark Gertler and Nobuhiro Kiyotaki,2010).I wrote the formula to the file as described in the article. However, BK conditions are not satisfied: indeterminacy
Any help would be greatly appreciated.
Many thanks,
XiangLGK.m (19.6 KB)

You only provided the m-file, not the mod-file

Sorry Prof. Jpfeifer, I have upload the mod-file. By the way, I have linearized the model and give the steady state, and the results shows that "??? Error using ==> eig
Input to EIG must not contain NaN or Inf.

Error in ==> stochastic_solvers at 239
dr.eigval =
eig(kalman_transition_matrix(dr,nstatic+(1:nspred),1:nspred,M_.exo_nbr));

Error in ==> resol at 144
[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);

Error in ==> check at 73
[dr,info,M,options,oo] = resol(1,M,options,oo);

Error in ==> LGK at 534
oo_.dr.eigval = check(M_,options_,oo_);

Error in ==> dynare at 235
evalin(‘base’,fname) ;"
LGK.mod (6.1 KB)

Your linearization must be wrong. The equation

MUi*mui -pii*OMEGAi*beta*RKii*wrkii-pin*OMEGAn*beta*RKin +beta*(pii*OMEGAi*RKii+pin*OMEGAn*RKin)*r -pii*OMEGAi*(beta*RKii-1)*womegai -pin*OMEGAn*(beta*RKin-1)*womegan =0;  // mui

has a constant term

pin*OMEGAn*beta*RKin

Sorry Prof, I have correct the equation, however, I still don’t solve my questions.
LGK.mod (6.1 KB)

Sorry, but I also don’t see where the problem is. I can only recommend to check all equations again, particularly with respect to the timing.

Get it. I will check the equations carefully. Thank you for your patience.