Bug 156572 - tbillyield() calculation returns incorrect yields for some dates
Summary: tbillyield() calculation returns incorrect yields for some dates
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2023-08-01 20:31 UTC by fwomail
Modified: 2023-08-06 22:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
tbillyield() does not match Excel formula and generates inconsistent numbers (19.48 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-08-01 20:31 UTC, fwomail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fwomail 2023-08-01 20:31:22 UTC
Created attachment 188708 [details]
tbillyield() does not match Excel formula and generates inconsistent numbers

tbillyield() returns inconsistent sometimes incorrect yield values depending on the dates used, even though the number of days are the same.
For example:
settle	        mature	      days	price	tbillyield()	computed
01/17/23	02/28/23	42	99.384	5.3127%	5.3127%
01/24/23	03/07/23	42	99.384	5.0712%	5.3127%
01/31/23	03/14/23	42	99.384	4.9585%	5.3127%
The computed column uses the microsoft formula for tbillyield() is describe in https://support.microsoft.com/en-us/office/tbillyield-function-6d381232-f4b0-4cd5-8e97-45b9c03468ba
tbillyield should produce the same value if the number of days and price
are the same.
Loading the same exact *.ods file into Excel produces correct values for tbillyeild() that matches the same computed values.
So, LibreOffice is computing tbillyield() incorrectly.
I hope other's aren't relying on this financial formula for their decisions.
Comment 1 m_a_riosv 2023-08-02 01:13:33 UTC
Reproducible, same result with Google sheets and Excel, different in calc.
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2a9e83a673300dfe15a3acc66acd560b2a7cae43
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 2 Aron Budea 2023-08-06 22:14:58 UTC
Already in OO 3.3.0.