# The zero lower bound issue in deterministic simulations

**URL:** <https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394>\
**Category:** Perfect foresight simulations\
**Created:** [21 March 2024 17:17 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394 "2024-03-21T17:17:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![asprilqjs](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@asprilqjs](https://forum.dynare.org/u/asprilqjs)\
**Post date:** [21 March 2024 17:17 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/1 "2024-03-21T17:17:34Z")

</div>

Dear Professor,  
I am reaching out for assistance with a problem I encountered while working on a ZLB solution. I referred to the method outlined in [Zero-Lower-Bound (ZLB) in the New Keynesian baseline model with Dynare | Willi Mutschler](https://mutschler.eu/dynare/occassionally-binding-constraints/nk_video_zlb/#nk_zlb_discretionmod). However, in my approach, I used the nonlinear form of the model in the model block, instead of the linearized form as in the original mod file. Despite this, I utilized the linear\_approximation option in the subsequent perfect\_foresight\_solver. After running the file, the resulting graph indicates that my interest rate is not being targeted at the desired value. I would greatly appreciate your guidance on this issue.

[testdetzlb.mod](https://forum.dynare.org/uploads/short-url/jiZDFUniEc4oKsOxSyBDy79bSHF.mod) (9.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:** [21 March 2024 17:55 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/2 "2024-03-21T17:55:19Z")

</div>

A linear approximation will of course remove the nonlinearity.

---

<div class="post-metadata">

**Author:** ![asprilqjs](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@asprilqjs](https://forum.dynare.org/u/asprilqjs)\
**Post date:** [21 March 2024 17:58 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/3 "2024-03-21T17:58:36Z")

</div>

Does this mean that when conducting ZLB simulations, we need to use a linearized model and cannot employ the linear\_approximation option?

---

<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:** [21 March 2024 18:00 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/4 "2024-03-21T18:00:26Z")

</div>

No, it means that you cannot turn a nonlinear model into a linear one using `linear_approximation`, because you are removing the nonlinearity at the ZLB as well.

---

<div class="post-metadata">

**Author:** ![asprilqjs](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@asprilqjs](https://forum.dynare.org/u/asprilqjs)\
**Post date:** [21 March 2024 18:15 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/5 "2024-03-21T18:15:38Z")

</div>

I understand now, but I still have a crucial question: even if we disregard the zero lower bound issue, my settings should theoretically maintain the interest rate at a set target value without change for an initial number of periods, thereby creating an interest rate targeting effect. However, the graph produced from the deterministic simulation does not show this rate targeting phenomenon.

---

<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:** [21 March 2024 18:21 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/6 "2024-03-21T18:21:22Z")

</div>

Which settings should guarantee that?

---

<div class="post-metadata">

**Author:** ![asprilqjs](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@asprilqjs](https://forum.dynare.org/u/asprilqjs)\
**Post date:** [21 March 2024 18:36 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/7 "2024-03-21T18:36:58Z")

</div>

```auto
varexo
%The duration for which the nominal interest rate remains constrained at the zero lower bound is determined exogenously by the value of eps_zlb
eps_zlb (long_name= 'Indicator variable for the zero lower bound.')
%Interest rate value during rate targeting.
eps_rzlb (long_name= 'Interest rate target')
;

model;
%Temporary variable for simulating the ZLB.
%Similar to the setup method in NK_ZLB_discretion.mod as found in %https://mutschler.eu/dynare/occassionally-binding-%constraints/nk_video_zlb/#nk_zlb_discretionmod.
#rr=eps_zlb*eps_rzlb + (1-eps_zlb)*r_taylor;
......

%26
[name='Monetary policy.']
@#if talyor== 1
    %Taylor's Rule.
    log(1+r_taylor)=(1-rho_r)*log(1+rss)+rho_r*log(1+r_taylor(-1))+rho_rpi*((pi-piss)/piss)+rho_ry*log(y/y(-1))-eps_r; 
......
%34
[name='Actual nominal interest rate']
r=max(rr,0);
......end;
%Setting for deterministic shocks.
%ZLB test
......
        shocks;
        %By using eps_rzlb, the interest rate can be reduced below 0, and other targeted interest rate values can also be set.
        var eps_rzlb;
        %Duration of interest rate targeting.
        periods 1:50;
        %Target interest rate
        %If it is below 0, the preceding ZLB constraint will cause it to be set to 0.
        values -1;
        %Use the ZLB indicator exogenous variable to set the duration for targeting the interest rate.
        var eps_zlb;
        %Duration of interest rate targeting.
        periods 1:50;
        values 1;
        end;

```

Here is the core part of my interest rate targeting setup, extracted from the mod file I uploaded, with the commented sections highlighted. The principle is to set an exogenous shock, eps\_zlb, and then establish a temporary variable rr and an endogenous variable r\_taylor to represent the interest rate according to Taylor’s Rule. Using the equation #rr=eps\_zlb\*eps\_rzlb + (1-eps\_zlb)\*r\_taylor; I set eps\_zlb=1 for periods 1 to n, then set the value of eps\_rzlb, which essentially makes the value of rr equal to the value of eps\_rzlb during these periods. After period n, eps\_zlb=0, and rr=r\_taylor, switching to Taylor’s Rule. Utilizing r=max(rr,0), I assign this value to the interest rate variable in my original model, thereby imposing the ZLB constraint.

---

<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:** [27 March 2024 12:02 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/8 "2024-03-27T12:02:01Z")

</div>

I see. And what goes wrong?

---

<div class="post-metadata">

**Author:** ![asprilqjs](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@asprilqjs](https://forum.dynare.org/u/asprilqjs)\
**Post date:** [29 March 2024 03:32 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/9 "2024-03-29T03:32:44Z")

</div>

The interest rate did not remain fixed within the periods I set.

---

<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 April 2024 15:10 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/10 "2024-04-01T15:10:39Z")

</div>

I would need to see the full codes to replicate the issue.

---

<div class="post-metadata">

**Author:** ![asprilqjs](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@asprilqjs](https://forum.dynare.org/u/asprilqjs)\
**Post date:** [1 April 2024 15:32 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/11 "2024-04-01T15:32:47Z")

</div>

[testdetzlb.mod](https://forum.dynare.org/uploads/short-url/jiZDFUniEc4oKsOxSyBDy79bSHF.mod) (9.4 KB)  
This is my mod

---

<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 April 2024 15:41 UTC](https://forum.dynare.org/t/the-zero-lower-bound-issue-in-deterministic-simulations/25394/12 "2024-04-01T15:41:36Z")

</div>

In Dynare 6 I simply get that the perfect foresight problem can not be solved.
