Spectral Risk Attribution
Portfolio risk can be split by holding, which tells you which names carry it, or by eigenvector of the covariance matrix, which tells you which independent sources of market movement carry it. The second decomposition is what reveals that a portfolio of thirty names is really one bet, and it is the only one of the two that can.
What the Eigenvectors Are (PCA, by another name)
A covariance matrix is symmetric and positive semi-definite, so it can always be written as a set of orthogonal directions with a variance attached to each. Those directions, the eigenvectors, are portfolios of the underlying assets whose returns are mutually uncorrelated. The eigenvalues are their variances. Nothing is assumed to produce them; they are a property of the matrix.
In equity data the first eigenvector is nearly always a market mode: every asset loads on it with the same sign, and it absorbs a large share of total variance. Subsequent modes typically separate sectors, or size, or some other axis the universe happens to be spread along. The interpretations are read off the loadings rather than imposed, which is both the strength of the method and its main limitation.
The reason this matters for a portfolio is that holdings are not independent bets. Thirty names that all load on the first mode are one position wearing thirty tickers. Counting holdings, or reading a weight-concentration measure, cannot detect that. Decomposing risk along the eigenvectors makes it unmissable.
Mathematical Formulation
The eigenvalue decomposition
For a covariance matrix over assets, the spectral theorem gives
with orthonormal eigenvectors as columns of and eigenvalues on the diagonal of . The share of total variance explained by mode is , which is what the scree chart plots as bars, with the running cumulative share as the line.
Risk by holding
The familiar decomposition first, since the spectral one is defined against it. Portfolio variance is , and Euler's theorem splits it exactly across holdings:
The marginal contribution is the sensitivity of portfolio variance to holding ; the component contribution is that sensitivity times the holding. FolioLab reports both, plus each holding's share of variance and its contribution expressed in volatility units .
Risk by mode
Project the weight vector onto the eigenbasis. The coordinate is the portfolio's exposure to mode , and because the modes are uncorrelated their variances add with no cross terms at all:
Each term is non-negative, so the mode shares are a genuine partition of risk rather than a set of offsetting numbers. This is the decomposition's central advantage over the by-holding view, where large positive and negative contributions routinely cancel.
The security-mode matrix
The two views join in a single matrix whose entry for security and mode is
Sum a row and you recover that security's variance contribution . Sum a column and you recover that mode's contribution . Sum everything and you get portfolio variance either way. These entries are signed, and the negative ones are the informative cells: a holding that reduces the portfolio's exposure to a particular mode is hedging it, which no by-holding summary will ever show you.
What FolioLab Computes
The decomposition runs once per run on the annualized Ledoit-Wolf shrunk covariance, the same matrix the optimizers consume, so the attribution describes the risk model that actually produced the weights rather than a separately estimated one. The attribution itself is then computed per method, since each method produces a different weight vector over the same modes.
Before decomposition the matrix is symmetrized as and non-finite entries are zeroed, which keeps the symmetric eigensolver in its supported domain. Any eigenvalue that comes back marginally negative from floating-point error is clipped to zero. Modes are sorted by descending eigenvalue and labelled PC1, PC2 and so on.
Every run carries a reconciliation block: the sum of security contributions, the sum of mode contributions, and each one's difference from the directly computed portfolio variance. Both identities are exact in theory, so the residuals are a live check that the numbers on the page are internally consistent rather than a claim you have to take on trust.
The scree chart truncates for readability, stopping at 15 modes or at whatever point cumulative explained variance reaches 99%, whichever comes first, with reference lines at the 50%, 75% and 90% cumulative levels. The underlying payload is not truncated.
How To Read It
| What you see | What it means |
|---|---|
| PC1 explains most of the covariance spectrum | Expected in equities. This is a property of the universe, not of your weights, and on its own it is not a finding. |
| PC1 carries most of your portfolio's variance | The portfolio is a market bet. Diversification across holdings has not produced diversification across risk sources. |
| Risk spread across several modes | Genuinely diversified in the sense that matters: several independent drivers, none dominant. |
| A high-index mode with a meaningful share | Concentration on a low-variance direction, which is often an artefact of an ill-conditioned covariance matrix rather than a deliberate position. Worth checking before trusting. |
The distinction in the first two rows is the one people most often collapse. The eigenvalue share is about the market; the mode variance share is about you. Comparing them is the whole exercise: a portfolio can sit in a universe where PC1 explains 60% of covariance while placing only 15% of its own variance there, and that portfolio has done something real.
Noise in the Eigenvalue Spectrum
Not every mode is a risk factor. Random matrix theory gives the distribution of eigenvalues you would see from pure noise: for a matrix estimated from observations on assets with , the Marchenko-Pastur law places the eigenvalues of an uncorrelated system inside
Laloux and co-authors (1999) showed that for real market data the overwhelming majority of empirical eigenvalues fall inside this band, meaning most of the spectrum is indistinguishable from noise. Only the largest few carry information. The practical reading: trust the leading modes, treat the long tail of small eigenvalues as estimation error, and be sceptical of any story told about PC12.
FolioLab does not filter the spectrum by this bound. The reported eigenvalues are those of the Ledoit-Wolf shrunk covariance, and shrinkage already addresses the same problem by a different route: it pulls the sample eigenvalue spectrum toward a structured target, compressing the noisy small eigenvalues upward and the inflated large one downward. Marchenko-Pastur is the right frame for interpreting the shape of a spectrum here, not a threshold that has been applied to it.
Limitations
- Modes are statistical, not economic. PC2 is whatever direction maximizes remaining variance subject to orthogonality. It may coincide with a sector split, and it may be an accident of the sample. The label PC2 asserts nothing.
- Orthogonality is imposed, not discovered. Real risk drivers are correlated with each other. Forcing independence distributes a genuinely shared driver across several modes.
- Unstable ordering. When two eigenvalues are close, small changes in the estimation window can swap the modes, so PC3 in one run need not be PC3 in the next. Compare spectra across runs with care.
- Sign is arbitrary. An eigenvector and its negation are equally valid, so the sign of a loading, and therefore of a entry, is only meaningful relative to the other entries in the same mode.
- Variance only. The decomposition is built on the second moment. It has nothing to say about tail dependence, and modes that look benign here can still co-move sharply in a crisis.
- One window, one matrix. The whole picture is conditional on the estimation window. Correlations rise in stress, which means the mode structure you are reading is the calm-period one.
References
- Pearson, K. (1901). "On Lines and Planes of Closest Fit to Systems of Points in Space." Philosophical Magazine, 2(11), 559-572. doi:10.1080/14786440109462720.
- Jolliffe, I. T. (2002). Principal Component Analysis (2nd ed.). Springer. doi:10.1007/b98835.
- Marchenko, V. A., & Pastur, L. A. (1967). "Distribution of Eigenvalues for Some Sets of Random Matrices." Mathematics of the USSR-Sbornik, 1(4), 457-483. doi:10.1070/SM1967v001n04ABEH001994.
- Laloux, L., Cizeau, P., Bouchaud, J.-P., & Potters, M. (1999). "Noise Dressing of Financial Correlation Matrices." Physical Review Letters, 83(7), 1467-1470. doi:10.1103/PhysRevLett.83.1467.
- Litterman, R. (1996). "Hot Spots and Hedges." The Journal of Portfolio Management, 23(5), 52-75. doi:10.3905/jpm.1996.052.
- Qian, E. (2006). "On the Financial Interpretation of Risk Contribution: Risk Budgets Do Add Up." Journal of Investment Management, 4(4), 41-51.
Not investment advice. Past performance is not indicative of future results.