Estimation Troubles with Gali and Monacelli (2005)


I am trying to estimate the model Gali and Monacelli (2005), “Monetary and Exchange Rate Volatility in a Small Open Economy” based on the code provided by Professor Pfeifer and data from South Korea, but am running into the following error messages:

You did not declare endogenous variables after the estimation/calib_smoother command.
PARAMETER INITIALIZATION: Some standard deviations of shocks of the calibrated model are 0 and
PARAMETER INITIALIZATION: violate the inverse gamma prior. They will instead be initialized with the prior mean.
Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):

Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in print_info (line 42)
        error(['Blanchard Kahn conditions are not satisfied: no stable' ...

Error in initial_estimation_checks (line 175)
        print_info(info, DynareOptions.noprint, DynareOptions)

Error in dynare_estimation_1 (line 165)
    oo_ =

Error in dynare_estimation (line 105)

Error in GaliMonacelliEst (line 306)

Error in dynare (line 235)
evalin('base',fname) ;

I have seasonally adjusted and demeaned my data according to the guide in Pfeifer (2018), and have implemented 7 observed series, and added measurement errors in order to preserve BK conditions with the number of shocks. Any guidance would be greatly appreciated!

GMPostInflationTargeting.xlsx (18.2 KB)
GaliMonacelliEst.mod (6.3 KB)

You do not calibrate or estimate both eps_a and eps_star. Probably you’ll want to estimate them. Run the code again please, after fixing this.

Hi Professor,

After using the diffuse_filter option and calibrating some of the shocks using test values of the original code, I received these error messages:

(minus) the hessian matrix at the “mode” is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!

In dynare_estimation_1 (line 316)
In dynare_estimation (line 105)
In GaliMonacelliEst (line 310)
In dynare (line 235)
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate.

Are there any further errors in the code, or should the model be adjusted? The adjusted code is attached.

GaliMonacelliEst.mod (6.6 KB)

You should check the identification of your parameters.