Page 1 of 1

Min max function help

PostPosted: Wed May 27, 2015 9:02 pm
by magonfru
Hello, I am solving a model with occasional constraints using a trick presented by Garcia and Zangwill (1981). Basically it replaces the lagrangian multipliers by max(0,nu) functions where is appropriate. I tried this trick and it seems to work. To recover the values of the original lagrangian multipliers one must set an extra equation as lambda=max(0,nu). This way when nu=0 you would see that lambda takes values of 0. However, this is not happening in my code :( , so I am not sure if the other part of the code is working :?: .
I wanted to know if someone could let me know what's going on
Best Regards
Mario

Re: Min max function help

PostPosted: Thu May 28, 2015 1:55 pm
by jpfeifer
As Dynare reports, you cannot use non-differentiable functions with stoch_simul as Taylor approximations in this case are not well defined. You cannot easily get around the problem with occasionally binding constraints in stochastic simulations.

Re: Min max function help

PostPosted: Mon Jan 18, 2016 5:47 pm
by theta23
A question concerning Garcia-Zangwill trick, what are the applications of it? In which setup is it currently used?

Any information and hints would be highly appreciated!

Re: Min max function help

PostPosted: Tue Jan 19, 2016 9:30 am
by jpfeifer
It is used in cases where i) you need the complementary slackness condition because the constraint is not always binding and ii) the non-differentiability at the kink is honored by the solution technique. This implies that you can only use it in the perfect foresight context where no Taylor approximation is conducted.

Re: Min max function help

PostPosted: Tue Jan 26, 2016 8:12 am
by theta23
But I thought that inequaility constraints can (trivially) be handled also by Matlab routine fmincon. I cannot see the advantage of Garcia Zangwill "trick" and recasting the problem into one with equalities. Or is the reason that with fmincon computational errors are larger/more probable?

Re: Min max function help

PostPosted: Fri Jan 29, 2016 9:33 am
by jpfeifer
Dynare does not use fmincon with its syntax where you can provide various constraints. You need to enter the equations in Dynare syntax and one way to do this is by entering the complementary slackness condition to transform inequalities to equalities.

Re: Min max function help

PostPosted: Fri Jan 29, 2016 6:06 pm
by theta23
Thanks!