Bug 100729 - ODDLYIELD function - Constraints: Rate, Price, and Redemption
Summary: ODDLYIELD function - Constraints: Rate, Price, and Redemption
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-01 14:00 UTC by raal
Modified: 2016-10-25 18:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description raal 2016-07-01 14:00:43 UTC
ODF definition:
ODDLYIELD
Summary: Compute the yield of a security which has an irregular last interest date.
Syntax: ODDLYIELD( DateParam Settlement ; DateParam Maturity ; DateParam Last ; Number Rate ; Number Price ; Number Redemption ; Number Frequency [ ; Basis Basis = 0 ] )
Returns: Number
Constraints: Rate, Price, and Redemption should be greater than 0.

=ODDLYIELD("1999-04-20","1999-06-15", "1998-10-15", 0.0375, 99.875, -100,2,0)
=ODDLYIELD("1999-04-20","1999-06-15", "1998-10-15", , 99.875, 100,2,0)
should be error, Constraints: Rate, Price, and Redemption should be greater than 0.
Comment 1 Joel Madero 2016-07-03 16:04:29 UTC
Version: 5.1.2.2
Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f
CPU Threads: 2; OS Version: Windows 6.2; UI Render: default; 
Locale: en-US (en_US)

Confirmed.

Minor - not going to prevent high quality work
Low - seems appropriate.

Office 2013 shows an error with these formulas.

Perhaps Markus has ideas on this - I suspect not a hard fix.
Comment 2 Eike Rathke 2016-07-04 17:53:21 UTC
I'm not sure about this one. While Excel and Gnumeric return #NUM! for
=ODDLYIELD("1999-04-20","1999-06-15", "1998-10-15", 0.0375, 99.875, -100,2,0)
Excel returns #N/A for
=ODDLYIELD("1999-04-20","1999-06-15", "1998-10-15", , 99.875, 100,2,0)
but a value for
=ODDLYIELD("1999-04-20","1999-06-15", "1998-10-15", 0, 99.875, 100,2,0)
Gnumeric returns a value also for
=ODDLYIELD("1999-04-20","1999-06-15", "1998-10-15", , 99.875, 100,2,0)
Comment 3 Commit Notification 2016-07-12 12:17:41 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=897049ef655d09f477c4c766221a5b1b42087d63

tdf#100729 ODDLYIELD : apply constraints in compliance with ODFF1.2

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.