Parameter Estimation and Forecasting Using the Gali-Monacelli (2005) Model

Hello, I am working with a Dynare code based on Professor Johannes Pfeifer’s replication of Jordi Galí and Tommaso Monacelli (2005), “Monetary Policy and Exchange Rate Volatility in a Small Open Economy.”

I introduced a monetary policy shock with an AR(1) process in the Taylor rule.
I am aiming to 1. Estimate parameters for the model 2. Forecast inflation rates

For the var_obs block, I included the following variables: Inflation rate, Real interest rate, Real GDP per capita, Exchange rate, Real consumption (quarterly frequency)

Inflation rate and real interest rate: I first removed the seasonal component from the price index. Then, I constructed the inflation rate using the formula (p_{t} - p_{t-1}) / p_{t-1}. I derived the real interest rate as the nominal interest rate minus the inflation rate.

Real GDP per capita, exchange rate and real consumption: 1. Removed seasonal components. 2. Applied logarithmic transformations. 3. Detrended using the HP filter.

While the modified model runs fine for basic simulations, I encounter the following issue when using var_obs and attempting to estimate parameters:

dynare Gali_Monacelli_2005_modification.mod
Starting Dynare (version 6.2).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Found 25 equation(s).
Evaluating expressions…
Computing static model derivatives (order 1).
Normalizing the static model…
Normalization failed with cutoff, trying symbolic normalization…
Could not normalize the static model. Variable p is not in the maximum cardinality matching.
Computing dynamic model derivatives (order 2).
Normalizing the dynamic model…
Finding the optimal block decomposition of the dynamic model…
13 block(s) found:
12 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 6 equation(s)
and 6 feedback variable(s).
terminate called after throwing an instance of ‘std::filesystem::__cxx11::filesystem_error’
what(): filesystem error: cannot rename: Input/output error [+Gali_Monacelli_2005_modification] [Y0EJwTZbOk]
Preprocessing time: 0h00m02s.
Error using dynare (line 297)
Dynare: preprocessing failed

I have checked adding the monetary policy innovation does not introduce errors when I run the model without observed variables. So I suspect that the observed variables (var_obs) are causing the problem, possibly due to incorrect data preparation or specification in the .mod file.

Any guidance on identifying and resolving this issue would be greatly appreciated!

Thank you!

Gali_Monacelli_2005_modification.mod (8.2 KB)
processed_data.csv (9.4 KB)

The error above has nothing to do with the changes in the mod-file. It’s related to write access on Windows, typically if you are working on cloud-synchronized folder. See e.g.

Your mod-file has the problem that you have more observables (5) than shocks (3).

Thank you so much for your assistance.
I have a few more questions.

1. MCMC Convergence Diagnostics Warning:
After modifying the code, it seems to run correctly, but I received the following warning:

MCMC convergence diagnostics are not computed because the total number of iterations is not bigger than 2000! 
> In mcmc_diagnostics (line 114)
In dynare_estimation_1 (line 456)
In dynare_estimation (line 105)
In Gali_Monacelli_2005_modification.driver (line 592)
In dynare (line 308)

Could this warning be an issue, and should I increase the number of iterations to address it?

2. Diffuse Filter and Likelihood Error:
If I omit the diffuse_filter option, I get this warning:

An error in computing likelihood for initial parameter values

My conjecture is that this issue arises because the observed data I provided to Dynare does not have a mean of zero, particularly for variables like inflation and nominal interest rates.

  • Could this be the reason for the warning?
  • Does adding diffuse_filter handle such nonstationary observed variables effectively?
  • Also, is it correct to assume that inflation and nominal interest rates are stationary variables? I did not detrend or transform these variables, assuming their stationarity, but I did modify GDP to account for its apparent increasing trend, following the guidelines in Pfeifer (2013), specifically the Data Preliminaries section. Could this assumption about inflation and nominal interest rates be incorrect?

Thank you!

Gali_Monacelli_2005_modification.mod (8.2 KB)
processed_data.csv (5.6 KB)

  1. Your model has a unit root, which requires the use of the diffuse_filter.
  2. The issue is almost surely the mean of the observables not matching the steady states of the model.
  3. Considering inflation and interest rates as stationary is a very common assumption that is unproblematic in most cases. The discrepancy in means is a bigger issue.