Help with Implementing Minimum Trade Size Limit Without Mixed Integer Optimization

26 views
Skip to first unread message

Berke

unread,
Jan 3, 2025, 9:44:18 AMJan 3
to mosek

Dear Mosek Community,

I hope this email finds you well. I am a PhD student at Lancaster University and I am working on a portfolio optimization problem using the Python Fusion API. I am encountering issues with implementing a minimum trade size constraint.

I want to avoid using mixed-integer optimization due to its computational expense and scalability challenges. Instead, I tried incorporating a soft constraint using a function based on an exponential expression.The function is defined as: f(x)=exp(a⋅(x−c)^2−b⋅x)

Here, , , and , while represents my absolute trade vector. My goal is to suppress trade sizes smaller than (i.e., 0.003), but despite adding the constraint, it seems to have no practical effect on the optimization.

I have attached the the relevant code snippet for adding this constraint. The added constraints are not producing the intended effect of limiting trade sizes below. 

I would greatly appreciate any insights or suggestions to make this constraint work effectively. Specifically:

  1. Are there any modifications or alternative formulations that would make this constraint more robust and impactful?
  2. Is there a better way to implement a soft threshold for trade size constraints without resorting to mixed-integer optimization?

Thank you in advance for your time and help!

Best regards,

Mustafa Berke Erdis

mosek_q.py

Michal Adamaszek

unread,
Jan 6, 2025, 7:26:23 AMJan 6
to mosek
Hi,

In your code Expr.sub(t2, t1) should be replaced with Expr.sub(t1, t2) if the code should match the description and comments. Or perhaps you meant the signs to be the other way around in your description (although that would be nonconvex and in your particular implementation this constraint would become irrelevant by taking self.aux_quad going to +inf, ie. it is not modeling the right bound)

Other than that it is a bit hard to say much more. There is no data to reproduce your problem. It seems unclear why this method should even work in restricting anything. Perhaps you would have to add some mathematical formulation and some numerically reasonable example data.

I don't think we know any way to do this beyond standard MIP models.

Best,
Michal
Reply all
Reply to author
Forward
0 new messages