title: optimization with python cvxopt
body: <p>I am trying to minimize the <a href="http://www.investopedia.com/ask/answers/071515/how-can-i-measure-portfolio-variance.asp" rel="nofollow noreferrer">portfolio variance</a> using Python's cvxopt. However, after lots of trying, it doesn't seem to work. The function and my code and  the error are pasted below. Thanks for helping!</p>
  <h2>the minimize problem</h2>
  <p>objective function: min x.dot(sigma_mv).dot(x.T)</p>
  <p>the constraint condition is all x&gt;=0, sum(X) = 1</p>
  <p>sigma_mv is the covariance matrix of 800*800, dim = 800</p>
  <h2>code</h2>
  <pre><code>dim = sigma_mv.shape[0]
  P = 2*sigma_mv   
  q = np.matrix([0.0])
  G = -1*np.identity(dim)
  h = np.matrix(np.zeros((dim,1)))
  
  sol = solvers.qp(P,q,G,h)
  </code></pre>
  <hr />
  <pre><code>Traceback (most recent call last):
  
    File &quot;&lt;ipython-input-47-a077fa141ad2&gt;&quot;, line 6, in &lt;module&gt;
      sol = solvers.qp(P,q)   
  
    File &quot;D:\spyder\lib\site-packages\cvxopt\coneprog.py&quot;, line 4470, in qp
      return coneqp(P, q, G, h, None, A,  b, initvals, kktsolver = kktsolver, options = options)
  
    File &quot;D:\spyder\lib\site-packages\cvxopt\coneprog.py&quot;, line 1822, in coneqp
      raise ValueError(&quot;use of function valued P, G, A requires a &quot;\
  
  ValueError: use of function valued P, G, A requires a user-provided kktsolver
  </code></pre>