Risk Parity Weights
Risk Parity
Risk parity portfolios allocate capital so that each asset contributes equally to total portfolio risk.
For the simple case (ignoring correlations), each asset's risk contribution is proportional to w_i × σ_i. Setting these equal:
Two-Asset Risk Parity
For two assets with volatilities σ₁ and σ₂:
This allocates more weight to the less volatile asset.
N-Asset Risk Parity (Inverse Volatility)
For N assets, the inverse volatility weights are:
Risk Parity vs. Minimum Variance
Risk parity and minimum variance are both portfolio construction approaches, but they differ fundamentally:
- Minimum variance minimizes total portfolio variance, which can lead to highly concentrated portfolios (all weight in the lowest-vol asset)
- Risk parity ensures each asset contributes equally to risk, leading to more diversified portfolios
Risk parity ignores expected returns entirely and focuses on balanced risk contribution. Bridgewater's "All Weather" fund popularized this approach.
Verifying Equal Risk Contribution
For inverse-volatility weights, each asset's marginal risk contribution is w_i * σ_i. If risk parity is correct, all these products should be equal:
w_i * sigma_i == w_j * sigma_j for all i, j
Your Task
Implement:
risk_parity_2(s1, s2)— returns a tuple(w1, w2)of risk parity weights for two assets, each rounded to 4 decimal placesrisk_parity_n(sigmas)— returns a list of inverse volatility weights for N assets, each rounded to 4 decimal places