I’ve tried to implement NK-SOE model by Alpanda et al. (2010). First, I rewrote the equations and calibrated parameters to their posterior mean from the paper. IRFs look the same, however Dynare 4.6 says my model contains unit root, whether original did not as authors calculated asymptotic variance decomposition. I tried to run IRFs in horizon 1000 and all variables returned to the steady state.
I attach paper and the code.
Alpanda_et_al_2010.pdf (640 KB)
Alpanda2010_model_c1.mod (5.63 KB)
That comes from the equations
q-q(-1)=d+pi_for-pi;%Real exchange rate definition
s-s(-1)=pi_f-pi; % Terms of trade definition
Psi_F-Psi_F(-1)=d+pi_for-pi_f; % Deviation from the law of one price definition
As is well-known, in New Keynesian models the price level has a unit root. Only inflation rates have a unique steady state. The growth rates on the LHS of these equation seem to give rise to a random walk. The strange things is that you get this unit root in real relative prices like the terms of trade.
Thanks for your reply. I don’t have neither price level nor nominal exchange rate in my model, only inflation and depreciation rate. I tried to reparametrize the model to the prior mean from the paper, but unit root is still present, so it seems not be connected with parametrisation.
I tried one another SOE model (Nimark 2007/2009) and end up with unit root and collinear equations, too. These are all off-the-shelf models so they should work or am I missing something ? May numerical problems be an issue ? PS All variables return to the steady state in this case too.
Nimark2009_model_c1.mod (6.48 KB)
When I set qz_criterium to value closer to 1, Dynare produced variance decomposition for Nimark (2009) model, however Alpanda et al. (2010) still does not work. But I wonder whether it is good idea to change numerical tolerance, or I’m just hiding problems with the model
No, that is usually not a good idea. The Nimark model is different in that it features a unit root, but no rank condition failure (in contrast to Alpanda). You need to understand what is going on, i.e. why the real variables in the model have a unit root. That may be related to the way the model is closed, see Schmitt-Grohé/Uribe (2003).
Other SOE models like the one in Gali’s textbook do not have this issue, see github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_8.mod
I suppose I solved the problem with Alpanda (2010). The erroneous definition of real exchange rate was provided in the paper. I changed my code and received impulse responses that match those from the paper.
I attach the correct code below in case other users are interested.
Alpanda2010_model_c1.mod (5.85 KB)