Hi all,
I am trying to solve in dynare quite simple partial equilibrium firm model.
In the model firm maximizes it’s profit, choosing debt and capital. The cost of debt depends on current leverage level. I find pretty reasonable steady state given the calibration. But the rank conditions are not verified. I tried to do a sensitivity analysis to check whether it was a question of calibration. But no success so far.

Could someone please have a look at it? It’s a model with four equations.
Thank you! pe_model.mod (3.7 KB) pe_model_steadystate.m (1.8 KB)

Thank you for the suggestion. This is the first time I have encountered such a problem. Are there common approaches to solving the issue? Or maybe you can point me to a discussion about where to start.