2

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?

1 Answer 1

3

If you're just interested in the performance of the stock, you can just look at the stock price, and the annualized gain would be:

(30 / 5)^ (1/4) - 1 = 56.5%

Alternately, you could look at the performance of your investment, which takes into account your buys ans sells. A common way to do that is with Internal Rate of Return (IRR). Essentially it asks "at what interest rate could I invest/borrow money to end up with the same total in the end".

The cashflows for the scenario you describe for each year would be:

Year                 0   1   2   3   4
                    --- --- --- --- ---
Inflow (Outflow)    -5  -10  20  0   30

The 5 and 10 are negative to indicate outflows (buys). The 20 is positive to indicate the cash inflow of selling one share. The 30 at the end represents the "terminal value" and is treated as through you sold the stock today for $30 (whether you actually do or not).

If I calculate the IRR of those cashflows in a spreadsheet, I get an annualized return of 67%

Note that in neither case is separating by realized/unrealized gains useful.

The method you use is not wrong, but it does not consider the timing of investments. But, to answer that question, you would annualize it by taking the 4th root (since it's a geometric mean):

((20 + 30) / (5 + 10)) ^ (1/4) - 1  = 35%.

It's inaccurate because it "assumes" that you invested all 15 at the beginning and sold for 50 four years later, when in reality those transactions were done at different times.

1
  • Ah, IRR is the trick. Thank you.
    – NewSites
    Aug 16, 2022 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .