Matching a data with a variable in dynare

Hi, there is a strange problem in my model.

Variable named “FX” is not stationary in my model but its growth rate is ok.
That is, if I code my mod-file as

model ;

ac - ac(-1) = fx - fx(-1) + de - pi ;

dynare cannot run estimation showing Blanchard and Kahn message.

However, If I code


ac - ac(-1) = dfx + de - pi ;
end ;

It is OK and dynare run estimation well.
I would like to know if I continue my work with this.

Next question is how to use data on “dfx”.
Since “dfx” means FX growth, I use its growth rate data to estimate the model.

However, data for other observable variables are all HP-filtered ones
because I do not impose unit-root technology.

According to the data on FX reserve there is a trend in its level.

I first thought that since fx (satisfying dfx = fx - fx(-1)) is not defined in my model because of its nonstationarity,
it is ok to use just its growth rate data without detrending.
Instead, I use prefilter=1 to remove a trend in the FX growth rate.

How do you think so?
Do I have to use the growth rate of HP-filtered FX ?

I uploaded my mod-file and data. The data file is actually excel spreadsheet please use “.xlsx”.

Thank you

pr_k.mod (8.8 KB) (48.2 KB)

  1. Having a unit root in the model should not be a problem for estimation, but you may need the diffuse_filter-option.
  2. Do not use the two-sided HP filter for estimating DSGE models. See Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” . If you must, use the one-sided HP filter.
  3. Using the growth rate of HP-filtered data is almost never correct. You would be applying a first difference filter after applying an HP filter. That rarely makes sense. You need to think about the frequency components your model is able to capture and remove the parts you are not interested in. I discuss this in the linked document. Working with demeaned first differences to remove the average growth often works reasonable well.

Thank you for your comment.

The problem is that I am not sure if I just use demeaned growth rate to match the model variable dFX.
Can I interpret the mean of the growth rate as a trend in the growth rate?

You should approach this from an economic point of view: why is there a trend in a variable that should have no trend?