The steadystate file did not compute the steady state

Dear colleagues,

I receive this error “The steadystate file did not compute the steady state” when I run dynare, but all my Residuals of the static equations are 0.
Does anybody have a clue of the origin of the error I get? I uploaded the code. The main file is dyn_main.mod.

Thank you so much for your help. (16.7 KB)

Please provide the full codes.

Jpfeifer, I have just updated my question with the full code.

Thank you so much.

You still did not provide a running code. There are several functions missing like e.g. sseqs and the external functions

… Please, find the zip file with the full code. I tried and I think I did not forget any file this time… Thank you and sorry.

The reason is that your function

tries to access oo_.steady_state before it has been set by Dynare. In contrast, the computation of residuals happens after oo_.steady_state has been updated. You need to get rid of this circular definition.

Dear JPFeifer,
Thank you for all your help… I did not reply before because I am still trying to solve the problem you managed to find in my code.