Help:The steady state contains NaN or Inf

Dear all,
my mod file failed with the error:the steady state contains NaN or Inf.
I checked for lots of times, but I don’ know why.
The mod file is attached below.
Thank you very much.kkxx.mod (1.1 KB)

  1. Your exogenous processes should be
log(a_i) = rho*log(a_i(-1))+e_i;
log(a_g) = rho*log(a_g(-1))+e_g;
log(b_k) = rho*log(b_k(-1))+epsilon_k;
log(b_n) = rho*log(b_n(-1))+epsilon_n;
  1. You did not set psi
  2. Are you sure the steady state is unique and can therefore be computed endogenously? It seems that the split between the two sectors can be arbitrary as long as the capital to labor ratio in both sectors is the same.

Thank you pro jpfeifer,I am very happy recive your answer, According to your suggestion, I revised the code again., but there still said ‘The steady state contains NaN or Inf’, I dont know whykkxx.mod (1.1 KB) ?Can you give me some advice? I will be very grateful.

Your initial values for the exogenous processes need to be 1:

a_i = 1;
a_g = 1;
b_k = 1;
b_n = 1;

Dear Professor Pfeifer,

Thanks a lot for your reply!But there are still nonzero residuals obviously as can be seen from below. And the error message I got is “Impossible to find the steady state. Either the model doesn’t have a steady state, there are an infinity of steady states, or the guess values are too far from the solution”. Now,I am concerned that the equations I write are not exact. Are there any ways to check whether I have written all 16 equations correctly, without any missing equations or redundant equations?kkxx.mod (1.1 KB)

Residuals of the static equations:
Equation number 1 : -0.051784
Equation number 2 : 0.31857
Equation number 3 : -0.036175
Equation number 4 : -0.053902
Equation number 5 : -0.032568
Equation number 6 : -0.034444
Equation number 7 : 5.9937
Equation number 8 : 0.046955
Equation number 9 : 0.030065
Equation number 10 : 0.29149
Equation number 11 : 0.28992
Equation number 12 : -0.2932
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0

You did not answer my question

I would recommend computing the steady state analytically.

Dear Professor Pfeifer,
Sorry, I don’t know how to confirm that the steady state value is unique. In my system, I divide the intermediate product department into two sub-departments (Y_i and Y_g), and the departments Y_i are subject to external shocks with impact coefficients of b_n and b_k . At the same time, the capital and labor ratios are set differently in the two departments as follows :
alpha_i = 0.42;
alpha_g = 0.56;
sigma_i = 0.63;
sigma_g = 0.59;

Dear Professor Pfeifer,
You suggested that I use analytical method to calculate steady state. How to calculate it, please? Do you have relevant notes?I just learned DSGE for a short time. I hope I can master the DSGE model through my efforts. I sincerely hope that you can give me some guidance. Thank you again.

It boils down to solving a simultaneous equation system. The Euler equation usually pins down the capital to labor ratio. When combined with the labor-FOC and the budget constraint, one can usually solve for labor and capital.