Portfolio Covariance Between Two Weighted Portfolios
Summary
The document explains how to calculate covariance between two portfolios from their asset weights and a covariance matrix. The key is the order and orientation of the vectors: use the first portfolio's weights as a row vector, multiply by the asset covariance matrix, then by the second portfolio's weights as a column vector. The result is a single scalar representing the portfolios' covariance.
The questioner’s repeated values across an array are attributed to omitting the transpose of the first weight vector. The answer gives the dimensional check: a row vector, square covariance matrix, and column vector multiply to a one-cell result. This addresses covariance rather than the full conversion to correlation, which also requires each portfolio’s variance. The document offers no worked numerical example or discussion of how the covariance matrix is estimated.
Key ideas
- Portfolio-to-portfolio covariance is computed by combining both portfolios’ weights with the asset covariance matrix.
- The first portfolio’s weights must be oriented as a row vector and the second portfolio’s weights as a column vector.
- The matrix product produces one scalar, not an array of repeated covariance values.
- Portfolio correlation also requires the variance of each portfolio.
Tags
Full text
# Co-variance of Portfolio A with Portfolio B # Co-variance of Portfolio A with Portfolio B I'm trying to calculate the correlation between two separate portfolios. I've used `A*COV(AB)*B` to calculate the co-variance of each portfolio where: > A = Array of weights of stocks within portfolio 1 B = Array of weights of stocks within portfolio 2 COV(AB) = Co-variance/variance matrix of stocks within either portfolio The result that comes out is an array with 1 row and 5 columns with the same figure in each column (picture below). I'm wondering, is the co-variance of the portfolio the sum of the `1*4` array that I got for the answer, or just one cell in the array? Thanks in advance! ## Answer by Alex C (score 3) https://quant.stackexchange.com/a/43863 If you take $A^T∗COV∗B$ then the result will be 1 x1 ( a scalar). (1xN * NxN * Nx1 = 1x1). I believe you forgot to take the transpose of A. The vector which pre-multiplies COV needs to be a row vector, because in your example it isn't you may be getting this weird result.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.