Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Possibly incorrect Net Investment value on main page #77

Open
sohamshanbhag opened this issue Oct 8, 2023 · 5 comments
Open

[Bug] Possibly incorrect Net Investment value on main page #77

sohamshanbhag opened this issue Oct 8, 2023 · 5 comments

Comments

@sohamshanbhag
Copy link

Describe your Environment
OS: Ubuntu
Paisa Version: 0.5.4
App Variant: CLI

Describe the bug
Net Investment value on main page seems to be incorrect

To Reproduce
Steps to reproduce the behavior:

  1. Use ledger file in Journal
  2. Open paisa
  3. Check Net Investment value

Expected behavior
Correct value

Screenshots

2023-10-09_04-20-01_screenshot

Journal

2023/10/01 Init
    Assets:Checking                 1000 INR
    Income:Salary:Acme

As can be seen from the journal file, the only transaction is to Assets:Checking, which is not to be considered an investment account. Then, the Net investment value on the opening page shows 1000, but should be 0.

@ananthakumaran
Copy link
Owner

I had a fix ready for this, but realized that would break the Asset > Networth page because the graph assumes Net Investment + Gain = Net Worth. I have to fix both places.

@pashagolub
Copy link

I have also incorrect investment values:

Net worth
116,502.59

Net Investment
125,363.08

Gain / Loss
-8,860.50

XIRR
-4.14

This is somehow connected to the multiple currencies I use. The gain/loss started to grow immediately after the first currency exchange transaction. And I'm still struggling to get the logic behind the numbers

@ananthakumaran
Copy link
Owner

@pashagolub could you share a minimal example? I know about the issue related to the checking account, but yours seems like a different case.

@pashagolub
Copy link

pashagolub commented Nov 3, 2023

Sure, something like this shows the issue:

2022/01/29 Opening Balance
    Assets:Checking:AnotherBank:FirstUser             4,132.67 UAH
    Assets:Checking:AnotherBank:SecondUser               506.00 UAH
    Assets:Checking:UABank:FirstUser               4,263.01 UAH  
    Assets:Checking:Cash                     3,430.00 USD
    Equity:Opening Balances

P 2022/01/29 00:50:00 UAH 0.026 EUR
P 2022/01/29 00:50:00 USD 0.95 EUR


So it seems like it is price related issue. If there are no prices before the opening transaction, the sum of foreign currencies amounts is going under Loss.

Net worth
3,489.94

Net Investment
12,331.68

Gain / Loss
-8,841.74

XIRR
-51.10

My guess is before first price all currencies are equal, meaning 1 EUR = 1 UAH = 1 USD.

@ananthakumaran
Copy link
Owner

ananthakumaran commented Nov 4, 2023

@pashagolub could you try to convert the 00:50:00 to 00:00:00. Paisa doesn't handle non-zero time correctly

Edit: looking into the issue a bit more, since you are specifying the time as 00:50, and the transaction is recorded at 00:00, ledger won't use it (the price is for a future date)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants