0
$\begingroup$

I have the following problem: typical mean variance

minimize w_long(S)w_long.T + w_shortSw_short.T - lambda*mu

I am having issue formulating this constraint in cvxopt lets say we have 10 securities (n)

  w_long>=0
  w_short<=0
  sum(w_long)=1
  sum(w_short)<=0
  A*(w_long) = b
  A*(w_short)<= b*sum(w_short)

my A is a matrix of 3 x 10 where each security is put in one of 3 sectors. my b is an equally weighted matrix of 3x1. I am having trouble represented the A matrix S is your identity matrix

I know its easy to write this using cvxpy but I am interested in the A matrix for the input to cvxopt qp solver

From what I have read I need to introduce slack variables, if anyone can point to some source or give me guidance on how to set this simple example up that would be greatly appreciated

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.