# Stoch\_simul failed:Blanchard & Kahn conditions are not satisfied

**URL:** <https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166>\
**Category:** Stochastic simulations\
**Created:** [6 October 2022 03:00 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166 "2022-10-06T03:00:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CHENGHAOWEN](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@CHENGHAOWEN](https://forum.dynare.org/u/CHENGHAOWEN)\
**Post date:** [6 October 2022 03:00 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/1 "2022-10-06T03:00:14Z")

</div>

The estimation mod is passed and has reported the bayes irf graph:  
[bayes1006.mod](https://forum.dynare.org/uploads/short-url/zTbvhFeTi1wxL7TO4aAQB3toazA.mod) (6.2 KB)  
[data\_20220914.mat](https://forum.dynare.org/uploads/short-url/o9J3Upm1u9ATo9CpTdfkYbuwJXD.mat) (3.9 KB)

But the simulation mod is failed:There are 5 eigenvalue(s) larger than 1 in modulus  
for 6 forward-looking variable(s),The rank condition ISN’T verified!  
[esti1006.mod](https://forum.dynare.org/uploads/short-url/5rG6xWgFoVASjSsretAbsG0vCxF.mod) (5.6 KB)

I choose the post. mean of the estimation mod, the simulation mod should pass and report the same irf graph as the the bayes irf graph in the estimation mod. But the simulation mod is failed(B-K condition), why?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 October 2022 17:11 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/2 "2022-10-08T17:11:41Z")

</div>

Your model has a unit root from what I can see. That requires `diffuse_filter` in the estimation. Leaving that option out allows this root to be counted as explosive. Thus, you have the impression that the model works. But the `check` before `estimation` already shows that there is an indeterminacy problem in your model.

---

<div class="post-metadata">

**Author:** ![CHENGHAOWEN](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@CHENGHAOWEN](https://forum.dynare.org/u/CHENGHAOWEN)\
**Post date:** [9 October 2022 07:09 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/4 "2022-10-09T07:09:29Z")

</div>

Using diffuse\_filter may have problem:  
I have tried to use diffuse\_filter in the estimation mod, but the irf graph of the stoch\_simu mod(using post\_mean) is not the same as the irf graph of the estimation mod. Especially ,the two graph is quite different.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 October 2022 08:24 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/5 "2022-10-09T08:24:44Z")

</div>

See

> [@Bayesian IRF](https://forum.dynare.org/t/bayesian-irf/1594/2):
>
> The mean of the the Bayesian IRFs is the mean of the distribution of the IRFs generated when parameters are drawn from the posterior distribution. When you run stoch\_simul after MCMC, the parameters of the model are set to their mean value in the posterior distribution. But an IRF is a nonlinear function of the parameters, therefore the mean of the IRF is not identical to the IRF for the mean value of the parameters Best Michel

---

<div class="post-metadata">

**Author:** ![CHENGHAOWEN](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@CHENGHAOWEN](https://forum.dynare.org/u/CHENGHAOWEN)\
**Post date:** [12 October 2022 02:24 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/6 "2022-10-12T02:24:05Z")

</div>

The previous mod(using _diffuse\_filter_ in the estimation):  
[bayes0927.mod](https://forum.dynare.org/uploads/short-url/t1HIFXJY7jNzC6hcDqoutSVj0MP.mod) (6.7 KB)  
reported bayes irf:(the first irf graph)

 ![bayes0927](https://forum.dynare.org/uploads/default/original/2X/3/3f887f667d0cb7d9be3c39674afe71561a81f0c5.png)

stoch\_simu mod:  
[simu0927.mod](https://forum.dynare.org/uploads/short-url/dN7hAmcgZ5QipY6sEkHs4wphgS6.mod) (6.1 KB)

The two irf graph is quite different, which means stoch\_simu cannot repeat the _diffuse\_filter_ in the estimation.

---

<div class="post-metadata">

**Author:** ![CHENGHAOWEN](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@CHENGHAOWEN](https://forum.dynare.org/u/CHENGHAOWEN)\
**Post date:** [12 October 2022 02:24 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/7 "2022-10-12T02:24:44Z")

</div>

stoch\_simu reported irf:(the first irf graph)

 ![simu0927](https://forum.dynare.org/uploads/default/original/2X/4/44fb7cd793fc91321930b46c40df2ef6725d0383.png)

The two irf graph is quite different, which means stoch\_simu cannot repeat the _diffuse\_filter_ in the estimation.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [12 October 2022 08:58 UTC](https://forum.dynare.org/t/stoch-simul-failed-blanchard-kahn-conditions-are-not-satisfied/21166/8 "2022-10-12T08:58:15Z")

</div>

Most importantly, it seems you are working with very different shock sizes/shock standard deviations. The shape of the IRFs does not look too different.
