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

**URL:** <https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725>\
**Category:** Stochastic simulations\
**Created:** [1 February 2022 13:57 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725 "2022-02-01T13:57:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [1 February 2022 13:57 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/1 "2022-02-01T13:57:41Z")

</div>

Hi all,  
So I’m trying to set up and run a small two country open economy model as my master thesis, this model to be precise: [https://ars.els-cdn.com/content/image/1-s2.0-S0164070421000513-mmc1.pdf](https://ars.els-cdn.com/content/image/1-s2.0-S0164070421000513-mmc1.pdf)

I get the following error message when running the code: “Blanchard & Kahn conditions are not satisfied: no stable equilibrium.”. When I run the model\_diagnostics I get the following information, that I don’t know how to solve,:

"MODEL\_DIAGNOSTICS: The Jacobian of the static model is singular  
MODEL\_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations  
Colinear variables:  
n\_US  
c\_US  
i\_US  
k\_US  
omega\_US  
Colinear equations  
20 21 24 25 26 27 36 38 39

MODEL\_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root  
MODEL\_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.  
MODEL\_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,  
MODEL\_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.  
MODEL\_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one  
MODEL\_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation  
MODEL\_DIAGNOSTICS: is missing. The problem often derives from Walras Law."

I have double checked all the equations so I have no clue what’s wrong actually, and since the model is from a published paper it should work I assume.  
Any suggestions? All help is appreciated, thank you in advance!  
Sincerely,

[model.mod](https://forum.dynare.org/uploads/short-url/uhrae8tb20BZ1r4bMQOkEJe1RCb.mod) (5.4 KB)

---

<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:** [1 February 2022 15:51 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/2 "2022-02-01T15:51:18Z")

</div>

Have you asked the authors for replication files?

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [1 February 2022 16:19 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/3 "2022-02-01T16:19:41Z")

</div>

Thank you for reply.

No I have not, since the author doesn’t use Dynare but ‘DSGE-SVt’ Matlab package and stochastic volatility for the shocks. I intend not to, and stick with Dynare.

Do you have any suggestions? I have read on the forum that it might be related to the terms of trade or the Taylor rule etc, but I don’t really manage to solve it in this case.

---

<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:** [1 February 2022 16:38 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/4 "2022-02-01T16:38:58Z")

</div>

I would still ask the authors to cross-check with implementation. Replicating papers is hard. I also suggest

> [@Uribe (2019) replication](https://forum.dynare.org/t/uribe-2019-replication/16362/3):
>
> To aid debugging, I would suggest to make use of Dynare’s \LaTeX-capabilties and tagging the equations to see what you implemented.

See also

[![](https://img.youtube.com/vi/GJjSwnikwW4/maxresdefault.jpg "Full information estimation of linear DSGE models, by Johannes Pfeifer") ](https://www.youtube.com/watch?v=GJjSwnikwW4&t=1492s)

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [2 February 2022 10:15 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/5 "2022-02-02T10:15:29Z")

</div>

I got the code from the author but it’s too confusing and it will take way too much time for me to decipher and learn the package she is using(I don’t have much experience with Matlab).

I checked the model in latex and all the equations seems fine, really confusing. Any other/last suggestions?  
Edit: If I remove the real wage variable (omega), the diagnostics command says MODEL\_DIAGNOSTICS: No obvious problems with this mod-file were detected.

But the model still doesnt run and I get the following error messages:

Error using print\_info (line 32)  
Blanchard & Kahn conditions are not satisfied: no stable equilibrium.

Error in stoch\_simul (line 107)  
print\_info(info, options\_.noprint, options\_);

Error in model1.driver (line 644)  
[info, oo\_, options\_, M\_] = stoch\_simul(M\_, options\_, oo\_, var\_list\_);

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

---

<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:** [2 February 2022 12:00 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/6 "2022-02-02T12:00:18Z")

</div>

It’s not about the package per se but rather about the entered model equations. You should be able to cross-check their implementation with yours.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [2 February 2022 12:32 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/7 "2022-02-02T12:32:57Z")

</div>

The script I received looks like this, which gives me nothing

 ![Screenshot 2022-02-02 at 13.30.07](https://forum.dynare.org/uploads/default/original/2X/5/5d8f0d476199956ff09d14d10d6650de9a59a042.png)

I just sent her another email asking for the model details however but i think the script I received is the one.  
[user\_mod.m](https://forum.dynare.org/uploads/short-url/5MMdwOnbefl17kwPOQCLZfaT9ES.m) (17.7 KB)

---

<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:** [2 February 2022 14:42 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/8 "2022-02-02T14:42:57Z")

</div>

But that shows the timing. The entries set here are the coefficients in the linearized equations. G0 is contemporaneous, G1 forward-looking. `V.*` is the index of the respective variable.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [2 February 2022 14:50 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/9 "2022-02-02T14:50:28Z")

</div>

Yes, so I then need another script with the authors equations/model? (I assumed the linearized equations in the online appendix was correct, maybe there is missing some market clearing condition or something)

---

<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:** [3 February 2022 08:58 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/10 "2022-02-03T08:58:54Z")

</div>

I don’t understand the question. Your screenshot shows every single equation, which variables appear in the equation and which timing they have. Nothing else should be required to check the timing between that code and yours.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [3 February 2022 09:22 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/11 "2022-02-03T09:22:18Z")

</div>

My question is, I’m not sure how to interpret it, for example, at row 39 why is the coefficient of capital minus Omega?

Also, I noticed a potential problem, the author writes that all variables are log-deviations from steady state except r\_t=R\_t-R, and a\_t=A\_t-A but all equations are log-linearized and I have entered both r\_t and a\_t as equal zero in the steady state model block.  
Might this be related to my problem? I don’t know how to set up the model if some of the equations aren’t log-deviations but the rest are? Also there is no R\_t-R and A\_t-A in the specified equations so I’m a bit confused.

I’m also sorry for taking up so much of your valuable time Professor!

Edit: I solved it, the problem were the steady state relations in the Net foreign assets equation. I checked the model and equations from a previous study (which the author updated) and there were no steady state relations. So when I removed them it worked.

---

<div class="post-metadata">

**Author:** ![Shells](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a6a055/32.png) [@Shells](https://forum.dynare.org/u/Shells)\
**Post date:** [6 February 2022 07:49 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/12 "2022-02-06T07:49:25Z")

</div>

Hi - can someone help me spot the timing (or other) issue in this mod file? I am getting the BK errors but I think the timing is correct? I am using Dynare 4.6.4. Any help will be really appreciated! Model diagnostics said no obvious errors.  
[US\_IC3\_v2.mod](https://forum.dynare.org/uploads/short-url/6dwksUbgMrSpcaQugdG3r3HZt8R.mod) (14.7 KB)

---

<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:** [6 February 2022 16:35 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/13 "2022-02-06T16:35:47Z")

</div>

If the timing is correct, it may be a sign error, a problem with linearization or simply a problem with the parameterization.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [9 February 2022 17:55 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/14 "2022-02-09T17:55:47Z")

</div>

Hi again,  
So I’m trying to estimate the model with data/bayesian methods and I’m back with “Blanchard & Kahn conditions are not satisfied: no stable equilibrium.”

It works however with stoch\_simul as stated last week, any suggestions?

Thanks in advance.

---

<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 February 2022 19:02 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/15 "2022-02-09T19:02:32Z")

</div>

Usually, the culprit is a unit root, so that you are missing the `diffuse_filter`-option.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [10 February 2022 10:51 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/16 "2022-02-10T10:51:36Z")

</div>

It worked (also had to change mode\_compute=6 instead of 4). However I do get the following messages:

"Estimation::marginal density: The support of the weighting density function is not large enough…  
Estimation::marginal density: I increase the variance of this distribution.

Estimation::marginal density: Let me try again.  
…  
Estimation::marginal density: There’s probably a problem with the modified harmonic mean estimator.

ESTIMATION RESULTS

Log data density is -Inf.  
…"

The Brooks and Gelman (1998) plots also looks terrible! Advice?

Edit: I’m currently investigating the mode check.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [10 February 2022 15:29 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/17 "2022-02-10T15:29:58Z")

</div>

Here are the plots for mode\_check, should I change priors for those with red dots? Problems with the data? What about “ssigma” ?

 ![1](https://forum.dynare.org/uploads/default/original/2X/b/b2a3438b91087a1f32ef0aa8609369bc3d66a8eb.png)  
 ![2](https://forum.dynare.org/uploads/default/original/2X/0/01b3dd7f0f16b3240de148b292286d5d0c981ad3.png)  
 ![3](https://forum.dynare.org/uploads/default/original/2X/c/c8cc0c819e203069822d94f3a7a2176ceab1e946.png)  
 ![4](https://forum.dynare.org/uploads/default/original/2X/6/64e7ec9e8ac72b71a31013130567883f544226c1.png)  
 ![5](https://forum.dynare.org/uploads/default/original/2X/6/688a4026676637e2f06184e326eda5f65bdbff3a.png)

---

<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:** [11 February 2022 12:12 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/18 "2022-02-11T12:12:42Z")

</div>

Did you correctly specify the observation euqations? That is the most common mistake.

---

<div class="post-metadata">

**Author:** ![TerribleStudent](https://forum.dynare.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@TerribleStudent](https://forum.dynare.org/u/TerribleStudent)\
**Post date:** [13 February 2022 15:44 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/19 "2022-02-13T15:44:06Z")

</div>

I’m using log-differenced real gdp and investment per capita, log-differenced gdp deflator as inflation, and the interest rate is specified as

 ![Screenshot 2022-02-09 at 17.16.22](https://forum.dynare.org/uploads/default/original/2X/0/02f26d95db3f69cafd1968a93268cbd55e10db5c.png)  
where R^(data) is in percentage, as stated in the manual. R^(obs) does not have mean zero however. I’m using quarterly data over 26 years.

Could the problem be with the interest rate or the log-differenced output and investment?

---

<div class="post-metadata">

**Author:** ![Shells](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/a6a055/32.png) [@Shells](https://forum.dynare.org/u/Shells)\
**Post date:** [17 February 2022 11:32 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725/20 "2022-02-17T11:32:57Z")

</div>

Thanks very much for the response! I am still looking for the error(s) however. The frustrating part is it was all working fine in the previous version of matlab (2017) I had. The errors started appearing after I updated to matlab 2021. Any clue why that might be the case?

[Next page](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-no-stable-equilibrium-the-jacobian-of-the-static-model-is-singular/19725.md?page=2)
