There are two sources of price gain on a stock holding:
- Realized gain on any part of the holding previously sold
- Unrealized gain on the remaining shares
By "price gain," I mean the gain based just on the change in price, i.e., without considering dividends.
The amount of gain from each of the two sources is:
Realized gain = Proceeds of sale - cost of shares sold
Unrealized gain = Current value of remaining shares - cost of remaining shares
The annualized gain percentage from each of those sources is:
Realized gain % = (((Proceeds of sale - cost of shares sold) / cost of shares sold) / years held) * 100
= (((Proceeds of sale / cost of shares sold) - 1) / years held) * 100
Unrealized gain % = (((Current value of remaining shares - cost of remaining shares) / cost of remaining shares) / years held) * 100
= (((Current value of remaining shares / cost of remaining shares) - 1) / years held) * 100
My question is, how do I calculate the overall annualized price gain percentage? The quotients in each percentage calculation cannot simply be added because the denominators are different.
For example, let's say I bought a share of XYZ Corp. four years ago for $5, a year later (three years ago) bought another one for $10, another year later (two years ago) sold one for $20, and the current price is $30. Then my gain on each source is:
On the share sold: $(20 - 5) = $15
On the remaining share: $(30 - 10) = $20
Total: $35
If I use first in-first out, my annualized gain percentage on each source is:
On the share sold: (((20 / 5) - 1) / 2) * 100 = 150%
On the remaining share: (((30 / 10) - 1) / 3) * 100 = 67%
Overall annualized gain %: ???
If I didn't care about annualizing, the overall gain percentage is:
Overall gain % = (((Proceeds of sale + Current value of remaining shares) - cost of all shares) / cost of all shares) * 100
= (((Proceeds of sale + Current value of remaining shares) / cost of all shares) - 1) * 100
which in my example would give:
Overall gain % = (((20 + 30) / (5 + 10)) - 1) * 100
= 233%
But how do I annualize that?