Free lesson · Portfolio construction
Allocate risk, not just capital
Open interactive lessonPractice calculationsExplore labs
Start with the idea
Capital contribution and risk contribution are different. An asset with a small weight may dominate volatility if it is very volatile or strongly aligned with the book. A hedge can have a negative marginal risk contribution.
Symbols, units & horizon
- w: signed capital weights
- Σ: same-horizon covariance matrix
- σ_p: positive portfolio volatility
- (Σw)ᵢ: i-th entry of the covariance-times-weight vector
- MRCᵢ: marginal volatility contribution per unit weight
- RCᵢ: weight times marginal contribution
- Lₜ: exposure multiplier
- L_max: maximum permitted multiplier
- σ_target: desired volatility
- σ̂ₜ: forecast unscaled strategy volatility in matching units
- min: choose the smaller value
When and why to use this
Use marginal risk when evaluating another trade and risk contributions when allocating across sleeves. Apply a capped volatility scale only after estimating the base book’s risk.
Differentiate portfolio volatility
- Let , so σp=√v. The chain rule gives .
- Multiply by wᵢ for RCᵢ. Summing gives , assuming positive volatility.
Equal weights and independent vols .1,.2 give σp=√.0125=.111803. Risk contributions are .022361 and .089443: 20% and 80% of total.
For positive portfolio volatility, Euler risk contributions satisfy . Marginal contribution measures how volatility changes with a small weight increase. A hedge can have a negative contribution. Equal capital weights do not produce equal risk contributions.
Solve for a volatility multiplier
- If the entire risky book is scaled by nonnegative L, variance becomes L²σ² and volatility Lσ. Setting that equal to the target gives .
- Apply the maximum leverage bound by taking the smaller value. This calculation ignores any nonzero covariance of a funding or cash position.
Target 8%, base estimate 12%, cap 1.5 gives L=.6667. An estimate of 4% would suggest L=2, clipped to 1.5.
Volatility targeting scales a base book using an estimate available before trading. Both volatilities must be annualised or both use the same shorter horizon. Apply leverage caps and liquidity limits; a low volatility estimate can otherwise create extreme leverage immediately before a shock.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
import numpy as np # dependency: numpy
def risk_contributions(weights, covariance):
w, cov = np.asarray(weights), np.asarray(covariance)
sigma = float(np.sqrt(w@cov@w))
if sigma <= 0:
raise ValueError("Positive portfolio volatility required")
marginal = cov@w/sigma
return sigma, marginal, w*marginal
def vol_multiplier(target_vol, forecast_vol, max_multiplier):
if forecast_vol <= 0 or min(target_vol,max_multiplier) < 0:
raise ValueError("Positive forecast, nonnegative target and cap required")
return min(max_multiplier, target_vol/forecast_vol)
print(vol_multiplier(.10,.20,2))Continue learning
Portfolio Construction & Factors — all lessons- Separate alpha from compensated exposures
- Optimise under realistic constraints
- Allocate risk, not just capital
- Explain results and marginal diversification
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations