Bug 130823 - LibreOffice CALC TBILLYIELD function returns incorrect interest rate (Too low).
Summary: LibreOffice CALC TBILLYIELD function returns incorrect interest rate (Too low).
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2020-02-20 20:34 UTC by edwardk
Modified: 2021-04-06 03:38 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
THIS FILES USES TBILLYIELD - RUN IN CALC AND EXCEL! NOTE DIFFERENCE (4.76 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-02-20 21:52 UTC, edwardk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description edwardk 2020-02-20 20:34:24 UTC
Description:
LibreOffice CALC TBILLYIELD functions return incorrect interest rate.

Using the following inputs:

TBILLYIELD(Settlement; Maturity; Price)

(02/25/20, 03/24/20, 99.8775) returns .014718 SHOULD RETURN .01577

as verified with MS EXCEL









Steps to Reproduce:
1.TBILLYIELD(Settlement; Maturity; Price)
(02/25/20, 03/24/20, 99.8775) 
2.
3.

Actual Results:
returns .014718

Expected Results:
SHOULD RETURN .01577

as verified with MS EXCEL


Reproducible: Always


User Profile Reset: No



Additional Info:
SHOULD RETURN .01577

as verified with MS EXCEL
Comment 1 m_a_riosv 2020-02-20 21:43:42 UTC
please attach a sample file for test.
Comment 2 edwardk 2020-02-20 21:52:11 UTC
Created attachment 158065 [details]
THIS FILES USES TBILLYIELD - RUN IN CALC AND EXCEL! NOTE DIFFERENCE

THIS FILES USES TBILLYIELD - RUN IN CALC AND EXCEL! NOTE DIFFERENCE
Comment 3 edwardk 2020-02-20 21:55:09 UTC
RUN ATTACHED FILE IN BOTH EXCEL AND CALC NOTE DIFFERENCE!
Comment 4 QA Administrators 2020-02-21 02:50:54 UTC Comment hidden (obsolete)
Comment 5 Roman Kuznetsov 2020-02-22 19:49:52 UTC
Edward, please write here info from LibreOffice's Help-About dialog
Comment 6 Karl 2020-03-08 11:03:48 UTC
hi,

have opend the attachement and confirm the same result .014718

Version: 6.4.1.2 (x64)
Build-ID: 4d224e95b98b138af42a64d84056446d09082932
CPU-Threads: 4; BS: Windows 10.0 Build 18363; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL

regards
Comment 7 QA Administrators 2020-09-05 04:04:58 UTC Comment hidden (obsolete)
Comment 8 edwardk 2020-09-05 15:15:51 UTC
Dear Sirs,

I have provided ALL info necessary to reproduce this bug in the original submission. The function

TBILLYIELD functions return incorrect interest rate.

Using the following inputs:

TBILLYIELD(Settlement; Maturity; Price)

(02/25/20, 03/24/20, 99.8775) returns .014718 SHOULD RETURN .01577

as verified with MS EXCEL


COMPARE THE RESULT OF CALC TBILLYIELD WITH THE MICROSOFT OFFICE EXCEL VERSION!

SEE COMMENT BELOW THE RESULT .014718 IS INCORRECT! This should be a simple fix!
Comment 9 himajin100000 2020-09-05 16:05:59 UTC
https://opengrok.libreoffice.org/xref/core/scaddins/source/analysis/financial.cxx?r=3bf3face#381

(100 / 99.8775 - 99.8775 / 99.8775) * 360 / x = 0.014718
=>
x = (100 / 99.8775 - 99.8775 / 99.8775) * 360 / 0.014718 = 30

https://support.microsoft.com/en-us/office/tbillyield-function-6d381232-f4b0-4cd5-8e97-45b9c03468ba?ui=en-us&rs=en-us&ad=us

(100-99.8775)/99.8775 * 360 / ( DATE(2020,3,24) - DATE(2020,2,25))
= 0.0157693174138322

February has only 28 or 29 days
I'm not familiar with finance, and I don't know which result is expected.
Comment 11 QA Administrators 2021-03-06 03:45:56 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2021-04-06 03:38:37 UTC
Dear edwardk,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp