Page 1 of 1

Max function not working?

PostPosted: Wed Jun 30, 2010 12:24 pm
by Ansgar
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

Re: Max function not working?

PostPosted: Wed Jun 30, 2010 7:14 pm
by StephaneAdjemian
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.

Re: Max function not working?

PostPosted: Fri Jul 16, 2010 6:59 am
by Ansgar
Hi Stephane,
thank you very much for your quick response! I'll do that then.
Best,
Ansgar