I want to find out how to calculate stock average price. I understand how to calculate average when you are buying shares, but I'm not exactly sure how to calculate the average when you sell shares.
Here is an example:
- On day 1 I'm buying 1 share of ABCD for $10. My average is $10 per share.
- On day 2 I'm buying 3 shares of ABCD for $12 each. My average is $11.50 per share (
(10 + 3*12) / 4
) - On day 3 I'm selling shares of 2 ABCD for $15 each. So, what is my average after this transactions?
Before selling, I've got 4 shares of ABCD:
- ABCD bought for $10
- ABCD bought for $12
- ABCD bought for $12
- ABCD bought for $12
I can imagine several ways to calculate average:
- Selling transactions sells the first share that I've bought for $10 and the second one that I've bought for $12. So I'm left with 2 $12 shares and my average is $12.
- Selling transactions sells the last 2 shares that I've bought. So I'm left with one $10 and one $12 share and my average is $11.
- Selling transactions does not affect the average. So after the sell I still have $11.50 average.
Or maybe there is some other algorithm.
So the question is: what is the industry standard for calculating the portfolio average?