Bug 419842 - Currency update error for USD > HUF
Summary: Currency update error for USD > HUF
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.8
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-08 13:48 UTC by Berci
Modified: 2020-04-26 08:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshots (294.20 KB, image/png)
2020-04-08 13:48 UTC, Berci
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Berci 2020-04-08 13:48:09 UTC
Created attachment 127388 [details]
screenshots

SUMMARY
Currency update error for USD > HUF

STEPS TO REPRODUCE
1. Open Update Stock and Currency Prices
2. Select ID's HUF > USD and USD > HUF
3. Set From and To dates to 2020-03-31
4. Click Update Selected

OBSERVED RESULT
The HUF > USD price updated to 0.3058 $ on 2020-03-31. This is correct as the closing price is 0.30588 on Stooq.

The USD > HUF price is updated to 3.2701 HUF on 2020-03-31. This is not correct as the closing price is 326.924 on Stooq. This results in incorrect price in investment reports of stocks denominated in USD. The updated price does not show up in Price Editor dialog (remains 294.1176 on 2020-03-07) but does show up in Update Stock and Currency Prices dialog.

EXPECTED RESULT
USD > HUF price updates correctly to 326.924 HUF. It seems the price is divided by 100 somehow.

SOFTWARE/OS VERSIONS
Windows: Windows 10 Home 1909 (build 18363.720)
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.0
KMyMoney Version: 5.0.80-041529277

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2020-04-08 14:45:34 UTC
This may be caused by the fact, that the Hungarian Forint is denominated in 1/1 for cash and 1/100 for accounts. On the other hand, if I have the equation of

   HUF * price = USD with price = 0.3058

then

   HUF = USD / price

In that sense, 1/0.3058 is 3.270 and 326.924 seems to be wrong.
Comment 2 Berci 2020-04-11 11:43:31 UTC
In this case price 0.3058 is incorrect - which is likely: 1 HUF in USD is 0.003068 USD at 2020-03-31 on fx-rate.net.

Moreover in investment reports is wrong due to this issue, the decrease in stock prices wasn't so bad that the stocks' value is ~400 HUF as in the attached example.

How can this be solved?
Comment 3 Thomas Baumgart 2020-04-11 15:44:49 UTC
Take a look at https://docs.kde.org/stable5/en/extragear-office/kmymoney/details.investments.securities.html There is a section about 'Factor' which might help you. Looks like a 0.01 in your case can do it. But that is more a user question which is better suited on the KDE forum at https://forum.kde.org/viewforum.php?f=69 or the KMyMoney user mailing list at https://mail.kde.org/mailman/listinfo/kmymoney
Comment 4 Bug Janitor Service 2020-04-26 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Berci 2020-04-26 08:48:21 UTC
After experimenting, I think the issue can be this. I set the stocks to be updated from Stooq and it works perfectly for all dates. When updating currency prices for today, KMyMoney uses KMyMoney Currency (fx-rate.net) and it works perfectly. When updating currency prices for dates in the past, KMyMoney uses Stooq Currency and it pulls wrong data.