[kmymoney] [Bug 385993] Error in investment interest (Jahresrendite)

Ralf Habacker bugzilla_noreply at kde.org
Fri Nov 9 12:43:04 GMT 2018


https://bugs.kde.org/show_bug.cgi?id=385993

Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |RESOLVED
      Latest Commit|                            |https://commits.kde.org/kmy
                   |                            |money/9f997d09d1b5384fb570d
                   |                            |da87cf798910d6f0901
         Resolution|---                         |FIXED
   Version Fixed In|                            |4.8.3

--- Comment #8 from Ralf Habacker <ralf.habacker at freenet.de> ---
Git commit 9f997d09d1b5384fb570dda87cf798910d6f0901 by Ralf Habacker.
Committed on 09/11/2018 at 12:41.
Pushed by habacker into branch '4.8-staging'.

Corrections for XIRR implementation to achieve more accurate values

Summary:
In the Investment Report, the XIRR() function is used to calculate
the annual return. The previous implementation contains some errors
that have been corrected with this commit. In addition, if XIRR
cannot calculate the annual return to notify the user of this case,
an empty column is displayed in the investment report.

The basis for this fix is an update of the XIRR implementation from
the KOffice project [1], which brings the calculation up to date and
a further improvement from the libreoffice XIRR implementation [2] to
get more solutions using a two-pass approach. The class CashFlowList
has been moved to separate files to have a cleaner separation.

The obsolete and unused NPV function has been removed.

Tests for XIRR have been extended to check for recognized issues.

[1] https://github.com/KDE/koffice/blob/master/kcells/functions/financial.cpp
[2]
https://raw.githubusercontent.com/LibreOffice/core/master/scaddins/source/analysis/financial.cxx
FIXED-IN:4.8.3

Test Plan: compiled and tested on linux

Reviewers: tbaumgart, wojnilowicz

Differential Revision: https://phabricator.kde.org/D16700

M  +1    -0    kmymoney/reports/CMakeLists.txt
A  +162  -0    kmymoney/reports/cashflowlist.cpp     [License: GPL (v2+)]
A  +75   -0    kmymoney/reports/cashflowlist.h     [License: GPL (v2+)]
M  +5    -194  kmymoney/reports/querytable.cpp
M  +0    -87   kmymoney/reports/querytable.h
M  +47   -6    kmymoney/reports/querytabletest.cpp

https://commits.kde.org/kmymoney/9f997d09d1b5384fb570dda87cf798910d6f0901

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list