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 BlanchardKahn 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
pbar1.mod (502 Bytes)
BK_Pbar_III_dynarecompare.m (2.38 KB)
Thank you for your response, Prof. Pfeifer.

I could not find any results which would be comparable to the results from dynare. The paper only explains how it would work but does not provide any comparable results. This is the main reason I have had issues with the solution. Also, as you can see, the model has issues with determinacy for standard parameter values, primarily the inflation coefficient in the Taylor rule.

The BK method for solution is what I adopted from George McCandless’ book ‘ABCs of RBCs’ (Ch. 6 appendix). That is how I wrote the MATLAB code to match his BK solution in the book (where he uses QZ decomposition). This code can replicate his solution, so I assumed that it might be reliable. I was not aware of the Jordan method instead of the QZ method. I will also look into that as a possible alternative to solving the model manually.

Apologies for the m file quality. I am uploading a modified one which clearly lists the order of equations, as well as the variables in the coefficient matrices.

The variable ‘y’ appears as a forward looking variable in the usual IS curve, but also with a lag in the pricing equation (equation 2. in the m file). I have created the dummy ‘m’ to account for this lag in ‘y’.
Thank you very much once again Prof. Pfeifer. Your inputs have always been very helpful. In case there is some theory I need to study for better understanding the issue, please could you point me to a reference?
Anup
pbar1.mod (502 Bytes)
BK_Pbar_III_dynarecompare.m (2.67 KB)
Dear Prof. Pfeifer,
I managed to sort out the issue and replicate the dynare solution. The issue was that I was putting the model into the BK representation erroneously. Specifically, I made y predetermined and changed the dummy accordingly. The model still has determinacy issues for usual parameter values, but I plan to address that next.
Thank you for your help.
Anup
I am glad to hear it worked