A problem with steady state

Hello,

Some of my model’s equations (number 16 and 17, the mod file is attached) contain the same variable (‘BB’) on both the LHS (BB(+1)) and the RHS (BB). These variables are supposed to be cancelled out in steady state. However, it seems not to happen: dynare prints the error message, saying “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”.
The problem is solved once the ''kappa_b" parameter is set to 2 (instead of 10 as in the baseline version).

Could you please help me to understand what’s happening here and why the variables are not cancelled out for the purpose of steady state?
Thanks a lot in advance!
nkm_stst.mod (1.88 KB)

This is a numerical issue related to under/overflow. Already for kappa=3 creates a multiplication in the computer of something in the order of 1e15 with something 1e-4. The resulting numerical error is bigger than the steady state tolerance. Consider this: your BB is -1.981e-05. With kappa=-10, BB^(-kappa)= -5E4^10=1E47. The computer cannot handle operations with a value like this.
See Mccullough/Vinod (1999): “The Numerical Reliability of Econometric Software” for general background information.

Dear Johannes, thank you for the explanation and for the reference. Do you think there is any way to circumvent this under/overflow issue? May be an alternative model calibration?
Thank you in advance!

You might be able to circumvent this by entering this equation in logs. This will turn the problematic power function into a product (of course this does not work if BB is 0).

It worked perfectly, thank you very much for the idea!