Lesson 13 of 15

Correlation & Diversification

Correlation & Diversification

Diversification reduces risk — but by how much depends on the correlation structure between assets.

Diversification Ratio

The diversification ratio compares the weighted average volatility of individual assets to the actual portfolio volatility:

DR=iwiσiσpDR = \frac{\sum_i w_i \sigma_i}{\sigma_p}

  • DR = 1: no diversification benefit (all assets perfectly correlated)
  • DR > 1: diversification reduces risk below the weighted average

Effective Number of Assets

The effective number of assets (Herfindahl measure) captures portfolio concentration:

Neff=1iwi2N_{\text{eff}} = \frac{1}{\sum_i w_i^2}

  • N_eff = N for equal weights (maximum diversification)
  • N_eff = 1 for a single concentrated position

Your Task

Implement:

  • diversification_ratio(weights, sigmas, cov) — returns the diversification ratio; cov is a list-of-lists covariance matrix
  • effective_n_assets(weights) — returns the effective number of assets
Python runtime loading...
Loading...
Click "Run" to execute your code.