The steady state contains NaN or Inf

NK_FA1.mod (2.77 KB)Financial Accelerator in an estimated New Keynesian Model.pdf (1.9 MB)Hello,

My name is Sreyleak. I have realized that this topic has been discussed quite often but I still cannot find solutions to my problems. I am really appreciated if anyone can help me with this. It burnt my head now.

I am replicating the paper of Christensen, I., & Dib, A. (2008) on " The financial accelerator in an estimated New Keynesian model". Here are my problems:

---- STEADY: numerical initial values or parameters incompatible with the following equations
10 16 17 18 19 20

Check whether your model in truly linear
Error using print_info (line 80)
The steady state contains NaN or Inf

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

Error in NK_FA1 (line 349)
oo_.dr.eigval = check(M_,options_,oo_);

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

Since the deadline is on this Wednesday, please please help me with this… :exclamation: :exclamation: :exclamation:

I have attached my .mod file and the paper as well.



  1. Note that your mod-file cannot be used for estimation, because it neglects parameter dependence
  2. Put resid;before check to see the problematic equations. You will see that

is not linear, because you divide by f. Moreover, for your exogenous processes you need to provide correct initial values

log(A) = (1-rhoA)*log(Ass) + rhoA*log(A(-1)) + e_eps_A; log(B) = (1-rhob)*log(b) + rhob*log(B(-1)) + e_eps_b; log(e) = rhoe*log(e(-1)) + e_eps_e; log(x) = rhox*log(x(-1)) + e_eps_x;
are not linear and do not have steady state 0. Rather, when using x=0 for the steady state, you are taking the log of 0.

Hi Johannes,

Thanks for your prompt response. I am too new to dynare. Can you please be a bit specified:

  1. where to put the code “resid;”
  2. what does it mean “it neglects parameter dependence” and how to correct it?
  3. is it important to write an estimated .mod file in this case? how to do it?
  4. can you give examples of giving the initial values for the shock process?

If you do not mind, please correct on my codes? :cry:



Hi Johannes,

I have tried what you suggest. And it turns out this errors:

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

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

Error in NK_FA (line 338)
info = stoch_simul(var_list_);

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

Please please, I really need help. Thanks in advance.



Sorry I forgot to attach my .mod file. Apologize for that.

NK_FA.mod (2.47 KB)