Steady State problem (Nan Inf)

Hello, I have a problem with my code and would like some help, please.
When I give the values for the SS (in the initval) I get the following message “Error using print_info (line 90) The steady state contains NaN or Inf” .
However, the equations I provide to find the SS return the values contained in the “ss_matheus” file.
I don’t know what I’m doing wrong, whether it’s the initial guess for the SS values that are bad.

Thanks!
Li_original_perfect.mod (5.3 KB)ss_matheus.m (1.4 KB)

Put resid before steady to see that there is a NaN in equation (26).

ln(mk) = (1-psi_k)*ln(mk) + psi_k*ln(mk(-1)) + ek; 

is strange, because in steady state, all vales for mk except 0 are a steady state.