Page 1 of 1

The steady state contains NaN or Inf

PostPosted: Mon Mar 07, 2016 2:00 pm
by Céline R
Hello,

I am new in Dynare. I am trying to run a model with intermediary competitive firms, and final firms with staggered prices (Calvo type). There is a very simple bank which simply transfers households deposits d to intermediary firms for their physical capital investment (via loans b, with no interest rate spread). The HH and intermediary firm blocks are basic. The final firm block is based on Gertler Karadi (2010). I do not understand why the model does not work, I get the following error message "The steady state contains NaN or Inf". From model_diagnostic, I can see it is coming from many equations. Could you please give me any hints on how to solve this issue?

Thank you very much
Céline

Re: The steady state contains NaN or Inf

PostPosted: Mon Mar 07, 2016 5:57 pm
by jpfeifer
You problem comes from
Warning: Some of the parameters have no value (Yss, Kss, Lss, Iss, Css, PMNss, Fss, F1ss) when using steady. If these parameters are not initialized in a
steadystate file or a steady_state_model-block, Dynare may not be able to solve the model...

When using
Code: Select all
Kss = alpha/Rss * Yss;

you did not define Rss. Make sure that the parameter definitions before the model block can be sequentially executed.

Re: The steady state contains NaN or Inf

PostPosted: Tue Mar 08, 2016 7:48 am
by Céline R
Thank you for your reply. Actually, I defined Rss as 1/beta: why would that be not correct? Also, I deleted PMNss from list of parameters, as it was not defined, but still it is not working (see updated code attached)...

Thank you again for your help

Re: The steady state contains NaN or Inf

PostPosted: Tue Mar 08, 2016 9:41 am
by jpfeifer
The key word here is sequentially. You only define Rss after you use it for the first time.

Re: The steady state contains NaN or Inf

PostPosted: Wed Mar 16, 2016 3:27 pm
by Céline R
Thank you for your reply. I have changed a number of things in my model, I have put SS values in a sequential manner, but I still get the same "The steady state contains NaN or Inf". I guess this is now coming from something else, but I cannot find what. Could you please help me to find what is going wrong?

Many thanks in advance for your help

Céline

Re: The steady state contains NaN or Inf

PostPosted: Wed Mar 16, 2016 4:11 pm
by jpfeifer
In
Code: Select all
Bss        = 1;
Iss        = Bss * ((beta -1)/beta) ;

The investment turns negative.

Re: The steady state contains NaN or Inf

PostPosted: Wed Mar 16, 2016 5:18 pm
by Céline R
Thank you so much for your quick reply. I have fixed the negative investment issue. All SS variables are now positive, and still I get the same error message. I have attached my updated code. Do you see why? after that, I will probably have gone through all possible mistakes related to steady state definition :-)

Many thanks again for your help
Céline

Re: The steady state contains NaN or Inf

PostPosted: Wed Mar 16, 2016 6:39 pm
by jpfeifer
The
Code: Select all
resid;

belongs before steady. It returns
Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : -1

The equation
Code: Select all
    q = 1 + r(+1);

is not properly linearized.

Re: The steady state contains NaN or Inf

PostPosted: Fri Mar 25, 2016 10:44 am
by Céline R
Thank you for your help. I had to change a number of things in my model. Now, my steady state is ok. However, now it is the BK condition that is not satisfied. I have checked all my equations, and the timing, but still it does not work, and model_diagnostic does not return anything... Do you have any advice on what could be my problem? I have attached the new code.

Thank you so much for your help.

Re: The steady state contains NaN or Inf

PostPosted: Tue Mar 29, 2016 8:25 am
by jpfeifer
Please reconsider your asset market structure. I am not familiar with your model, but you seem to have three assets, k,b, and dep. Some of them may be predetermined, some of them may not. You need to understand what is going on.