Bayesian estimation with trend

Dear all,

I am estimating a closed New Keynesian economy that accounts for trend growth, which I model as a parameter that captures the long-run trend plus an exogenous shock that has no persistence as in professor Pfeifer’s “A Guide to Specifying Observation Equations for the
Estimation of DSGE Models” 2018 version. When preparing the data, I calculate hours worked per capita, which I assume has no trend. I include the log growth rate of hours worked per capita without a trend as the observation equation for hours worked. The observation equations for inflation and the nominal interest rate are log growth rates as in Section 5.3.2 of professor Pfeifer’s paper.

However, when trying to estimate the parameter that captures the long-term trend growth I am able to obtain an estimate for this long-run parameter, but the exogenous shock for trend growth fluctuates around -1, see “shocks_2021_09_15.pdf”. This indicates to me that there is a serious error in my model, as this is not a realistic result as the shock should fluctuate around zero.

One possible explanation could be that the mean of the log growth rates for hours worked is most likely to be positive, see “empirical_series_2021_09_15.pdf”.

In addition to these two figures, I attach the codes that I use for estimation. The estimation starts by running “FinIntGovDefMain.m”, and the time series for the estimation is given by the file “m_Data_Bayesian_BDREMS_1995_2007.mat”.

I would be grateful if someone could explain to me why I get these wrong results, and what I have to do to get sensible results.
FinIntGovDefMain.m (33.3 KB)
FinIntGov.mod (82.2 KB)
FinIntGovDynare.m (4.6 KB)
FinIntGov_steadystate.m (13.7 KB)
data_Bayesian_Spain.m (1.0 KB)
m_Data_Bayesian_BDREMS_1995_2007.mat (3.2 KB)
empirical_series_2021_09_15.pdf (8.5 KB)
shocks_2021_09_15.pdf (9.3 KB)

  1. Your steady states do not line up. In the data you have growth of 0.5%, but in the model
y_obs             		 1.00501
c_obs             		 1.00501
g_obs             		 1.00501

I think

y_obs        = y - y(-1) + exp(mu_x);
c_obs        = c - c(-1) + exp(mu_x);
g_obs        = g - g(-1) + exp(mu_x);

must be

y_obs        = y - y(-1) + mu_x;
c_obs        = c - c(-1) + mu_x;
g_obs        = g - g(-1) + mu_x;
  1. You should upgrade your steady state file to Dynare 4.6 and also use the template of
    examples/NK_baseline_steadystate.m · master · Dynare / dynare · GitLab
    to make sure that all parameters and variables are correctly set.

Dear professor Pfeifer,

Thank you very much for pointing this out to me, and now the error seems obvious: if I push the steady state growth rate to be 1.005, instead of 0.005, then the errors are going to structurally deviate downwards by 1.

I am currently still using Dynare 4.5 which still works fine, but I am reading that you recommend to update to Dynare 4.6. When I do so I will adjust my steady state files accordingly.

Once again thank you very much for your quick response, much appreciated!