portfolio-performance / portfolio

Track and evaluate the performance of your investment portfolio across stocks, cryptocurrencies, and other assets.
http://www.portfolio-performance.info
Eclipse Public License 1.0
2.88k stars 597 forks source link

Statement of Assets : add total perf for TTWROR, TTWROR p.a. and IRR #4217

Closed mierin12 closed 1 week ago

mierin12 commented 3 weeks ago

Closes https://github.com/portfolio-performance/portfolio/issues/2570 Hello,

This is a proposition to add the TTWROR cumulated, TTWROR annualized and the IRR to the Statement of Assets totals and subtotals (main category of Taxonomy) lines. I think there were debates about adding those totals for Abs Perf % or Capital Gains %, so those are not added (not defined). I do not know if those argument were also applicable to TTWROR and IRR, I am assuming not.

I have checked some cases with the results from the associated widget, looks ok. Not tested are the "new values" : subtotal per category with a portfolio filter activated (I do not think such values previoulsy existed elsewhere as it requires a "double filter" taxonomy+portfolio).

I have kept two commits to highlight one issue to consider in the review : without the second commit it was not working properly because of java heap space issues. I do not get it anymore with the second commit, but maybe it is still not optimized enough ? Should a LazyPerfomanceIndex methodology be used, as it is done for Security ?

Also, this is showing 0 % for the Without Classification line, which seems wrong. Now that I think of it, Without Classification is never available as a data series. Is performance index defined for it ?

Before Capture d’écran 2024-09-07 230019

After Capture d’écran 2024-09-07 230055

mierin12 commented 3 weeks ago

Also, this is showing 0 % for the Without Classification line, which seems wrong. Now that I think of it, Without Classification is never available as a data series. Is performance index defined for it ?

I did not manage to produce a result for the Without Classification category, so the third commit is making it returns nothing instead of a wrong 0% TTWROR or IRR.

mierin12 commented 3 weeks ago

Hmmm another comment. Maybe I was too naive.

I like the first definition as it stays consistent with the values calculated everywhere else, and can give a quick and very nice overview of Securities Accounts' total performance, as the statement of assets is also used there (statement of assets to be read in this case by row rather than by column : "the last 3 years IRR of total portfolio is, well, the last 3 years IRR of the total portfolio and not the last 3 years IRR of the below lines only") On the other hand, for other columns such as P/L, Abs. Perf., I believe it is the second definition which is used, summing only the securities currently hold.

buchen commented 1 week ago

To be noted that depending on their reporting period, they can include securities no longer in the portfolio and therefore not listed in the Statement of Assets, at least not without using the time machine.

I have a similar issue with the "totals" row in the "Performance -> Securities" view:

Then the user can filter the rows - for example only show instruments where there are current holdings.

However, here I only have "sums" - simple adding of the values.

I like the first definition as it stays consistent with the values calculated everywhere else

I tend agree.

It is also not trivial to calculate the performance using then only the instrument currently still held. We would have to write a special ClientFilter that is stripping all other transitions.

Maybe the right way is to add a tool tip that explains to the user that the calculated performance values is relative to the account and the time interval - and therefore can include the performance of instruments not held anymore.

buchen commented 1 week ago

merged