IMHO the way to do this accurately is to offer an option for each share purchase to be setup in a new pot (thinking Monzo Pots) and for that pot/position to then have its own set of calculations to work with.
It would need to be an option because if you are trying to DCA you would not want that feature turned on.
I never realised this happened I don’t sell much but this is interesting as I am interested in my long “real terms” price I pay for my shares. Glad I have a spreadsheet page that doesn’t work on the FIFO principle as it gives a very inaccurate picture of your long term performance on a stock.
For a GIA (correct me if I’m wrong) this is only in the first 30 days. Stocks after that are lumped in one averaged pool with no distinction between when they were bought or sold (a section 104 holding).
I was trying to give a simplified idea of what happens, just a rule of thumb. I think, if I can recall, you mentioned in other posts things may get more complex with the 30 day rule and others. Feel free to fire away
So i have 40 stocks which i hold and had a avg price of around $38.80 ish i then sold 15 shares of at $39.11 however the avg price went up to $44.88 how does that make sense as is there any way i can calculate the new avg price?
I have just noticed that for the calculation of average share price, it takes into account the selling shares too. So even if I buy and sell some shares at the same price, it seems to use the sold shares to average down (which it shouldn’t)