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.83k stars 585 forks source link

Buying and selling the same day lead to infinity TRI #3827

Open amoutiers opened 5 months ago

amoutiers commented 5 months ago

Describe the bug When buying and selling the same day, the TRI calculation lead to an -Infinity% or Infinity%, even with the complete date (with hours)

To Reproduce I've recreate the bug in attached file. bourse.xml.zip

Expected behavior The right TRI

Screenshots Capture d’écran 2024-03-08 à 08 13 49

Desktop (please complete the following information):

Sn1kk3r5 commented 5 months ago

HI,

this is a known behavior. PP is not made for day trading but Buy and Hold. You'll find some examples in the forum, e.g. https://forum.portfolio-performance.info/t/making-sense-of-trades/21179

Cheers