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

Net investment not calculated on FIFO basis #141

Open
r-chaitanya opened this issue Jan 13, 2024 · 4 comments
Open

Net investment not calculated on FIFO basis #141

r-chaitanya opened this issue Jan 13, 2024 · 4 comments

Comments

@r-chaitanya
Copy link

Graph before withdrawal:
image

Withdrawal:
image

Graph after withdrawal:
image

Net investment goes from 17000 to 9700 after withdrawal of 7300. Instead we should be extinguishing units on FIFO basis and calculate Net investment remaining after that.

Cheers!

Thank you developing this.

@ananthakumaran
Copy link
Owner

Yes, as of today it's just an addition/subtraction on buy/sell. I assumed the net part would make that clear (I understand doing this way would make net investment go negative when you withdraw all money). I will have a look at it again and see if FIFO would make sense. If you have resources that talk about this stuff feel free to share the links here. I also don't know if FIFO could be applied universally. I do apply FIFO on tax harvesting page where the usage is clear.

@r-chaitanya
Copy link
Author

That makes sense. I was trying to reconcile with the Kuvera app.

Mutual funds and stocks can have 2-3 prepectives to them - Realised, unrealised, and, total.
It seems like we are looking at "total" aspect in the paisa app, except for the "Balance" amount which is unrealised only.

We can make some changes to labels to align with current industry standards (atleast in India).

For eg, (making these suggestion after looking at few bank apps and broker apps)

  1. "Balance" could become >> "Current Value" or "Market Value"
  2. Adding "Realised + Unrealised" subline for "Gain / Loss"
  3. I couldnt find equivalent term of "Net investment" as used currently in the paisa app. But most apps use some derivative of the word "Invested" to display (average price based on FIFO) x (units or shares). Not sure, but may be calling "Net investment" as "Principle Amount" or "Outstanding principle amount" makes more sense?
  4. In long term, it would be great to have realised, unrealised, and total aspects of equity seperated from each other.

What do you think?

@ananthakumaran
Copy link
Owner

Thanks for the feedback, let me take some time and think through it. Couple of things I have realized so far

  1. Everyone attaches different meanings to words, probably it's better to document it somehow (tooltips or glossary page) and use it consistently. I am using Market Value in assets > balance page, but Balance in other places.

  2. The vocabulary between banking and security investment seems to be different. I am kind of mixing them here and there. I need to use a consistent vocabulary. Bringing in the concept of realized/unrealized would make sense as well. Using FIFO for withdrawal instead of letting net investment go negative might also be better, let me think a bit. Some of the changes like realized/unrealized might make the charts complicated, in general, negative values are hard to visualize when you use an area chart.

@sdhawade
Copy link

I am seeing the same issue when I see XIRR calculated incorrectly where there are multiple buy and sell transactions for the same instrument. Using FIFO the XIRR is very different (as calculated by ZeroDha) vs what paisa shows. For all MF and equity instruments FIFO is the norm atleast in India so this can be an option for all calculations.

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