Say I have a portfolio of stocks, stock A, stock B and stock C, with the below positions:
- stock A: long 100 USD
- stock B: long 50 USD
- stock C: short 200 USD
How do I calculate the portfolio variance given the covariance matrix?
I guess this question boils down to: how do I obtain the weights for each stock?
If I divide the value of each position by the net portfolio value (-50 USD) so that the weights sum to 1 then I get [-2, -1, 4] which makes no sense since I now have negative weights for long positions and positive weights for short positions.
If I introduce a 4th asset, a risk-less cash component, of which I am long 51 USD then I have weights [100, 50, -200, 51]. Great, the weights sum to 1 and are the correct sign, however [10, 5, -20, 6] would be an equally valid weights vector but would give a completely difference variance when multiplied out with the covariance matrix.
So what's the correct way to obtain the weights for each asset in this portfolio and thus what's the correct way to calculate the portfolio variance?