# Blanchard & Kahn conditions are not satisfied: no stable equilibrium & The Jacobian of the static model is singular

1. Simply compute the standard deviation on your data using Matlab.

The theoretical moments printed by Dynare is not even close to the data.
For example, theoretical SD for y is 0.1358 while std(y_obs) is 0.0134. And investments i has a theoretical value of 0.8296 while the data std(i_obs) is 0.0290.
So the model is really bad as replicating the data? Or did I do something wrong?

Thanks.

That usually happens if the model is misspecified, forcing the shocks in-sample to be correlated, while theoretically they are uncorrelated. Did you check the results from the historical decomposition?

Did you check the results from the historical decomposition?

Do you mean shock_decomposition? I’ve not run the shock decomposition

Yes, that often gives you insights into what is going on.

Hm, so I’ve to reestimate the model and using shock_decomposition before I can move forward?

No, you can use the estimated version. The command is separate from the estimation.

How do I run a stoch_simul of a previous estimated model?

You can load `M_.params` from after estimation before running `shock_decomposition`.

I get the following error "Unrecognized field name “posterior_mean”.

Error in get_posterior_parameters (line 50)
xparam(m) = oo_.([field1 type]).shocks_std.(name1);

Error in evaluate_smoother (line 78)
parameters = get_posterior_parameters(‘mean’,M_,estim_params_,oo_,options_);

Error in shock_decomposition (line 87)
[oo_, M_, ~, ~, Smoothed_Variables_deviation_from_mean] = evaluate_smoother(parameter_set, varlist, M_, oo_, options_, bayestopt_, estim_params_);

Error in model1.driver (line 801)
oo_ = shock_decomposition(M_,oo_,options_,var_list_,bayestopt_,estim_params_);

Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);"

when I run

``````x=load('model1_results.mat'); M_.params=x.M_.params;
stoch_simul(order=1, conditional_variance_decomposition=[1,8,32], irf=0) y c i n pi r tot rer;
shock_decomposition(parameter_set=posterior_mean, datafile=dataset1) y i pi r tot rer;

``````

You are not using the `posterior_mean` here, it’s `calibration` due to loading into `M_.params`. You also need to assign `M_.Sigma_e` and potentially `M_.H` if you had measurement error.

Now I’m getting "Error using print_info
Blanchard & Kahn conditions are not satisfied: no stable equilibrium.

Error in DsgeSmoother (line 133)
print_info(info,options_.noprint, options_);

Error in evaluate_smoother (line 118)
DsgeSmoother(parameters,dataset_.nobs,transpose(dataset_.data),dataset_info.missing.aindex,dataset_info.missing.state,M_,oo_,options_,bayestopt_,estim_params_);

Error in shock_decomposition (line 87)
[oo_, M_, ~, ~, Smoothed_Variables_deviation_from_mean] = evaluate_smoother(parameter_set, varlist, M_, oo_, options_, bayestopt_, estim_params_);

Error in model1.driver (line 801)
oo_ = shock_decomposition(M_,oo_,options_,var_list_,bayestopt_,estim_params_);

Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);
"

``````x=load('model1_results.mat'); M_.params=x.M_.params; M_.Sigma_e=x.M_.Sigma_e; M_.H=x.M_.H;
stoch_simul(order=1, conditional_variance_decomposition=[1,8,32], irf=0) y c i n pi r tot rer;
shock_decomposition(parameter_set=calibration, datafile=dataset1) y c i n pi r tot rer;

``````

You may need to set
`options_.diffuse_filter=1`.

It worked. Thanks.

So what am I looking for ?

Unfortunately, the plots look decent. This is a well-known issue in models with many shocks and has been discussed in e.g.

1 Like

Ok, then I’ll not spend anymore time on second moments.

I did however identify a potential issue in one of the IRF plots. A shock to monetary policy leads to a decrease in the interest rate, when the opposite is expected. Have you seen this before? The equation is a standard Taylor rule.

Thanks.

Another thought regarding moments. If I’m using log-differenced data without demeaning like

``````model(linear);
y=y_obs;
``````

then this will result in a positive mean by the shocks as stated in the manual. Could this be related to data and moments not matching?

Also, after consulting the observation equation manual again, should the observation equation be specified as the following when the data already is log-differenced (done in R before loading the data into a matlab file)?

``````var mu_tilde ...;
model(linear);
y_obs=y-y(-1)+mu_tilde;
``````

If this is the case, how should mu_tilde be calibrated?

Sincerely,

If the mean were not to match, you should see this in the `shock_decomposition`.