Objective
Every portfolio construction step (minimum variance, mean–variance, risk parity, risk limits) takes a covariance matrix as input, and none of them can do better than that input. By the end you should be able to explain why the sample covariance matrix fails when (assets) is comparable to (observations), describe what the failure does to an optimiser, and choose between shrinkage, a factor model and an exponentially weighted estimate.
The sample covariance matrix and its limits
With demeaned return vectors ,
Each entry is unbiased, but has free entries estimated from numbers, and its rank is at most . The key ratio is
If (for example 500 stocks and one year of daily data) is singular: some portfolios appear to have zero variance, and does not exist. Even for well below 1, is a poor input to an optimiser, for a reason best seen through its eigenvalues.
Eigenvalue spreading
Suppose the true covariance is the identity: uncorrelated assets with unit variance. Every true eigenvalue is 1. The sample eigenvalues are not. For large and with fixed, the Marchenko–Pastur law says they fill the interval
With and () that is roughly : pure noise produces a "factor" with nearly three times the average variance and directions that look almost riskless. The average eigenvalue is still 1 (the trace is unbiased), so the noise does not change the total variance; it redistributes it, biasing the largest eigenvalues up and the smallest down.
In real data the top few eigenvalues (market, sectors) sit well above the noise edge and are genuine. The bulk inside the Marchenko–Pastur range is mostly indistinguishable from noise. One cleaning method, eigenvalue clipping, keeps the eigenvalues above the upper edge and replaces the rest by their average, preserving the trace.
Why optimisers make it worse
A minimum-variance optimiser computes . Inversion turns the smallest eigenvalues into the largest weights, so the optimiser loads on exactly the directions where is most wrong: the spuriously low-variance ones. The result is a portfolio whose predicted risk is too low and whose realised risk is too high. This is "error maximisation": the optimiser finds the estimation errors.
Worked example
predicted versus realised risk of a sample minimum-variance portfolio
True returns are 100 uncorrelated assets with unit variance, so the true minimum-variance portfolio is equal weight with variance . You estimate from normal observations and build . How do its predicted variance and its true variance compare with ?
Show solutionHide solution
For normal data the answer is known in closed form (the predicted minimum variance follows a scaled chi-squared distribution), and to first order in :
With : the optimiser predicts variance and delivers about . A 300-run simulation gives and .
In volatility terms, the portfolio claims of the true minimum volatility and realises of it. The gap between forecast and outcome is a factor of in variance, with no model error at all, only sampling noise. Naive equal weighting, which ignores the data entirely, would have hit the true minimum exactly.
Shrinkage toward a target
Shrinkage trades a little bias for a large cut in variance. Pick a structured target with few parameters and blend:
Common targets:
- Scaled identity, with . Shrinking toward it keeps the eigenvectors of and pulls every eigenvalue toward the mean: .
- Diagonal, : keeps the variances and multiplies every correlation by .
- Constant correlation: sample variances with every correlation set to the average sample correlation.
- Single-index (market) model: .
Ledoit and Wolf choose to minimise the expected squared (Frobenius) distance between and the true . Ignoring the small correlation between the errors of and , the optimum is
clipped to . The numerator is the estimation noise in ; the denominator is how far sits from the target, which is noise plus genuine misspecification of . Both parts can be estimated from the same data, so is data driven. As grows the noise falls like and : with enough data you trust the sample.
Shrinkage also guarantees good conditioning. If is positive definite and , is positive definite even when is singular, so it can always be inverted.
Worked example
shrinking a noisy correlation
Asset 1 has 10% volatility and asset 2 has 20%. The sample correlation is 0.8, but the true one is 0.5. (a) Find the sample minimum-variance weights and their true volatility. (b) Shrink toward the diagonal target with and repeat. (c) Separately, if the eigenvalues of a sample matrix are 2.665 and 0.135 and you shrink toward the identity with , what happens to the condition number?
Show solutionHide solution
(a) With , and
Under the true () its variance is , a volatility of .
(b) The diagonal target keeps the variances and halves the correlation to , so :
Its true volatility is . The true optimum at is with volatility (since exactly). Shrinkage removed the spurious short and recovered almost all of the lost efficiency.
(c) New eigenvalues are and . The condition number falls from to , so the inverse, and hence the optimiser, is far less sensitive to noise.
Factor-model covariance
A factor model imposes structure instead of blending toward it:
with factors and diagonal specific variances . It is positive definite whenever , needs parameters instead of , and its smallest eigenvalue is at least , which caps the leverage an optimiser can find. In the single-index model, for and .
For example, with , and specific volatilities and : the covariance is , the variances are and (volatilities and ), and the implied correlation is . One market variance, two betas and two specific variances determine every entry.
Structure also guarantees validity. A matrix assembled entry by entry (correlations from different windows, or pairwise over different date ranges) need not be positive semidefinite, and then some portfolio has negative "variance". The equicorrelation matrix shows the constraint: its eigenvalues are and , so assets cannot all have pairwise correlation below . Shrinkage toward a PD target and factor models never have this problem.
The price is bias: correlations not explained by the factors are forced to zero. In practice desks combine the two ideas, using a fundamental or statistical factor model and treating it as the shrinkage target or adding a few residual correlations back.
EWMA covariance
Volatility and correlation change over time, so equal-weighting a long window is stale. The exponentially weighted moving average (RiskMetrics) updates
assuming zero mean daily returns. The weight on an observation days old is , so the effective window is about and the half-life is . RiskMetrics uses for daily data: an effective window of about 17 days and a half-life of about 11 days.
The trade-off is the same as in shrinkage, now across time. A short window reacts to regime changes but is noisy, and an EWMA covariance with an effective window of 17 days is badly conditioned for more than a handful of assets. Common fixes are a longer half-life for correlations than for volatilities, or EWMA on the factor covariance (small) with slower updates for the loadings and specific risks.
Worked example
one EWMA update
With , yesterday's estimates are daily volatilities 1% and 2% and correlation 0.5. Today's returns are and . Update the volatilities and the correlation.
Show solutionHide solution
In units of : , , , and the cross-products of today's returns are , , .
The volatilities become and , and the correlation
A single day on which both assets fell together raised the correlation estimate from 0.5 to 0.58. That responsiveness is the point of EWMA, and also why EWMA correlations jump in sell-offs, exactly when diversification is most needed.
Knowledge check
You compute the sample covariance of 50 truly uncorrelated, unit-variance assets from 200 observations. Roughly what range do the sample eigenvalues cover?
Knowledge check
You shrink a sample covariance matrix toward a scaled identity target. What happens to its eigenvectors and eigenvalues?
Knowledge check
What is the half-life, in days, of an EWMA estimator with ?
Key takeaways
- The sample covariance has rank at most ; with near or above 1 it is singular or nearly so.
- Under pure noise, sample eigenvalues spread over ; optimisers load on the spuriously small ones.
- A sample minimum-variance portfolio predicts about and realises about .
- Shrinkage trades bias for variance, keeps the estimate positive definite, and Ledoit–Wolf picks from the data.
- Factor models impose structure with parameters; EWMA tracks time variation with effective window and half-life .
Practice problems
Finished reading?
Answer the 3 knowledge checks to complete this lesson (0 done).