afadil / wealthfolio

A Beautiful Private and Secure Desktop Investment Tracking Application
https://wealthfolio.app
GNU Lesser General Public License v3.0
3.99k stars 189 forks source link

Incorrect Calculation of Investment Income for Different Currency #135

Open Zemtrix1 opened 4 days ago

Zemtrix1 commented 4 days ago

There is an issue in the calculation of investment income when dividends are disbursed in a currency that differs from the General currency. Specifically, when a dividend is paid in USD while the general currency is set to CZK, the dividend amount is presented in USD without being converted to CZK. Consequently, the Investment income reflects a mixture of currencies. In my case, this results in a straightforward subtraction of the CZK and USD values, without considering that USD represents a different currency.

obrazek Expected result in Investment income is 17.85 x 23.1 = 412.335 not just the 17.85

App version: v1.0.18 General currency: CZK

wellmoonloft commented 4 days ago

I have the same problem, so I post it here. I set my base currency to CNY, and I have some USD stocks and some EUR investments. When the EUR investment generates income, it is marked as CNY in my investment income, but the amount is still in EUR, without conversion. I use v1.0.18

image
wellmoonloft commented 4 days ago

You can test it like this

  1. Set the base currency to CNY
  2. Open a USD investment account, such as Interactive Brokers
  3. Buy the stock 1332.T (Japanese Yen) in the USD investment account
  4. You will find the problem Expand it
  5. You can open a EUR account
  6. Then deposit funds into the EUR account
  7. Then add interest to the EUR account Then you will find the error in the investment income, because the base currency is CNY, it should be converted into CNY in the investment income. But it only uses the CNY currency symbol, and the amount is still in Euro or US dollars image