Two constructed assets have loadings and on one common factor, so part of their returns moves together. How much of a portfolio’s variance comes from the factor and how much from movements specific to each asset, and what goes wrong when the covariance matrix has to be estimated from few observations of many assets? This lesson builds covariance from a factor model, proves that sample and shrunk covariance matrices are positive semidefinite, and derives principal components as the maximizers of the Rayleigh quotient, keeping track of what each method assumes.
Key terms
Factor model
Definition Let be one-period asset returns with finite second moments, mean and covariance , under one fixed measure such as the physical measure . A linear factor model with factors writes
where is a centered factor vector with covariance , is a centered residual vector with covariance , and , the zero matrix. The matrix holds the factor loadings, and is the sensitivity of asset to factor . Expanding the covariance of the sum, the two cross terms vanish by assumption, so
If is invertible, then , so is the matrix of population regression coefficients of the returns on the factors, and with one factor the loading of asset is . Conversely, defining by this formula makes automatically. Loadings and factors are identified only together. For any invertible matrix , the loadings and the factors , with covariance , give the same returns and the same , so a normalization, such as or a factor that is a traded return with its own scale, has to be fixed before a loading has a size. For a portfolio the factor exposure is , and
In plain words Each return is a common part, driven by a few factors through its loadings, plus a part of its own. Covariance between two assets then comes from the factors they share and from whatever dependence their residuals still carry. Doubling a factor and halving every loading on it describes exactly the same returns, so a loading means something only relative to a stated factor scale.
Example One factor with variance , loadings and uncorrelated residuals with variances and , all constructed, give
The portfolio has factor exposure , factor variance and residual variance . The total equals , and the factor accounts for of it. The structure also saves parameters. For assets a full covariance matrix has distinct entries, while factors with a diagonal need numbers.
Residual covariance
Definition In a factor model the residual covariance is , the part of that the factors do not explain. It is a covariance matrix, hence symmetric and positive semidefinite, so is positive semidefinite, and it is positive definite whenever is. A strict factor model assumes that is diagonal, which means the residuals of different assets are uncorrelated. That is an additional assumption. Regression on the factors makes each residual uncorrelated with the factors, but it does not make the residuals uncorrelated with each other, and a common factor missing from appears as off-diagonal entries of . A proposed nondiagonal must itself be positive semidefinite, which for two assets means nonnegative diagonal entries and .
In plain words The residual covariance is where the model admits what its factors miss. Making it diagonal is a claim that nothing common is left, and if that claim is wrong, portfolios exposed to the forgotten common movement carry more risk than the model reports.
Example Keep the factor and the residual variances of the previous example, but let the residuals have covariance , a residual correlation of . The new has positive diagonal entries and determinant , so it is positive definite. The off-diagonal entry of rises from to , and the variance of rises by to , although its factor part is still .
Sample covariance matrix
Definition Given observations of the return vector, with and sample mean , the sample covariance matrix is
It is an estimate computed from data and a different object from the population covariance . For independent, identically distributed observations with finite second moments, . It is positive semidefinite, because for every the projected deviations give
The centered vectors sum to zero, so they span a subspace of dimension at most , and . When the matrix is singular, and any nonzero orthogonal to every centered observation is a position with zero sample variance. The bound is only an upper bound, and data that vary in fewer directions give a smaller rank. Even when is invertible, its extreme eigenvalues are biased outward. The largest eigenvalue of a symmetric matrix is a convex function of the matrix and the smallest is concave, so Jensen’s inequality and give
In plain words A sample covariance can never produce a negative variance, because it is built from squared deviations. It can produce a zero variance, for a position that happened to cancel in every observation, and its smallest eigenvalue is too small on average, markedly so when there are few observations per asset. An optimizer that inverts it is drawn toward exactly the directions whose risk the sample understates.
Example Two observations of two assets, and , have mean and centered values and . With ,
which has determinant and rank . The vector is orthogonal to both centered observations, so the budget portfolio has zero sample variance. In a simulation with five independent assets of variance and normal observations per sample, the smallest sample eigenvalue averaged about and the largest about over samples, while every population eigenvalue is .
Covariance shrinkage
Definition Let be a sample covariance and a symmetric positive semidefinite target, for example the diagonal of , a multiple of the identity or a factor-model covariance. The shrinkage estimator with intensity is
Its quadratic form is a convex combination of two nonnegative numbers, so is positive semidefinite. If is positive definite and , then for every , so is positive definite and invertible however singular is, with smallest eigenvalue at least . With the diagonal target the variances stay as they are and every covariance is multiplied by . Shrinkage trades estimation variance for bias. For a target that does not depend on the data and an unbiased with finite expected squared error, the cross term has mean zero and
where is the Frobenius norm. Its derivative at is , so a small positive intensity lowers the expected error whenever has any. The best intensity depends on the unknown . Estimating it from the data, for example by the Ledoit-Wolf method with its own target and assumptions, is a statistical result that is only referred to here, and an intensity supplied for an illustration is not an optimal estimate.
In plain words Shrinkage pulls a noisy estimate part of the way toward a simpler structure. It cannot create a negative variance, and with a positive definite target it removes the zero variances, so the inverse exists. Whether the result predicts future covariance better depends on the target and the intensity, which is a statistical question separate from this algebra.
Example Treat the factor-model matrix of the first card as if it were an estimate and shrink it by toward its diagonal. The variances and stay, and the covariance becomes . The variance of falls from to
while the variance of the long-short portfolio rises from to . With two assets and a positive covariance, shrinking toward the diagonal lowers the variance of portfolios whose weights have the same sign and raises it for weights of opposite sign. The eigenvalues move from about and to about and , so the smallest one grows.
Rayleigh quotient
Definition For a real symmetric matrix and a vector , the Rayleigh quotient is
which does not change when is multiplied by a nonzero number. By the spectral theorem, has an orthonormal basis of eigenvectors with eigenvalues . Writing gives
a weighted average of the eigenvalues with weights . Hence , with the maximum attained at and the minimum at . In particular the maximum of subject to is . The Lagrange condition of that problem, , holds at every unit eigenvector, so it only lists the candidates, and the weighted average shows which candidate is the maximum. Restricting to be orthogonal to removes their coefficients, and the same argument gives the maximum , attained at .
In plain words For a covariance matrix, the Rayleigh quotient is the variance of the position per unit of its squared length. No direction carries more variance per unit of squared length than the top eigenvector, and none carries less than the bottom one. The normalization fixes the length of a holding vector, and it is not the budget constraint . With a positive definite , and shorts allowed, budget portfolios can have arbitrarily large variance.
Example For the factor-model matrix with rows and , the trace is and the determinant is , so the eigenvalues are the roots of , about and . The Rayleigh quotients of , and are , and , all between the two eigenvalues. The top unit eigenvector is about .
Principal components
Definition Let be centered returns whose covariance has orthonormal eigenvectors and eigenvalues . The th principal component is the scalar , with loading vector . By the Rayleigh quotient card, maximizes over unit vectors, and each maximizes it over unit vectors orthogonal to . The components are uncorrelated, since is for and otherwise, and their variances add up to the total variance, . Keeping the first components splits
which is a factor model with uncorrelated factors of variances , residuals uncorrelated with them, and a residual covariance equal to the second sum, which is not diagonal in general. When , the explained-variance ratio of the first components is . Stated without proof, the first sum is a best approximation of by a matrix of rank at most in the Frobenius norm, which is the Eckart-Young theorem. Applied to , the same construction gives sample principal components. The sign of each eigenvector is arbitrary, and when eigenvalues are equal or close the directions are not determined or are unstable under small changes in the data. Principal components of the correlation matrix solve a different problem from those of the covariance matrix, because standardizing each return to unit variance changes the quadratic form.
In plain words Principal components are an orthogonal change of coordinates for the returns, into uncorrelated directions ordered by variance. When the first few carry most of the total variance, they make convenient statistical factors. They are directions of variance, not economic causes, and a portfolio orthogonal to the kept directions still has the discarded variance, which a model that drops the residual reports as zero.
Example For the factor-model matrix, the first component has variance about , so it explains about percent of the total, and its loading vector, about , tilts toward the more volatile second asset. The unit vector has variance about , but a model that keeps only the first component assigns it variance zero. The correlation of the two assets is . Principal components of the correlation matrix have the directions and for any nonzero correlation of two assets, here with eigenvalues , so the first one explains percent of the standardized total.
Check yourself
- One factor has variance , two assets have loadings and on it, and their residuals are uncorrelated with variances and . Find the covariance matrix and split the variance of the equal-weight portfolio into its factor and residual parts.
Show the answer
The factor part of the covariance matrix is , with entries , and . Adding the residual variances on the diagonal gives
The portfolio has factor exposure , factor variance and residual variance , so its variance is , of which the factor accounts for about percent. The full quadratic form agrees, since .
- Three observations of two assets are , and . There are more observations than assets. Is the sample covariance matrix invertible? Shrink it by toward its diagonal and compare the variance of the portfolio before and after.
Show the answer
The sample mean is , and the centered observations are , and . Dividing the sum of their outer products by gives
whose determinant is . The rank is , below the bound , because all centered observations lie on one line. The vector is orthogonal to them, so the portfolio has sample variance . Having more observations than assets is necessary for invertibility but not sufficient.
Shrinking toward the diagonal keeps the variances and multiplies the covariance by , giving . The determinant becomes with positive diagonal entries, so the shrunk matrix is positive definite, as the target is positive definite and . The portfolio variance becomes . If one asset had zero sample variance, the diagonal target would be singular too and this guarantee would be lost.
- A covariance matrix has rows and . Find its principal components and the share of variance explained by the first, check that the Rayleigh quotient of lies between the eigenvalues, and find the variance that a one-component model assigns to the spread together with its true variance.
Show the answer
Multiplying the matrix by gives and by gives , so the eigenvalues are and with unit eigenvectors and . The trace is , and the first component explains percent of it. For ,
and , so the Rayleigh quotient is , between and . The one-component model is , and the spread is orthogonal to , so the model assigns it variance . Its true variance is , which the discarded term recovers exactly. Dropping the residual of a principal-component model makes this spread look riskless.