NaN in Theoretical Moments in open economy model

executive.m (4.0 KB) baseline_noZLB.mod (18.2 KB)

Hi sir or madam:

I am working on a two country DSGE model. The model works pretty well. However, when i want to use theoretical moments to show some results, some variables has NaN in theoretical moments. I am wondering why? I saw some previous messages about existence of unit root. So may i know how to check it and there might be the problem come from?


Simply generate IRFs for a very long period of time (e.g. 500 periods). If the IRFs do not return to steady state for all shocks for a variable, there is a unit root.

Thanks professor Pfeifer:

Thanks for your explanation! And yeah I found there’s units root in few variables. Is it a big problem for the model? Since the model actually runs pretty well. And is there any model to eliminate unit root in the model?


That depends. There are models where unit roots are an economic feature of the model. But in most models, it is rather unexpected and simply suggests a mistake somewhere in the model.