# Residual Covariance Matrix, and MVO for Residual Variance and Alpha

My overall goal is to find an efficient frontier using QP in terms of $\alpha$ and residual variance ($\omega^2$) for a portfolio $P$ given a benchmark $B$.

We know the equation for residual variance is (excuse my bad latex skills):

$\omega_P^2 = \sigma^2_P - \beta^2\sigma^2_B$

Using an n X n covariance matrix $\Sigma$, a weight vector $\bar{w}$, a beta vector $\bar{\beta}$ made of each portfolio holding's beta compared to the benchmark, and a scalar $\sigma^2_B$ which is the calculated variance of the benchmark, we can derive a QP compatible objective function:

$\omega_P^2 = \bar{w}^T_P(\Sigma_P - \sigma^2_B\bar{\beta}\bar{\beta}^T)\bar{w}_P$

So in the Quadratic Programming Framework, given the above, a vector of alphas ($\bar{\alpha_P}$), a risk aversion parameter ($\lambda$):

$\min_\limits{\bar{w}_P} \frac{1}{2}\lambda\bar{w}^T_P(\Sigma_P - \sigma^2_B\bar{\beta}\bar{\beta}^T)\bar{w}_P - \bar{w}^T_P\bar{\alpha_P}$

subject to:

$A\bar{w}_P = b$

$G\bar{w}_P \le h$

Where $A$ is a vector of ones, and $b$ is 1 (sum of weights must equal 1) and G and h define min and max weights for each holding.

I know that my constraints are valid, as if I change this to be a typical MVO (replace $\Sigma_P - \sigma^2_B\bar{\beta}\bar{\beta}^T$ with $\Sigma_P$) the QP optimizer returns optimized portfolios with the proper bounds on weights.

The problem however, seems to be that the resulting matrix (residual covariance?) $\Sigma_P - \sigma^2_B\bar{\beta}\bar{\beta}^T$ is not positive definite (though it is symmetrical), and thus the QP solvers fail. In other words, my residual covariance matrix can yield portfolios with negative residual variance. I am still wrapping my head around what a negative residual variance would mean (and perhaps this is a sign that something is awry). Any thoughts on how to progress (or where I've gone wrong) would be greatly appreciated.

• You may add some details on the objective function, and any constraints. – Gordon Jun 17 '15 at 15:12
• @Gordon- just added some details. I hope they add some of the needed details (let me know if there is anything else that should be here) – MarkD Jun 17 '15 at 15:40
• You may find some other function to deal with this case. For myself, I would use the singular value decomposition approach, which can be found in "Numerical Recipes in C". – Gordon Jun 17 '15 at 16:56