[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Updated: (OFFICE-2260) COUPDAYS - Issettlement date a red herring?
[ http://tools.oasis-open.org/issues/browse/OFFICE-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Weir updated OFFICE-2260: --------------------------------- I think the point is that the settlement parameter indicates which coupon period to use. And although most coupon periods are identical, you might have an "odd" period for the first coupon period. > COUPDAYS - Is settlement date a red herring? > -------------------------------------------- > > Key: OFFICE-2260 > URL: http://tools.oasis-open.org/issues/browse/OFFICE-2260 > Project: OASIS Open Document Format for Office Applications (OpenDocument) TC > Issue Type: Bug > Components: OpenFormula > Affects Versions: ODF 1.2 CD 05 > Reporter: Patrick Durusau > Assignee: Robert Weir > Fix For: ODF 1.2 CD 06 > > > I have been puzzling over the difference between COUPDAYS and COUPDAYBS. > COUPDAYBS - Calculates the number of days between the beginning of athe coupon period that contains the settlement date and the settlement date. > COUPDAYS - Calculates the number of days in a coupon period that contains a settlement date. > The syntax is the same and to be honest it took a good deal of looking to uncover the answer (or what I suspect to be the answer). > COUPDAYBS - Calculates the start date of a coupon period (which is independent of the settlement and settlement date) and then determines the number of days from that date to the settlement date. > COUPDAYS - Calculates the number of days in a coupon period, a value that is determined by the basis but *not* by the settlement date. Settlement date is in fact irrelevant to the number of days in a coupon period. > If that is correct, then the syntax and description of COUPDAYS are incorrect and should be changed. > I would recast as follows: > COUPDAYBS - Calculates the number of days from the start of a coupon period and a settlement date. (Semantics: Day count is for the coupon period that contains the settlement date.) > COUPDAYS - Calculates the number of days in a coupon period. > But then I look at COUPDAYBS, test case 1, COUPDAYBS( DATE(1997;11;9); DATE(1999;11;15); 2 ) > OK, so each coupon period is 6 months (frequency of payment, 2), I assume the first coupon period starts on 1997;11;9, so the coupon periods are: > 1997;11;9 - 1998;5;9 > 1998;5;9 - 1998;11;9 > 1998;11;9 - 1999;5;9 > 1999;5;9 - 1999;11;9 > 1999;11;9 - 1999;11;15 > Which I make out to be 6 days. > oops! The correct answer according to test case is 174. > Well, I am almost certainly missing some assumption or semantic but that means the text is as well. (Does this depend upon coupon periods being based on "whole" months as calculated from the basis setting?) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira