Max function not working?

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.

Max function not working?

Postby Ansgar » Wed Jun 30, 2010 12:24 pm

Hi,
I have a question regarding the max(a,b) function, page 12 of the manual. I wanted to use this function in order to simulate an economy where the central bank is constrained by the zero lower bound. For some reason the max function has no effect at all. The path of the variables is exactly the same as in the absence of the ZLB, and in particular the interest rate becomes negative.
The simulation I used is stochastic and I set order=1. Could it be that the max function is only useful in the deterministic solver, because dynare tries to approximate the max function up to first order?

Here is the toy model which I have used to explore the max function:
Code: Select all
Var y pi i i_t;
varexo e_d;
parameters sigma phipi beta;

beta=0.995;
sigma=1;
phipi=1.5;

model;
y   =   y(+1)-1/sigma*(i-pi(+1))-e_d;
pi  =   beta*pi(+1)+0.3*y;
i_t =   phipi*pi;
i   =   max(-0.005,i_t);
end;

check;

shocks;
var e_d = 0.1^2;
end;

stoch_simul (order=1, irf=10);


I distinguish between a nominal interest rate target i_t and the actual nominal interest rate, and write (all variables are as percentage point deviations from their steady state):
Code: Select all
i_t =   phipi*pi;
i   =   max(-0.005,i_t);

where pi is the inflation rate, phipi is the Taylor rule coefficient on inflation and the steady state interest rate is 0.005.

Many thanks for your help.
Best,
Ansgar
Ansgar Rannenberg
IMK
Tel.: +49/211/7778113
Ansgar
 
Posts: 46
Joined: Tue Jun 26, 2007 11:35 am
Location: Düsseldorf

Re: Max function not working?

Postby StephaneAdjemian » Wed Jun 30, 2010 7:14 pm

Dear Ansgar, It is not possible to simulate a dsge including a ZLB constraint with a pertubation approach because the model is not differentiable everywhere (differentiability is a required assumption for the taylor approximation). With a first order approximation we approximate all the nonlinear functions by linear functions, so your results are expected and there is no bug with the max function here. You have to use the perfect foresight solver.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Max function not working?

Postby Ansgar » Fri Jul 16, 2010 6:59 am

Hi Stephane,
thank you very much for your quick response! I'll do that then.
Best,
Ansgar
Ansgar Rannenberg
IMK
Tel.: +49/211/7778113
Ansgar
 
Posts: 46
Joined: Tue Jun 26, 2007 11:35 am
Location: Düsseldorf


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests