# NKM, ZLB, Heterogeneous Expectations, dynareOBC

**URL:** https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865
**Category:** Dynare contributions and examples
**Created:** [10 September 2021 15:38 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865 "2021-09-10T15:38:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)
#### Post date: [10 September 2021 15:38 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865/1 "2021-09-10T15:38:03Z")

</div>

@cfp @jpfeifer  
Hello everyone!

In this model, I have added heterogeneous expectations to the nkm and would like to investigate it at the ZLB. The Taylor rule is applied.  
Unfortunately, dynareOBC does not find a solution.

I would be very pleased about solution proposals and suggestions!  
[model.mod](https://forum.dynare.org/uploads/short-url/2Gd4Ose305anGiDZlt0VMwrUQd8.mod) (2.9 KB)  
[Error message.txt](https://forum.dynare.org/uploads/short-url/qaq6lp3tt6dNCKPjIn8bVe17ipe.txt) (2.4 KB)

---

<div class="post-metadata">

### Author: ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)
#### Post date: [10 September 2021 16:02 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865/2 "2021-09-10T16:02:09Z")

</div>

Ensure your model works in standard Dynare before trying DynareOBC.

---

<div class="post-metadata">

### Author: ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)
#### Post date: [10 September 2021 16:15 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865/3 "2021-09-10T16:15:58Z")

</div>

@cfp  
The code without ZLB condition works:  
[comparison.mod](https://forum.dynare.org/uploads/short-url/yd9AT6jqpiJhfaT6vwsORPklmk0.mod) (2.9 KB)  
[comparison output.txt](https://forum.dynare.org/uploads/short-url/8pONJUubzwqXvvFB9bnbukTjyOU.txt) (4.0 KB)

---

<div class="post-metadata">

### Author: ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)
#### Post date: [10 September 2021 16:30 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865/4 "2021-09-10T16:30:11Z")

</div>

They are not the same. Your comparison has your steady state model block commented out. You cannot have both an initval and a steady state model block.

Just delete it in the DynareOBC version if it’s not needed.

If you want to be on the safe side, also:

1. delete all variable names, latex etc,
2. delete all equation tags,
3. delete all code commented out with MATLAB style comments, not Dynare style ones.

---

<div class="post-metadata">

### Author: ![cfp](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/ed655f/32.png) [@cfp](https://forum.dynare.org/u/cfp)
#### Post date: [10 September 2021 16:30 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865/5 "2021-09-10T16:30:53Z")

</div>

The correct test is to run exactly the same MOD file that you want to use with DynareOBC with normal Dynare.

---

<div class="post-metadata">

### Author: ![Flo24](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@Flo24](https://forum.dynare.org/u/Flo24)
#### Post date: [10 September 2021 16:39 UTC](https://forum.dynare.org/t/nkm-zlb-heterogeneous-expectations-dynareobc/18865/6 "2021-09-10T16:39:45Z")

</div>

@cfp  
I seem to get an error when I try the steady command in my dynareOBC script  
[with ZLB.txt](https://forum.dynare.org/uploads/short-url/1JwYpgkuzDlqcFSYgA50o67KEfq.txt) (3.9 KB)
