Resolved
Try to debug the problem with Dynare Matlab/Octave. It seems to arise in computing the steady state under optimal policy.
Best
Michel
Thank you for the suggestion. It took me sometime but I got it to simulate in dynare++ and it works up to third order approximation. The results also seem to make sense.
I am very grateful for your help.