[kmymoney] [Bug 507421] New: Incorrect Annualized Rate of Return in Investment Reports: Based on Report Period Instead of Actual Holding Period and Weighted Average Cost
bugzilla_noreply at kde.org
bugzilla_noreply at kde.org
Thu Jul 24 07:32:16 BST 2025
https://bugs.kde.org/show_bug.cgi?id=507421
Bug ID: 507421
Summary: Incorrect Annualized Rate of Return in Investment
Reports: Based on Report Period Instead of Actual
Holding Period and Weighted Average Cost
Classification: Applications
Product: kmymoney
Version First 5.2.0
Reported In:
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: grave
Priority: NOR
Component: general
Assignee: kmymoney-devel at kde.org
Reporter: origamy.39 at laposte.net
Target Milestone: ---
When generating investment reports (specifically, "Performance des placements
par type PEA avec dividendes" – Note: you might want to adjust this specific
report name if there's an exact English equivalent in KMyMoney), the
"Annualized Rate of Return" column displays incorrect values. The issue appears
to stem from the calculation of this rate, which uses the report's start date
as the basis for annualizing each security, rather than the actual acquisition
date of the respective security. It should take into account each share/unit's
purchase date and its Weighted Average Cost (WAC) for an accurate calculation.
KMyMoney Version: 5.2-4526
Operating System: Ubuntu 25.04
Steps to Reproduce (the bug):
Open KMyMoney and a data file containing investment transactions
(purchases, dividends).
Navigate to the 'Reports' menu -> 'Investment Reports'.
Select a report type such as "Performance des placements par type PEA avec
dividendes" (or its English equivalent).
Define a report period (for example, from 01/01/2023 to 07/23/2025). It is
important that this period includes securities purchased after the report's
start date and/or securities purchased very recently within the report period.
Observe the "Annualized Rate of Return" column.
Observed Behavior:
The "Annualized Rate of Return" is displayed, but the values are distorted and
do not reflect the actual annualized return since the security's purchase date.
Case 1: Securities purchased after the report start date. For securities
acquired after 01/01/2023 (my example report's start date), the rate is
understated because the calculation period is artificially extended beyond the
security's actual holding duration.
Case 2: Securities purchased very recently within the report period. For a
security acquired, for instance, on 07/11/2025 (like a mutual fund in my data)
with a report end date of 07/23/2025, the rate is excessively high and
illogical. This is because the gain over a few days is annualized over a period
of several years (that of the report), instead of its very short actual holding
period.
Case 3: Securities purchased before the report start date (but report
starting after purchase). If the report begins after a security's acquisition,
the rate is annualized from the report's start date and not the acquisition
date. This can also distort the rate (overstated if the period is shortened,
understated if the gain is small over a "shortened" period).
Expected Behavior:
The "Annualized Rate of Return" for each security should be calculated by
taking into account its acquisition date (and its sale date if applicable, or
the report end date if still held) and its Weighted Average Cost (WAC). This
ensures that the return is correctly annualized over the actual holding period
of the security, accurately reflecting its performance.
Attachments:
Please refer to the attached screenshots which illustrate the problem and the
observed values.
Reminder for the form fields:
Product: kmymoney
Component: general (or reports if that's an available option)
Version First Reported In: git (master)
Severity: major
Platform: Other
OS: Linux
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel
mailing list