The Zero Lower Bound Constraint on Nominal Int. Rate

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

The Zero Lower Bound Constraint on Nominal Int. Rate

Postby lalover » Sun Apr 17, 2011 6:55 pm

I am trying to write a medium scale DSGE model and analyze the effects of ZLB, however, I cannot write the ZLB constraint in dynare.

is there anybody having dynare code on this topic? It would be quite useful for me to see an example of this type of codes.
lalover
 
Posts: 2
Joined: Sun Apr 17, 2011 6:50 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby coda » Thu Apr 21, 2011 8:10 pm

I think that you can enforce ZLB on interest rate with max() function, but you can run only deterministic simulations on such a model.

For example, in case where interest rate is set by a Taylor rule, you could define it like this:

Code: Select all
model;
...
i = max(0, phi*pi + rho*y);
...
end;


Hope this helps.

Damir
coda
 
Posts: 1
Joined: Thu Apr 21, 2011 7:58 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby lalover » Tue Apr 26, 2011 4:18 pm

thank you for your response, however i have already tried such an algorithm; and it does not work due to the non linear nature of ZLB constraint... When i introduced max() function the results did not change.

I have tried a lot of different cases however, i started to think that dynare is not the right program for writing ZLB codes. That is why i asked whether someone has codes. I believe no one does it in dynare, or is there someone?
lalover
 
Posts: 2
Joined: Sun Apr 17, 2011 6:50 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby SébastienVillemot » Mon May 23, 2011 3:24 pm

As stated above, Dynare can perform analyses of ZLB in a deterministic setup (using the "simul" command, where nonlinearities are fully handled), but not in a stochastic setup (using "stoch_simul").

If you want to analyze ZLB in a stochastic setup, then use a global method or the extended path methods. These methods will be incorporated in Dynare at some point in the future, but are not yet there.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby Michael Paetz » Tue Nov 15, 2011 5:23 pm

Thanks to Tom Holden (http://www.tholden.org/), I was able to implement an algorithm to simulate a standard NKM with a zero lower bound. I attached all necessary files. I only included a negative inflation shock, but you could add any other shock quite easily. A detailed description of Tom's algorithm can be found in the appendix of his paper:

http://www.dynare.org/wp-repo/dynarewp004.pdf

To run the model just execute NKM_lowerbound.mod. This file will call all other functions in the zip-file, needed to solve the model, and creates impulse responses for the bounded and unbounded model in one figure. In line 6 and 7 you have to define the number of periods you would like to simulate the IRFs (TIRF), and the number of periods, after which you believe the constraint will no longer bind (TShadowI).

I benefit a lot from the discussions in this forum. Hopefully, this time I could help someone.

Best
Michael
Attachments
lowerbound.zip
(3.99 KiB) Downloaded 1959 times
Last edited by Michael Paetz on Tue Nov 15, 2011 5:59 pm, edited 3 times in total.
Michael Paetz
 
Posts: 12
Joined: Fri Jul 29, 2011 9:03 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby cfp » Tue Nov 15, 2011 5:37 pm

I'm Tom Holden, if anyone has any further questions about the algorithm.
cfp
 
Posts: 60
Joined: Mon Mar 15, 2010 9:18 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby mch » Sat Feb 04, 2012 6:33 pm

Dear Michael,

Many thanks for making this code available (and also to Tom for the innovation). Just to be clear, have you extended Tom's method to deal with the ZLB in full stochastic simulations in Dynare, or is the code only valid for calculating IRFs with and without the ZLB constraint?

Best,
Michael
mch
 
Posts: 9
Joined: Sat Feb 04, 2012 6:07 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby Michael Paetz » Wed Feb 08, 2012 9:02 am

Hey Michael,

no, I did not extend anything. I just implemented the algorithm propsed by Tom in a standard New Keynesian Model. So the fame goes to Tom.

Just to understand you right: What do you mean by full stochastic simulations? The calculation of variances, shock decompositions and so on? I am working on a paper using this method, and calculate the accumulated sum of deviations from equilibrium (from the IRFs) as a measure of volatility to compare different policies in this framework. I think this should be a good proxy for the variances of the variables, right?

Best,
Michael
Michael Paetz
 
Posts: 12
Joined: Fri Jul 29, 2011 9:03 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby cfp » Wed Feb 08, 2012 10:44 am

Linearity means you can simulate a (zero-mean) model without bounds by the following method:

1) Generate one s.d. infinite length IRFs to all shocks. Denote these by z(t,v,e) where t>=0 is the time since the shock hit, v is the variable being examined and e is the shock.
2) Let x(t,v) denote the simulated value of the variable v at t, and let s(t,e) be a draw from an NIID(0,1) variable for all times t and shocks e. Then:
x(t,v) = sum( sum( s(t-k,e) * z(k,v,e) , e in the set of shocks ), k = 0 .. infinity )

