Three small instruments.
Some of the maths from the markets section, running in your browser so you can push on it. The inputs are made up and say so. Nothing here is market data or advice.
Where the risk comes from
A holding's share of the money and its share of the risk are different numbers. Move the weights and watch them come apart.
- Portfolio volatility
- –
- Weighted-average volatility
- –
- Largest source of risk
- –
Method
- Risk sharewi(Σw)i / wᵀΣw
- Minimum volatilityLong-only, by projected gradient descent onto the simplex
- Risk parityWeights at which every holding supplies the same share of variance
Limits. One fixed covariance matrix, so no estimation error, no fat tails and no correlations that jump in a crash. Minimum volatility ignores expected return completely, which is why it piles into Treasuries.
Assumed correlations
Round numbers chosen to be plausible for each asset class. They are not estimated from price history.
The same mix on the risk/return plane
The red dot is whatever the sliders in fig. 1 say. The line is the efficient frontier: the most return a long-only portfolio can expect at each level of risk, if you believe the inputs.
- Expected return
- –
- Volatility
- –
- Against the frontier
- –
Method
- Objectivemax μᵀw − (λ/2)·wᵀΣw
- ConstraintWeights are non-negative and sum to one, so no shorting and no leverage
- Frontier120 solves, sweeping risk aversion λ across four and a half orders of magnitude
Limits. The expected returns (μ under each name in fig. 1) are assumptions, and they are the input nobody can measure well. Small changes in μ move the frontier portfolios a long way, which is why minimum volatility and risk parity, which need no μ at all, are used in practice.
Things to try
- Load minimum volatility in fig. 1. The dot goes to the left tip of the line.
- Load risk parity. It sits inside the cloud, below the line: it gives up expected return for balance.
- Push crypto up. The dot slides right much faster than it climbs.
Monte Carlo against the closed form
Price a European option by simulation and compare it with Black–Scholes, where the answer is known exactly. It is the cheapest honest test of a simulator.
- Black–Scholes
- –
- Monte Carlo
- –
- Difference
- –
- Delta
- –
Method
- Terminal priceST = S·exp((r − σ²/2)T + σ√T·z)
- ErrorFalls as 1/√n, so ten times the accuracy costs a hundred times the samples
- Antithetic pairsEach sample averages the payoff at z and −z, which cancels part of the noise
Limits. Constant volatility and rate, no dividends, European exercise only. Real option prices show a volatility smile that this model cannot produce. The simulation is here to be checked, not because this payoff needs one.
Things to try
- Drop to 1,000 samples and reseed a few times. The estimate moves around, but the band should still cover the dashed line about 19 times in 20.
- Tick antithetic pairs. The band narrows without adding samples.
- Set the strike to 160. Few paths finish in the money, so the error is large next to the price.
Source: lab.js,
with 16 tests against closed-form answers (node --test test/).
The full version of fig. 1, on real prices, is the Quant Research Terminal described on the home page.