-1

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
wjandrea
  • 28,235
  • 9
  • 60
  • 81
s Murasame
  • 11
  • 3

1 Answers1

0

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

Marco_sbt
  • 309
  • 1
  • 12