RBC with Epstein-Zin preferences (NaN resid)

I am trying to solve an RBC model with Epstein-Zin preferences. The production sector is as follows:

  • Capital and labor produce an intermediate good (this producer pays capital adjustment costs)
  • A continuum of retailers each produce a differentiated good using the intermediate good. Households bundle these retail goods using a CES production function.

In addition to capital, there is also a nominal bond and monetary policy that follows a Taylor rule, aiming for zero inflation.

When Dynare solves the static equations, all 17 of them have NaN residuals. Similar posts on here suggest that this usually happens when initial steady state values are zero or not specified, but my steady_state.mat file has reasonable values for c, w, l, k, etc., so I’m having trouble finding my mistake.
I’ve attached my steady state file as well as my .mod file. Any help would be greatly appreciated.

Edited to add that I tried running “resids;” with the following results:

Residuals of the static equations:
Equation number 1 : 0
Equation number 2 : -Inf
Equation number 3 : -1
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : NaN
Equation number 8 : 0
Equation number 9 : NaN
Equation number 10 : NaN
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0.46
Equation number 16 : 0
Equation number 17 : 0

Given which equations have NaN and Inf issues, it looks like the problems are propagating from equation 2.

I also found that my “oo_.steady_state” vector is all zeros. Does this mean that I set the steady state incorrectly in calc_steady_state.m?

calc_steady_state.m (1.1 KB) EZrbc_PS2.mod (2.6 KB) steady_state.mat (950 Bytes)

You did not provide all files to run your code. The parameter values are missing.

Sorry about that. Here are all the files; running main_test.m executes the files in the right order. calc_steady_state.m (1.1 KB) create_param_files.m (1.6 KB) EZrbc_PS2.mod (2.6 KB) main_test.m (756 Bytes)

Why are you using that weird structure with files for parameters and steady states? I put the steady state into a steady_state_model-block and now it works:
EZrbc_PS2.mod (3.1 KB)