Skip to main content

Issues modeling portfolio optimization with rebalancing in gurobipy

Answered

Comments

3 comments

  • Official comment
    Matthias Miltenberger
    • Gurobi Staff

    Hi Paolo,

    There are 11 constraints of the form

    x * y >= 0.02
    

    with y being a binary variable, effectively forcing all these binaries to 1 to satisfy the constraints.
    Then there is the first constraint:

    y_1 + ... + y_11 <= 10
    

    This can never be satisfied if all 11 y variables have to be 1.

    Cheers,
    Matthias

    crosspost on or.stackexchange.com

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Paolo Baudissone
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks a lot Matthias!

    0

Post is closed for comments.