Portfolio construction
Markowitz mean-variance optimisation
The original portfolio model: the mix with the best trade-off between expected return and variance for the risk aversion you choose.
The idea in plain words
Every extra point of expected return has to be paid for with risk. Mean-variance optimisation states the price you are willing to pay, the risk aversion λ, and then finds the weights that give the most return after subtracting that price. A low λ chases return; a high λ hugs safety.
How it is calculated
Maximise the expected return minus λ/2 times the variance, with the weights adding up to 1 (long only by default, each weight capped by the maximum weight you set). The optimiser solves it by projected gradient steps. Default λ = 3, a common middle choice.
maximise wᵀμ − (λ ÷ 2) wᵀΣw
subject to Σwᵢ = 1, 0 ≤ wᵢ ≤ w_max
Unconstrained solution: w = (1 ÷ λ) Σ⁻¹μHow to use it
- Use it when you have a view on returns you trust and want a portfolio that reflects it.
- Tune λ under Settings › risk aversion: try 1, 3 and 10 to see how the mix moves along the frontier.
- Cap the maximum weight (e.g. 40%) to stop it from putting everything in one ticker.
Drawing conclusions
- Weights that jump a lot when you change the history by a few months mean the inputs, not the markets, are driving them.
- Tickers that get 0% are not bad; they were simply dominated for these estimates.
Example
Running example (used in every portfolio guide): US500, GER40, gold (XAUUSD) and EURUSD, two years of daily data. Expected returns 8%, 7%, 7% and 1% a year; volatilities 18%, 20%, 15% and 7%. US500 and GER40 move together (correlation about 0.7); gold hardly moves with the indices (about 0.04). With λ = 3 the model holds 47% US500 and 53% gold: 7.5% return at 11.9% volatility. λ = 1 tilts to 60% US500 and 40% gold (7.6%, 12.6%). λ = 10 spreads out: 28% US500, 2% GER40, 36% gold, 34% EURUSD (5.2%, 8.9%). GER40 hardly appears: it adds the same risk as US500 for less return.
The example's inputs are illustrative; the weights and figures are what our optimiser returns for them.
Watch out for
- Very sensitive to expected returns: a 1-point change in one ticker's return can swing its weight by tens of points.
- It tends to concentrate, so out-of-sample results are often worse than they look (see Walk-forward testing).
A little history
Harry Markowitz, "Portfolio Selection", Journal of Finance, 1952; expanded in his 1959 book. For decades it was more admired than used, because of its sensitivity to the inputs; most later models in this list are answers to that problem.
Educational content only. No portfolio model knows the future: every one of them works on estimates from the past, and nothing here is investment advice.