Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Limitations of Quantopian's optimize API

Hi,

I want to convert this optimization routine to Q's optimize API but found that it is not possible.

   P = matrix(Sigma)  
    (m, m) = Sigma.shape  
    (m, n) = betas.shape  
    q = matrix(alpha, (m, 1))  
    A = matrix(betas)  
    b = matrix(0., (n,1))  
    res = cvxopt.solvers.qp(P=P, q=q, A=A, b=b)  

Where
sigma is covariance matrix.
alpha is the signal I want to minimize or maximize
betas are my risk exposures that I want to neutralize.

Do you have plans of extending the API to support such optimizations?

Best regards,
Pravin

3 responses

Hi Pravin -

Have you tried writing the problem in CVXPY, which is now available on Quantopian? Why do you want to use Q's API for optimization?

Yes CVXPY works but Q's API does not. Q's API has some nice constraints on max long and short position.

O.K. By the way, I got the sense in a private communication that the optimization API would eventually be put out on github. Perhaps Quantopian support could confirm, and give a sense for the timeline. Then, even if the API isn't generalized, one could grab the relevant code from github and adapt it.