Hello,
My question is about how dynare carries out the generalised schur decomposition used to find the policy functions.
I am trying to solve the 'Pbar' model by McCallum in dynare, as well as manually, as an exercise to understand dynare's solution method at each step. The mod file is attached here, and so is the small code I am using to solve the same model by Blanchard-Kahn method. The (absolute) eigenvalues of the system from the dynare solution are the same as the eigenvalues calculated by the small program. (The model solution using the BK method requires me to introduce a dummy variable, so there is one additional eigenvalue in that case.)
So my question is that if the eigenvalues are same, doesn't it imply that the Q and Z matrices are also the same? If I try to calculate the policy functions using my code, the matrices become singular, but dynare does provide the solution, which confused me. I have checked numerical accuracy of the code by solving Hansen's RBC model, and it works. Could anyone please help out with this? If I could pin down exactly what I am doing wrongly to be unable to generate dynare's solution, it would be really helpful.
(A possibility is that I am inputting the model wrongly in the BK solution method, which might well be the case, but I can consider that only if this query can be addressed!)
Thank you very much for any suggestions.
Anup