0

i am new to Mosek optimization, and i am trying to implement a Portfolio Optimization, but i'm not using Fusion.
I am using the basic MOSEK API.

The problem is very close to the basic portfolio optimization described here:https://docs.mosek.com/9.1/pythonfusion/case-studies-portfolio.html#

I have formulated most of my variables and contrains, but i am facing the following problem: How to introduce a constraint similar to this:
M.constraint('budget', Expr.sum(x), Domain.lessThan(D))
i.e. the sum of trades to be less than a predefined threshold.
It's easy in the fusion API, but what about the basic one? (using mosek.Env().Task())

Any hints would be greatly appreciated!

stavrop
  • 465
  • 2
  • 8
  • 20
  • 1
    https://docs.mosek.com/9.2/pythonapi/case-portfolio.html#implementing-the-portfolio-model has an example that includes the constraint sum(x) = some constant. It should be easy to modify. – Michal Adamaszek Apr 07 '20 at 15:38
  • 1
    Basically you put a row that has 1 for every column in x and 0 otherwise, and then make it upper bounded. – Michal Adamaszek Apr 07 '20 at 15:40

0 Answers0