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.78k stars 582 forks source link

Dividends missing in profit calculation for trades #2039

Open pascalhein opened 3 years ago

pascalhein commented 3 years ago

Describe the bug When a security has paid a dividend, that factors into the total performance reported in Performance→Calculation, and also in the individual figures of Performance→Securities. However, in Performance→Trades only capital gains are considered, i.e. a trade may have appear to have a loss even though it was advantageous.

To Reproduce

  1. Create a security
  2. Buy 10 @ EUR 100 on 01.01.2021, Dividend 10 × EUR 10 on 15.01.2021, Sell 10 @ EUR 98 on 01.02.2021
  3. Go to Performance→Trades, see "Profit / Loss: -20"
  4. Go to Performance→Securities, see "Abs. Perf.: 80"

Expected behavior Trade profit should include dividends. In the above example, the trade was obviously a net gain for me, but it appears as though I have lost money on it. And figures should be consistent across all Performance views, i.e. the total performance of a security should be the sum of all its trades. Alternatively, add another column so we can separate "Profit / Loss (incl. Dividends)" from "Capital Gains only".

Screenshots "Securities" is correct: image "Trades" is not: image Tooltip also missing that transaction: image

Desktop (please complete the following information):

chirlu commented 3 years ago

Actually, in my experience (mostly from the forums), users of the Trades views do not want from it what you describe as your expected behaviour.

Personally, I use it almost exclusively for tax planning: How much taxable wins would I make if I sold 10 shares of X? Dividends are irrelevant to this, and I don’t want them included.

When I’m interested in total performance, I look elsewhere.

pascalhein commented 3 years ago

Hi @chirlu,

thanks for the input. Indeed that is a use case I hadn't thought about, I do see the current setting being useful for this.

However, I still feel like "Profit" should include all money made from the position, since otherwise it leads to this - in my opinion - very counterintuitive behaviour where the "trade profit" may be very different from your actual profit. But perhaps it is rather a misnomer of the column? How would you feel about having a column for "Capital Gains" (or maybe just "Unrealized Capital Gains") that is more tailored towards your goal while avoiding the term "Profit"?