Time-weighted return (TWR)

Why is it useful and how is it calculated

The time-weighted return measures how well your investments performed, whatever you added or withdrew and whenever you did it.

The obvious measure, what your portfolio is worth against what you put in, is distorted by the timing of your deposits. Add a large amount just before a good month and the simple return makes you look like a genius. Add it just before a bad month and you look terrible. Neither tells you how good your investment choices were.

TWR vs. your actual profit

TWR answers "how good were my investments?", not "how much money did I make?". A 20% TWR doesn't mean you made 20% more money. The more you deposit and withdraw, the further your gain in euros drifts from the TWR. Stonksfolio shows that gain next to it.

How Stonksfolio calculates it

Stonksfolio splits your entire history into daily sub-periods and measures the return of each day on its own. For a given day:

day return = end-of-day value ÷ (start-of-day value + money invested or sold that day)

Adding the day's buys to the denominator keeps money you moved in or out that day out of the performance, so only the change in market value counts. The daily returns are then multiplied together, and TWR is that product minus one:

TWR = (day₁ × day₂ × … × dayₙ) − 1

Multiplying the daily returns, instead of adding them, makes the result compound correctly over time.

An example

Say your €1000 portfolio grows 10% to €1100, and then you deposit €1000 more. It's now worth €2100, but only €100 of that is performance. The rest is your own money. TWR leaves the deposit out and reports 10%, however much you added and whenever you added it.