Let's say we have 6 assets a b c d e f
,
we want to long a b c d
and short e f
, how to set the constraints by using the solver.qp
?
I am using the
import cvxopt
from cvxopt import matrix, solvers
Let's say we have 6 assets a b c d e f
,
we want to long a b c d
and short e f
, how to set the constraints by using the solver.qp
?
I am using the
import cvxopt
from cvxopt import matrix, solvers
you need to set two inequality constraint each representing a min and max weight where the long will have min of 0 while the shorts will have a max of 0