Sub topic 6
Money-weighted return and your own timing
This chapter assumes you can compute a time-weighted return (TWR) by linking sub-period returns, and that you know what a discount rate is. It builds on the previous chapter, where cash flows were removed from the measurement on purpose. Here they go back in, because they are part of what you experienced as an investor.
What a money-weighted return measures
A money-weighted return (MWR) is the single rate of return that makes the present value of all your cash flows equal zero. In practice it is the internal rate of return (IRR) of your account. It answers this question: given when I put money in and took money out, what growth rate did my dollars earn?
Time-weighted return asks a different question: how did the investments perform, regardless of when money arrived? That is the right question for judging a manager, because the manager does not control your deposits. MWR is the right question for judging you, because you control them.
The equation, with flows at times t_i (deposits negative, withdrawals and the final value positive), is:
sum( CF_i / (1 + r) ** t_i ) = 0The starting value counts as a deposit at time zero. The ending value counts as a withdrawal at the end. There is rarely a closed-form solution, so software finds r numerically.
A worked example
Use the same account as in the time-weighted chapter. You start with 1000. The account grows 10% to 1100. You deposit another 1000, making 2100. It then falls 10% to 1890.
- TWR: 1.10 × 0.90 − 1 = −1%.
- You put in 2000 and ended with 1890, so you lost 110.
Treat each sub-period as one time step. The flows are −1000 at t=0, −1000 at t=1 and +1890 at t=2. Let x = 1 / (1 + r). Then 1890x² − 1000x − 1000 = 0, which gives x ≈ 1.0386 and r ≈ −3.7% per period.
The manager's return was only −1% over two periods. Your return was about −3.7% per period, because the larger deposit sat in the account during the loss.
Same manager, different investors
The table compares two investors who both hold the same fund and see the same TWR of −1%. Only the deposit timing differs.
| Investor | Sequence | TWR | MWR per period | Money result |
|---|---|---|---|---|
| A: deposits before the loss | +10%, deposit 1000, −10% | −1% | about −3.7% | −110 |
| B: deposits after the loss | −10%, deposit 1000, +10% | −1% | about +3.0% | +90 |
Investor B ends at 2090 on 2000 contributed. The fund's performance is identical, so the whole gap comes from timing. Timing is not always skill. It can also be luck, or a behavioral pattern such as adding money after rallies.
Computing it in code
The function below solves the IRR with bisection, so it needs only the standard library. It uses actual dates and an actual/365 day count, which is the convention behind spreadsheet XIRR functions.
from datetime import date
def npv(rate, flows):
"""Present value of (date, amount) flows, discounted to the first date."""
t0 = flows[0][0]
return sum(cf / (1 + rate) ** ((d - t0).days / 365) for d, cf in flows)
def xirr(flows, lo=-0.99, hi=10.0, tol=1e-10):
"""Annualized money-weighted return by bisection."""
f_lo, f_hi = npv(lo, flows), npv(hi, flows)
if f_lo * f_hi > 0:
raise ValueError("No sign change in the search range; no IRR found.")
mid = (lo + hi) / 2
for _ in range(200):
mid = (lo + hi) / 2
f_mid = npv(mid, flows)
if abs(f_mid) < tol:
return mid
if f_lo * f_mid < 0:
hi = mid
else:
lo, f_lo = mid, f_mid
return mid
# Investor A: invest 1000, add 1000 six months later, end with 1890.
flows = [
(date(2025, 1, 1), -1000.0),
(date(2025, 7, 1), -1000.0),
(date(2026, 1, 1), 1890.0), # ending value treated as a final inflow
]
print(round(xirr(flows), 4)) # about -0.073, an annual rate
print(1890.0 - 2000.0) # -110.0 in currency termsThe annual MWR is about −7.3%, while the TWR over the same year is −1%. The six-month steps here are roughly half a year each, so the −3.7% per half-year figure from above compounds to about −7.3% a year.
Sign conventions
Flows must be signed from the account's point of view. The ending value is the only way to see the money "come back", so it enters as a positive flow. If you sign every number the same way, there is no solution, and the function raises an error.
Choosing between TWR and MWR
A practical rule: report TWR against the benchmark when the question is "did the strategy beat the index?". Report MWR when the question is "did I do well with my own money?".
Comparing MWR with a benchmark fairly
An index return such as +8% is a time-weighted number. Setting your MWR next to it mixes two different measures. There are three common ways to fix this:
- Compare your TWR with the benchmark return. This tests the strategy and ignores your timing.
- Apply your cash flows to the benchmark. Invest each deposit in the index on the day you made it, withdraw on your withdrawal dates, and compute the IRR of that hypothetical account. The difference between your IRR and the benchmark IRR shows what your selection and timing together added.
- Report both and treat the gap between MWR and TWR as the effect of timing.
The Modified Dietz shortcut
When you lack daily valuations, the Modified Dietz method approximates the MWR without iteration:
R = (EMV - BMV - CF) / (BMV + sum(w_i * CF_i))
w_i = (days in period - days since start) / days in periodEMV and BMV are the ending and beginning market values, and CF is the net external flow. Each flow is weighted by the fraction of the period it was invested. For Investor A, the deposit lands at the midpoint, so w = 0.5. That gives (1890 − 1000 − 1000) / (1000 + 0.5 × 1000) = −110 / 1500 = −7.3%. This matches the IRR here. It is an approximation, and it drifts from the true IRR when returns are volatile within the period or flows are large.
Common errors and edge cases
- Annualizing short periods. An IRR over three weeks, annualized, produces huge numbers that mean nothing. Report short-period MWRs as period returns without annualizing.
- Multiple solutions. If flows change sign more than once, for example deposit, withdraw, then deposit again, the equation can have more than one root. Check the result against the money gained or lost. If the signs disagree, suspect the wrong root.
- No solution. If you lost the entire balance, the IRR is −100% or undefined. Bracketing code like the example above will fail loudly instead of returning a wrong number.
- Small starting balances. When the account begins near zero and receives large deposits later, the MWR is dominated by the later flows. The result is accurate but easy to misread.
- Flow timing conventions. Counting a deposit at the start or the end of the day changes the answer, especially in volatile markets. Pick one convention and state it.
- Reinvestment assumption. IRR implicitly assumes interim cash earns the IRR itself. With a large positive or negative rate this overstates how realistic the figure is.
- Missing valuations. Money-weighted return needs only the flows and the ending value. TWR needs a valuation at every flow date. If those are missing, MWR is the more practical figure to compute.
Summary of the key relationships
- If returns are the same in every sub-period, MWR equals TWR. For example, 10% then 10% with a deposit between gives a per-period MWR of exactly 10% and a TWR of 21% over two periods.
- If deposits come before strong returns, MWR is higher than the TWR rate per period.
- If deposits come before weak returns, MWR is lower.
- Withdrawals work in the opposite direction: pulling money out before a decline raises the MWR.
Exercise
You invest 1000 and it grows 20% to 1200. You withdraw 600, leaving 600. It then falls 10% to 540. Compute the time-weighted return over both periods and the money-weighted return per period. Which is higher, and why?
Show answer
TWR = 1.20 × 0.90 − 1 = 8% over the two periods. For the MWR, the flows are −1000 at t=0, +600 at t=1 and +540 at t=2. With x = 1/(1+r), 540x² + 600x − 1000 = 0, so x ≈ 0.9143 and r ≈ 9.4% per period. You also ended with a net gain of 140 (600 + 540 − 1000). The MWR is higher than the TWR average of about 3.9% per period because you withdrew 600 before the 10% decline, so less money was exposed to the loss.