The results of occbin

Hi professor, I was running a model where there is a budget constraints.

The budget constraint is


RF is mortgage rate, Df is debt at time t, kappa is the LTV, q is the housing price, Hcf is housing volume. lam2 is the Lagrange multiplier of budget constraint. ‘condition’ is the auxiliary variable to check the whether the budget constraint is binding.


Then I put

[name='debt', bind='mortgage']
[name='debt', relax='mortgage']


However, the results confused me a lot. It seems that the linear and piecewise linear model have nothing different to show. In addition, when condition is below zero, the lam2 doesn’t equal zero, which isn’t consistent with what I put in occbin constraint. Could you please give a hint about why this happen?Thank you so much for your help.

I am uploading whole files for your reference. Thank you again for your help. (5.5 KB)

Your implementation is

name 'mortgage'; bind lam2<=0; relax condition>0; 

So the constraint will be binding if lam2 drops below 0. But that is not the case in your simulations. The relax-condition is only evaluated if you are in the binding regime. Also note that 1e-14 is 0 for all practical purposes.

Thank you professor for your help. I have another follow-up question. It seems that the convergence of occbin is shock surprise sensitive. Sometimes, when I change the values of shock surprise, the otherwise not convergent occbin becomes successfully convergent. Is that normal? Does that mean that something might go wrong with my model? How do I understand this phenomenon?

Without knowing more details, it is impossible to tell.