Therefore:
E[x(t,v) * x(t,v)] = sum( sum( z(k,v,e) * z(k,v,e), e in the set of shocks ), k = 0 .. infinity )

So the standard deviation of a variable in a model without bounds is the square-root of the sum of the squared IRF coefficients.
Since you don't have linearity in the presence of bounds this formula no longer holds exactly, but it may still be reasonable.
cfp
 
Posts: 60
Joined: Mon Mar 15, 2010 9:18 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby mch » Fri Feb 10, 2012 4:35 pm

Hi Michael,

Thanks for your reply. I was really asking whether the stochastic simulation paths of variables would be valid. If I understand correctly only the IRFs are strictly valid, but you are using an approximation to infer variances, shock decompositions etc. from the IRFs. May I ask what model are you working with? Will it pose any problems for the code if I use a much larger linear model or a nonlinear model that is approximated to second-order?

Best,
Michael
mch
 
Posts: 9
Joined: Sat Feb 04, 2012 6:07 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby cfp » Fri Feb 10, 2012 5:14 pm

mch: I initially thought this method could not be used for stochastic simulation, but thinking further I see that it can. First, add a load of "shadow shocks" to the model as in the IRF method. Now suppose we've simulated up to period t. Then simulate one more period holding just the shadow shocks at zero. Then simulate a large number more periods holding all shocks at zero. Observe if the ZLB is ever hit (in t+1,t+2,...). If it isn't, your simulation of t+1 is fine, and you can go to the next period. If it is, then agents should predict this and adjust expectations accordingly. As in the IRF case, the task is to find the vector of shadow shocks such that the bound is always satisfied, and shadow shocks are only positive when the bound is expected to bind in the relevant number of periods. Again, you can exploit linearity to turn this into a quadratic optimisation problem. (Effectively you're adding the shadow shock IRF to the shock-less predicted future path.) Once you've found a solution to the quadratic optimisation problem you have a new valid value for t+1, and you can go to the next period.

So you just have to solve a quadratic optimsation problem for each period you simulate. This will be slower than standard simulation, but not prohibitively slow.

If any one wants to use this stochastic simulation method PLEASE CITE THIS URL, at least until I get a paper out of this. Sorry if that's a rude request, but clearly I could (should?) have kept my mouth shut about this algorithm until it was published. (If it is indeed publishable anywhere decent...) If anyone feels like adding the code to Dynare to implement this (Michel, Stephane?) then perhaps we could co-author the paper.

In answer to your other question mch: yes it can be used in large models, but no it cannot be used with second order approximations (we require linearity to make adding IRFs valid).

Tom (Holden)
cfp
 
Posts: 60
Joined: Mon Mar 15, 2010 9:18 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby Michael Paetz » Mon Feb 13, 2012 7:29 am

@Michael: You ask for the model, I am working with. At the moment I implement Tom's algorithm to solve a model for Chinese monetary policy. Here, the lending and deposit rates are bouded, since the monetary authority has strict guidelines for the private banking sector. It is not finished yet, but as soon as there is a working paper version, I will post the link and the codes here (approx. march).

You do not have to worry about larger models. The model I am using is already quite large. And the additional computation time depends only on the number of periods the constraint holds.

Best
Michael
Michael Paetz
 
Posts: 12
Joined: Fri Jul 29, 2011 9:03 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby Michael Paetz » Tue Jul 17, 2012 5:34 pm

Finally, Tom and I have a working paper on the algortihm, used for simulations:

http://www.uni-hamburg.de/fachbereiche- ... uality.pdf

We simulated a two-country NKM and the Smets & Wouters(2003) Model using the shadow price method.

I also attached the Code for a sinlge country NKM for IRFs and Simulations, so that everyone can use it. Although the files should be selfexplaining, do not hesitate to contact me, if you experience any problems.

If someone is interested, here are two Papers, using the method for applications apart from monetary policy:

http://www.suomenpankki.fi/bofit_en/tut ... dp1112.pdf

http://www.suomenpankki.fi/bofit_en/tut ... dp1612.pdf

Best
Michael
Attachments
NKM_OneCountry.zip
(9.17 KiB) Downloaded 1336 times
Michael Paetz
 
Posts: 12
Joined: Fri Jul 29, 2011 9:03 pm

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby cup » Mon Sep 24, 2012 10:27 am

Hi

Thank you Tom for sharing the file.

I am having problems with adding a shock to the LZB model. Whenever I run the dynare file I only get the graphs of the IRF from the shocks already in the model. Could you please explain how one could add shocks.
cup
 
Posts: 7
Joined: Tue Sep 18, 2012 7:56 am

Re: The Zero Lower Bound Constraint on Nominal Int. Rate

Postby cfp » Tue Sep 25, 2012 8:43 am

As in standard Dynare... I'm not sure I understand your problem.
cfp
 
Posts: 60
Joined: Mon Mar 15, 2010 9:18 pm

Next

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests