A desk wants to offset the risk of a position with two traded instruments whose gains are correlated with the position and with each other. Which holdings leave the smallest remaining variance, and what happens when the two instruments are nearly or exactly duplicates of each other? This lesson proves that covariance matrices are positive semidefinite, reads directions of risk from eigenvalues, derives the normal equations of the minimum-error hedge from orthogonal projection, and uses the pseudoinverse when the hedge system is singular.
Key terms
Covariance matrix
Definition All expectations on this page are under one fixed probability measure, for example the physical measure . Let be a random vector, such as the gains of instruments over one period, with for every , and let . Its covariance matrix is the matrix
with the expectation taken entry by entry, so that and . The finite second moments make every entry finite, since . Each entry is the expectation of a product of two scalar deviations, which commute, so and is symmetric. This is the population covariance of the model. The sample covariance of observations with mean ,
is an estimate of it and a different object. Its rank is at most , so it is singular whenever .
In plain words The diagonal holds the variance of each instrument, and the off-diagonal entries say how pairs of instruments move together. The matrix is a single object, and its entries cannot be chosen freely, as the next card shows.
Example Two constructed hedge instruments have centered gains with variances and and covariance , in squared currency units, so
and their correlation is . In a different setting, a sample covariance of returns computed from observations has rank at most and is singular, whatever the population covariance is.
Positive semidefinite matrix
Definition A real symmetric matrix is positive semidefinite if for every , and positive definite if for every . Every covariance matrix is positive semidefinite. For fixed weights , the portfolio has the centered value , and
where the middle equality is linearity of expectation applied to the double sum , which is the square of . The matrix is positive definite exactly when no nonzero makes equal to a constant with probability .
In plain words A covariance matrix produces the variance of every portfolio of its instruments, and a variance cannot be negative. Correlations that each lie between and do not guarantee this, because all of them must fit together.
Example Give three instruments unit variances and every pairwise correlation . Each entry is a legal correlation, yet the equal holdings give
so no random vector has this covariance matrix. With three unit variances and one common correlation , the matrix is positive semidefinite exactly when , so three instruments cannot all be strongly negatively correlated with one another.
Eigenvalues, eigenvectors and the spectral theorem
Definition A number is an eigenvalue of a square matrix , with eigenvector , if . The spectral theorem for real symmetric matrices, stated here without proof, says that a real symmetric matrix has real eigenvalues , listed with multiplicity, and an orthogonal matrix , with , whose columns are corresponding unit eigenvectors, so that
Then for every ,
so is positive semidefinite exactly when every , and positive definite exactly when every . For a covariance matrix, is the variance of the portfolio with holding vector . An eigenvalue means that with probability , a combination that carries no risk in this model. That is a statement about the model’s random vector, not about every source of risk in a real position.
In plain words The eigenvectors of a covariance matrix are perpendicular directions of holdings that do not interact, and each eigenvalue is the variance per unit of squared holding size in its direction. Any portfolio splits into exposures to these directions, and its variance is the sum of the squared exposures weighted by the eigenvalues.
Example For the matrix with rows and , multiplying by gives and multiplying by gives . The eigenvalues are and , with unit eigenvectors and . The holdings have exposures and , so their variance is , and directly . The spread has exposures and , so its variance is , and directly . The spread shows the larger variance only because its holdings are larger. Per unit of squared holding size, its direction carries variance against for the equal-weight direction.
Orthogonal projection
Definition Let and be random variables with mean zero and finite second moments, and use the inner product , which for centered variables is . The hedge span is the set of payoffs with . A payoff in the span is the orthogonal projection of onto the span if the residual is orthogonal to every , that is, for . Then the residual is orthogonal to every payoff in the span, and
because the cross term vanishes. So has the smallest mean squared error among all payoffs in the span, and any other payoff with the same error has , so it equals with probability . A projection always exists, as the pseudoinverse card shows, even when the holdings that produce it are not unique.
In plain words Think of payoffs as vectors whose squared length is their mean square. The best approximation of the target by hedge payoffs is the foot of the perpendicular, and the residual left over is uncorrelated with every hedge instrument. Moving away from the foot adds a second, perpendicular piece of error. This is the same geometry as least squares, with expectations in place of sums over observations.
Example A constructed target has variance , and one hedge gain has variance and covariance with . The payoff leaves the residual , whose covariance with is , so it is the projection. Its error is
Hedging with one unit of instead gives the error , which is plus for , as the identity says.
Minimum-error hedge
Definition Let a target gain and hedge gains be centered with finite second moments, let be the covariance matrix of and let be the vector with entries . A minimum-error hedge is a holding vector that minimizes
where the second line comes from squaring the whole residual and taking expectations term by term. The gradient vanishes exactly at the solutions of the normal equations
Since is differentiable, every minimizer solves them. Conversely, the normal equations say for every , so by the projection card every solution is a minimizer. For any solution the minimum residual variance is . If is invertible, the hedge is unique and equals . Centering removes the means, which are handled separately, and the result concerns this squared-error criterion only.
In plain words The best hedge in the squared-error sense leaves a residual that is uncorrelated with every hedge instrument, because any remaining correlation could be reduced by adjusting a holding. A positive residual variance means that the hedge is optimal for this criterion but does not replicate the target.
Example With the constructed inputs , and the covariance matrix with rows and , the normal equations are and . Doubling the second and subtracting the first gives , so , and then gives . The variance explained is
and the residual variance is . It is positive, so the optimal hedge leaves some risk. The hedge is short the second instrument although that instrument has positive covariance with the target, because the short position cancels part of the first instrument’s variance that the target does not share.
Pseudoinverse
Definition Let be a spectral decomposition of a real symmetric positive semidefinite matrix. Its Moore-Penrose pseudoinverse is
where for and for . It equals when is invertible. For a general matrix it is defined through the singular value decomposition, which is not derived here. If lies in the range of , then solves , the solutions are exactly the vectors with , and is the solution with the smallest Euclidean norm, because it lies in the range and so is orthogonal to every null vector . In a hedge with centered gains , a null vector of has , so with probability . Hence all solutions give the same hedge payoff and the same residual variance, and . The covariance vector of a genuine square-integrable target is therefore orthogonal to the null space, which for a symmetric matrix means that it lies in the range, so the normal equations always have a solution.
In plain words When two instruments are duplicates, only the total holding in them matters, and ordinary inversion fails because infinitely many splits give the same hedge. The pseudoinverse inverts the directions that carry variance, ignores the directions that carry none and picks the split with the smallest holdings. That choice of representation does not lower the residual variance. A small but nonzero eigenvalue is a different problem, because inverting it multiplies any estimation error along its direction by a large factor.
Example Let both hedge gains equal the same centered variable with variance , and let , so every entry of is and . The eigenvalues are , with unit eigenvector , and , with unit eigenvector . Both normal equations reduce to , and
The holdings give the same payoff with norm instead of , and if both leave the residual variance . Now make the instruments nearly duplicates, with unit variances and correlation , so the eigenvalues are and . For the hedge is about . An estimation error that moves to changes it to about , because the error lies along the eigenvector with eigenvalue and is multiplied by . These numbers are constructed.
Check yourself
- Two assets have annual returns with variances and and covariance , in squared decimal units. Find the variance and the volatility of the portfolio with weights and .
Show the answer
The portfolio variance is the quadratic form
The volatility is per year. Forgetting the factor on the covariance term, which appears once for each order of the two assets, would give .
- A target gain has variance . Two hedge gains have variances and , covariance with each other, and covariances and with , and all three are centered. A colleague drops the second instrument because it is uncorrelated with the target. Find the minimum-error hedge with both instruments and compare its residual variance with that of the best hedge using the first instrument alone.
Show the answer
The normal equations are and . The second gives , and then , so and . The explained variance is , and the residual variance is . As a check, the residual has covariance with and with .
With the first instrument alone the hedge is , the explained variance is and the residual variance is . Dropping the second instrument was a mistake. It is uncorrelated with the target but correlated with the first instrument, and the short position in it cancels part of the first instrument’s variance that the target does not share.
- Two hedge gains satisfy , where is centered with variance , and and . Write the normal equations, describe all solutions, and find the pseudoinverse solution and the residual variance. An estimate later reports . What does that tell you?
Show the answer
The covariance matrix has rows and , and because . The normal equations and are the same equation, so the solutions are for every real . The matrix has eigenvalue with unit eigenvector and eigenvalue with unit eigenvector , so
Its squared norm is , smaller than the of the solution . Every solution gives the payoff and the residual variance .
Since exactly, any genuine covariance satisfies . The reported puts outside the range of , and the equations and contradict each other. The inputs are inconsistent with the model. Applying anyway returns the minimum-norm least-squares solution of an inconsistent system, which is not the covariance hedge derived above.