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

Why IRRCalculation uses price with fees but without taxes for calculation? #4460

Open
pfalcon opened this issue Jan 5, 2025 · 0 comments
Open
Labels

Comments

@pfalcon
Copy link
Contributor

pfalcon commented Jan 5, 2025

Another of the series of "dumb questions" along with #4459 ? Why does IRRCalculation.java has code like:

    public void visit(CurrencyConverter converter, CalculationLineItem.TransactionItem item, PortfolioTransaction t)
    {
        dates.add(t.getDateTime().toLocalDate());
        long taxes = t.getUnitSum(Unit.Type.TAX, converter).getAmount();
        long amount = t.getMonetaryAmount(converter).getAmount();
        switch (t.getType())
        {
            case BUY:
            case DELIVERY_INBOUND:
            case TRANSFER_IN:
                values.add((-amount + taxes) / Values.Amount.divider());

?

There's logic in doing calculation with overheads like fees and taxes - it shows real IRR inside a portfolio. There's logic in doing calculation without any overhead - it shows securitie's own IRR. But what's the logic of excluding specifically taxes but not fees?

All that leads to situation like on screenshot, where IRR for trade shows one percentage, while Security Performance with the same single trade shows different percentage, while Absolute Performance finally shows value matching trade's IRR.

Screenshot

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

No branches or pull requests

1 participant