The steady state contains NaN or Inf

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

The steady state contains NaN or Inf

Postby Céline R » Mon Mar 07, 2016 2:00 pm

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
Attachments
NK3eq_capital_bank1bis.mod
(4.01 KiB) Downloaded 54 times
Céline R
 
Posts: 5
Joined: Mon Mar 07, 2016 1:40 pm

Re: The steady state contains NaN or Inf

Postby jpfeifer » Mon Mar 07, 2016 5:57 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: The steady state contains NaN or Inf

Postby Céline R » Tue Mar 08, 2016 7:48 am

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
Attachments
NK3eq_capital_bank1bis.mod
(3.97 KiB) Downloaded 55 times
Céline R
 
Posts: 5
Joined: Mon Mar 07, 2016 1:40 pm

Re: The steady state contains NaN or Inf

Postby jpfeifer » Tue Mar 08, 2016 9:41 am

The key word here is sequentially. You only define Rss after you use it for the first time.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: The steady state contains NaN or Inf

Postby Céline R » Wed Mar 16, 2016 3:27 pm

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
Attachments
NK3eq_capital_bank1quat.mod
(4.11 KiB) Downloaded 53 times
Céline R
 
Posts: 5
Joined: Mon Mar 07, 2016 1:40 pm

Re: The steady state contains NaN or Inf

Postby jpfeifer » Wed Mar 16, 2016 4:11 pm

In
Code: Select all
Bss        = 1;
Iss        = Bss * ((beta -1)/beta) ;

The investment turns negative.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: The steady state contains NaN or Inf

Postby Céline R » Wed Mar 16, 2016 5:18 pm

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
Attachments
NK3eq_capital_bank1quat.mod
(4.23 KiB) Downloaded 48 times
Céline R
 
Posts: 5
Joined: Mon Mar 07, 2016 1:40 pm

Re: The steady state contains NaN or Inf

Postby jpfeifer » Wed Mar 16, 2016 6:39 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: The steady state contains NaN or Inf

Postby Céline R » Fri Mar 25, 2016 10:44 am

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.
Attachments
NK3eq_capital_bank1quat.mod
(4.9 KiB) Downloaded 53 times
Céline R
 
Posts: 5
Joined: Mon Mar 07, 2016 1:40 pm

Re: The steady state contains NaN or Inf

Postby jpfeifer » Tue Mar 29, 2016 8:25 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests