Bug 119573 - YIELD function shows inconsistent results for basis 3
Summary: YIELD function shows inconsistent results for basis 3
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2018-08-28 20:04 UTC by Stan
Modified: 2023-09-25 03:13 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet showing bug (9.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-08-28 20:04 UTC, Stan
Details
File created with Excel 2010 (10.04 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-08-30 09:10 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stan 2018-08-28 20:04:39 UTC
Created attachment 144524 [details]
spreadsheet showing bug

Using the YIELD function, with basis argument 3 ("Exact number of days in month, year has 365 days"), for the different settlement and maturity dates but with the same number of days inbetween those dates, results in different yield numbers.

They are also different from the output in MS Excel while the two programs agree when the default basis of 0 is used (360 days in the year, 30 days in the month).

Maybe something is going wrong with the dates math.
Comment 1 Julien Nabet 2018-08-29 15:23:34 UTC
On Win7 with LO 6.0.6.2, I confirm the behavior.

0,055482928352414 in column A
0,055402701880945 in column D

In comparison with Excel 2013, I got 0,055362676 for both columns.
Comment 2 Julien Nabet 2018-08-29 15:26:18 UTC
Zdenek: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=1b52171752d5e4f9fc101a8bc15f6feb6599aaa2, thought you might be interested in this one.
Comment 3 Xisco Faulí 2018-08-30 09:07:09 UTC
I get different results compared to comment 1:


0,055482928352414 in column A
0,055402701880945 in column D

in

Version: 6.2.0.0.alpha0+
Build ID: 3bd8316718fdfed454c01a9c4ae6af6beb34437d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

and

Versión: 6.1.0.3
Id. de compilación: efb621ed25068d70781dc026f7e9c5187a4decd1
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group threaded

as well as in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

In Excel 2010 I get:

0,055362676 in Column A
0,055363    in Column D
Comment 4 Xisco Faulí 2018-08-30 09:10:47 UTC
Created attachment 144548 [details]
File created with Excel 2010

However, the problem is not reproduced with a file created in MSO Excel 2010.
In

Version: 6.2.0.0.alpha0+
Build ID: 3bd8316718fdfed454c01a9c4ae6af6beb34437d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

I get

0,055362675668767 in Column A
0,05536           in Column D
Comment 5 Xisco Faulí 2018-08-30 09:12:31 UTC
@Eike, @Winfried, I thought you could be interested in this issue...
Comment 6 Stan 2018-08-31 14:56:54 UTC
By the way, using basis 1 (Exact number of days in months, exact number of days in year) displays different numbers as well for the same number of days in the period, but the difference is much smaller than that for basis 3.
Comment 7 Winfried Donkers 2018-09-23 16:01:15 UTC
I looked into this and I have a problem... with Excel's answers.

The calculations in column A and D both have a frequency value of 2, meaning that twice a year the interest is applied: at the 30 June - 1 July crossing and the 31 December - 1 January crossing.
As the settlement date differs between column A and D, the time from settlement to first coupon date differs too. Consequently, the interest accrued differs and therefore the yield.

As I am not a financial expert, I am not 100% certain of my conclusion, but currently I have confidence in Calc's results of YIELD.
Comment 8 QA Administrators 2019-09-24 03:10:34 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-09-24 04:06:29 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2023-09-25 03:13:51 UTC
Dear Stan,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug