For TWRR the amount of money in each stock doesn’t matter. I find it easiest to take the price of one stock for each period. You’ll need both the price at the end of the period as well at the beginning and any dividends paid during the period. (Find the HPR for each period)
example: stock X is worth $10 at the beginning of the year, pays dividends of $1 and is sold for $15 at the end of the year. In year 2, I buy another share of stock x for $15 (the price at the beginning of the year would be the same as the price at the end of the previous period). It pays another $1 dividend and then is sold for $17 at the end of year 2.
HPR for period 1 = (15-10+1)/10
=0.6%
HPR for period 2 = (17-15+1)/15
=0.20%
The TWRR is the geometric mean of these HPR’s.
TWRR = (Sqrt(1+0.006)(1+0.002)) -1
=0.4%
SOMEONE CORRECT ME IF I’M WRONG. I NEED TO BE CORRECTED HERE SO I DON’T GET THIS WRONG ON JUNE 4