Page 1 of 1

Substitute for signum function

PostPosted: Fri Jul 31, 2015 9:50 am
by sm959
Hi,

I am currently running an IRBC bond economy model and would like to dampen bond trade by taxing the return on bond with (1 + tau). As I want to discourage borrowing and lending, tau should be positive when the bond position is negative (as to increase the interest cost when in debt), but negative when the bond position is positive (so as to reduce the return on savings).

Simply defining tau = 0.01*(-1)*sign(B), where B is the bond position, is not allowed in Dynare and trying something along the lines of tau = 0.01*(-1)*abs(B)/B leads to problems with the derivative as the bond position is zero in steady state.

Do you happen to know of any way to resolve this? All comments are greatly appreciated!

Many thanks,
Sam

Re: Substitute for signum function

PostPosted: Fri Jul 31, 2015 11:06 am
by jpfeifer
Both sign and max/min introduce non-differentiabilities that will not work with perturbation based methods. You would need to define something like a continuous barrier function. See e.g. http://www.robertkollmann.com/KOLLMANN_ ... C_2010.pdf