Minimum Trade Sizes in Mixed-Integer Portfolio Optimization
Summary
The document presents a portfolio optimization problem in which trades should either be zero or exceed a chosen minimum absolute size. The proposed objective combines active risk with a turnover penalty, while portfolio weights and auxiliary buy and sell variables are constrained. The author recognizes that direct inequalities tying signed trades to buy and sell indicators are incorrect, then suggests indicator-based inequalities intended to enforce a minimum trade when the corresponding binary variable is active.
This illustrates how a minimum transaction threshold can be modeled as a mixed-integer constraint rather than a continuous convex restriction. However, the post does not show a complete solver-ready formulation or report a verified result. Its use of a fixed big-M constant requires a defensible bound on trade size, and the sign, exclusivity, and linkage of buy and sell indicators must be checked alongside any other portfolio constraints. The example is a modeling starting point, not a general guarantee of correctness or computational efficiency.
Key ideas
- A minimum absolute trade size creates a choice between no trade and a trade above a threshold.
- Binary buy and sell indicators can express this choice through mixed-integer constraints.
- The post proposes big-M inequalities to activate a threshold when an indicator is selected.
- A valid formulation needs a justified big-M bound and consistent links between trades and indicators.
- The suggested constraints are not accompanied by a complete solver validation.
Tags
Full text
# Minimum transaction size for portfolio optimization with CVXPY
# Minimum transaction size for portfolio optimization with CVXPY
Long time reader, first time asker!
I am working on a portfolio optimizer where I have a universe which is much larger than potential portfolio and where I want to exclude small transaction, i.e. a thresh-hold where the absolute value needs to be larger than "theta".
```
gamma = 1 # penalization of turnover
eps = 1e-5
prob = cp.Problem(
cp.Minimize(Active_Risk #Active risk from target portfolio
+ gamma * cp.norm(trade),
),
[ # all weights sum to one or less
cp.sum(w) <= 1,
-1 + eps <= trade - buys,
trade - buys <= 0,
-1 + eps <= -trade - sells,
-trade - sells <= 0,
0 <= buys + sells,
buys + sells <= 1,
# set transaction limits
trade >= theta * buys, ## This is obviously wrong
trade <= -theta * sells,## This is obviously wrong
])
```
The issue here is how to create a mixed integer optimization problem out of this where the absolute value of the trade needs to be larger than theta or else 0.
EDIT: I think I have solved it by doing
```
# Indicator if the trade is larger than min_trade
trade + 10 * (1-buys) >= min_trade*buys,
-trade + 10 * (1-sells) >= min_trade*sells
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.