# How to compute the portfolio risk when weights are negative?

In QMiF (p. 239) , the variance of a portfolio is defined as:

V(R) = w'Vw = w'DCDw = x'Cx

Does this formula hold if the weights are negative (i.e., short)?

For example, if I have a 5x5 covariance matrix of various futures contracts and my position is:

n_01: -100
n_02: 230
n_03: -140
n_04: -79
n_05: 290


Can I simply use the formula above and arrive at the portfolio risk if i take the square root of the variance equation above?

• short answer: yes, it does.The covariance matrix should be positive definite, which means $x'Cx > 0$ when $x$ is not the zero vector. Jul 9 '18 at 21:04
• Do I need to transform the positions into weights in any way? Or can I just plug them in as a vector = `[-100, 230, -140, -79, 290]? Jul 9 '18 at 23:17
• you definitely need to scale your positions in some way. What typically makes sense is to express your $x$ as dollarwise proportions (not percents, not shares, not dollars). Jul 9 '18 at 23:52