DSGE and occbin with negative value

Dear Professor,sorry to disturb you again.I use occbin to achieve a zero interest rate lower bound, and in general the result is relatively normal, but some variables such as investment, government debt, government spending, etc. have become negative, it seems a little strange.Could you please help me take a look?
model.mod (8.5 KB)

You are dealing with a piecewise linear solution. As such, non-negativity constraints for variables can be violated due to approximation error. That can easily happen when dealing with large shocks.

I see. But I still don’t know what can I do to improve the problem.May I ask your advice on how to modify it?

Most often, you have to live with it. See the discussion at

I see.Sincerely thanks for your help. It seems that I need to change another way to achieve the zero lower bound. Could you please recommend me some reference materials?

If I were in your place, I would simply accept this drawback. It’s not like you get very big negative values. It’s just that your solution slightly hits that bound.

I see. Sincerely thanks for your help! Best regards!