Total gain (%) of sold stocks is incorrect
I've bought 300 stocks at $20.80 (total = $6,240); and sold (-300) at $23.60 (total = $7,080).
The total gain was $840, which is correctly indicated in my portfolio.
However, the %Total gain indicated is 6.31% instead of 13.46%. It seems that you are dividing the Total Gain ($840) by the sum of the buying ($6,240) and the selling ($7,080) amounts, while the gain should be relative to the investment amount only ($6,240).
Let me know if the information is unclear of there is a better way to incorporate gains to portfolio.
Thank you.
-
Anonymous commented
If you sell part of your stake to get your initial investment back the cost basis can go negative and cause the Total Chg % value to be wrong.