Re: Small cleanup in fn-financial.c
- From: "Andreas J. Guelzow" <aguelzow taliesin ca>
- To: Jody Goldberg <jody gnome org>
- Cc: Neil Booth <neil daikokuya demon co uk>, gnumeric-list gnome org, Morten Welinder <terra diku dk>, Jukka-Pekka Iivonen <jiivonen cs hut fi>
- Subject: Re: Small cleanup in fn-financial.c
- Date: Mon, 14 Jan 2002 18:49:03 -0700
Jody Goldberg wrote:
I don't think there's much point trying to fluff the functions up too
much; despite their attempts to appear otherwise they are really
U.S.-specific, and a proper bond analytics implementation would not
have an exposed interface anything like what Excel has.
It is true that XL's interface to fixed income analytics has very
little real use. However, to me that suggests that we make the XL
functions a compatible as possible, and work in parallel on a more
useful set of routines.
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
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:
ie
COUPNCD ("10/8/2001", "11/29/2002", 4, 0, TRUE) == 11/29/2001
COUPNCD ("10/8/2001", "12/29/2002", 4, 0, TRUE) == 12/29/2002
and similarly for the other functions.
Andreas
--
Prof. Dr. Andreas J. Guelzow
http://www.math.concordia.ab.ca/aguelzow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]