The formulas

TWR, money-weighted return and average cost basis.

The formulas the Live Tracker uses to compute your real portfolio's metrics, and the model behind the value forecast.

Average cost basis

Weighted mean of purchase prices:

Avg cost=i(qi×pi)iqi\text{Avg cost} = \frac{\sum_{i}(q_i \times p_i)}{\sum_{i} q_i}

Recalculated on every purchase across all units held. On a partial sale, the average cost of remaining units doesn't change.

TWR (Time-Weighted Return)

Pure return, neutral to cash flows:

TWR=i=1n(1+Ri)1\text{TWR} = \prod_{i=1}^{n}(1 + R_i) - 1

The period is split at every cash movement; sub-period returns compound. The result doesn't depend on when you contributed, which is why it's the only metric you can honestly compare to a benchmark or to another investor.

Return %

Gain relative to invested capital:

VcurrentCinvestedCinvested\frac{V_{current} - C_{invested}}{C_{invested}}

This one very much does depend on contribution timing: it's your personal result, not the strategy's performance.

CAGR

Compound annual growth rate:

(VfVi) ⁣1n1\left(\frac{V_f}{V_i}\right)^{\!\frac{1}{n}} - 1

The forecast model

The forecast starts from the portfolio's latest value (NAV) and uses the Value series the Live Tracker has already computed. It therefore combines historical behaviour (drift and volatility) with the contribution rhythm already reflected in that curve, without a separate model of future cash flows.

1. Drift estimate

OLS regression of ln(value) on time in years:

lnV(t)a+μt\ln V(t) \approx a + \mu\, t

At least 2 years of history are needed for the estimate to be meaningful.

2. Volatility estimate

Annual σ derived from the residuals of log returns, with a technical floor that prevents the projection from coming out as a flat line.

3. Simulated trajectory

A single monthly Geometric Brownian Motion path:

dlnV=(μ12σ2)dt+σdtZd\ln V = \bigl(\mu - \tfrac{1}{2}\sigma^{2}\bigr)\,dt + \sigma\sqrt{dt}\,Z

with Gaussian Z and a deterministic seed: the same data always produces the same curve, so the chart doesn't change on every reload.

4. Uncertainty band

lnV±(t)=lnV0+μt±σt\ln V_{\pm}(t) = \ln V_{0} + \mu\, t \pm \sigma\sqrt{t}

The shaded band is the envelope of the deterministic drift, not of the simulated path. The dashed line is just one possible path; the band is where the outcome plausibly falls.

5. Projected invested capital

The yellow line continues past today at the historical net contribution rate, that is (last − first capital) ÷ years of history, or stays flat if no net contributions are found.

Available horizons: 1, 2, 3, 5, 10 or 20 years. This is an educational tool. The past is not the future: it is not financial advice nor a reliable market forecast.