Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How I can solve the following Quadratic Programming Problem:


In this case, X is a list of coefficient to be solved for, V is a square matrix of Price returns, and G is a square matrix of Income returns.

Also, in this case, both V and G should normally be uncorrelated, but in cases where they are correlated, is there a straight forward way to make them orthogonal?

share|improve this question
I assume that $V$ and $G$ are variance matrices (of returns, etc.): in particular, they are positive semi-definite. If there are no constraints, then $X=0$ is a solution. If you have equality constraints, you can use Lagrange multipliers. If you also have inequality constraints, you can use a quadratic solver. I am not sure what you mean by "both V and G should be uncorrelated" (diagonal variance matrices?). – Vincent Zoonekynd Jun 21 '12 at 14:36
Other than your mention of what V and G represent, which is irrelevant to your actual question (and FYI non-sensical, what is a matrix of returns?), what does this have to do with finance? – Tal Fishman Jun 21 '12 at 14:36

Just add V and G together and treat like an ordinary quadratic programming problem.

share|improve this answer

$$ M=X^{T} VX+X^{T} GX= X^{T} (V+G)X $$ $$ \frac{\partial M}{\partial X}=(V+V^{T}+G+G^{T} )X$$ $$ \frac{\partial^{2} M}{\partial X^{2}}=(V+V^{T}+G+G^{T} ) > 0 $$

If V and G are positive definite the under such conditions the minimum exists and it is a matter of solving the linear system $$(V+V^{T}+G+G^{T} )X=0 $$

One of the solutions for this equation is a trivial solution and the other requires you to reduce the matrix to row-echolon form

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.