Re: Small cleanup in fn-financial.c



Andreas J. Guelzow wrote:-

May I propose the following:

For COUPNCD : when called with up to 4 arguments we try to get the same 
answers as XL, even when its answers are nonsense (which I believe they are)

ie
COUPNCD ("10/8/2001", "11/29/2002", 4, 0) == 11/28/2001
COUPNCD ("10/8/2001", "12/29/2002", 4, 0) == 12/29/2002

I guess, though my initial thought was to get the answers right.  I
can see why it's nice to be bug-compatible though, and it's not as if
anyone who is using them in anger is expecting right answers!

when called with a fifth argument (oem, specifying whether to hadle last 
of month maturity dates special) we can't be XL compatible anyways and 
we calculate the correct date, ie:

Could you s/oem/eom/ if it's a typo (I used it when I explained it to
you to mean end-of-month; people in the market tend to say "roll EOM"
or something like that.)

Thanks,

Neil.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]