The "Dust" Problem
Traditional Mean-Variance Optimization assumes assets are infinitely divisible. This creates "dust"—negligible positions (e.g., 0.0001%) that are:
- Costly to trade (fixed fees)
- Operational nightmares
- Impossible to hedge
- Illiquid odd-lots
The MIP Solution
// If z[i] is 0, weight w[i] MUST be 0
Mathematical Architectures
Structural Constraints
Logical Constraints
Cardinality (K)
Minimum Buy-In
Round Lots
Advanced Techniques
Perspective Cut
Indicator Constraints
SOS Type 2
Turnover Control
Research Note: The "Big-M" Pitfall
The Quant Workflow
1. Data Ingestion & Signal Generation
Constructing the inputs for the optimizer.
2. Problem Formulation (CVXPY)
Translating business logic into standard form.
3. The Solver Engine
Branch-and-Bound search space exploration.
4. Order Slicing & Execution
Transforming optimal weights into market orders.
- Round to nearest Lot (100)
- Split large parents (VWAP)
- Route to Dark Pools
- TCA Analysis
Sparse Index Tracking
The L_0 Norm Challenge
The goal is to replicate a benchmark (e.g., S&P 500) using only a subset of assets (e.g., K=50). This minimizes transaction costs and simplifies management.
MIP vs. Lasso (Regularization)
- Lasso (L_1): Shrinks weights towards zero. Bias creates systematic underperformance.
- MIP (L_0): Selects the best subset without shrinking weights. Provides an unbiased estimator.
Tax-Loss Harvesting
Maximizing After-Tax Alpha
Systematically realizing losses to offset capital gains, while maintaining risk exposure. The complexity lies in the Wash Sale Rule: you cannot buy a "substantially identical" security 30 days before or after a sale.
The Logic Gate (MIP Formulation)
Tracks specific tax lots (date, price) rather than average cost.
Pairs Trading & Cointegration
Graph Theory Formulation
We treat the market as a graph G=(V,E) where vertices are stocks and edges represent cointegration strength. The goal is to find a matching that maximizes total strength while ensuring diversification.
The Clique Partitioning Problem
Partitioning the universe into disjoint clusters of cointegrated assets. An NP-Hard problem solvable via MIP.
The Modern Quant Stack
Future Frontiers
Next-generation computing paradigms for combinatorial finance.
Quantum Annealing
Classical solvers struggle with non-convex landscapes, often getting stuck in local minima. Quantum Annealers exploit quantum tunneling to traverse energy barriers, finding global optima for combinatorial problems.
The Mapping: QUBO
Financial MIPs must be reformulated into Quadratic Unconstrained Binary Optimization problems.
Portfolio Embedding
Neural Branching
The bottleneck of any MIP solver is the Branch-and-Bound tree. Choosing which variable to branch on determines if the solver finishes in seconds or centuries.
We train Graph Neural Networks (GNNs) via Imitation Learning to mimic expert (but slow) branching rules like Strong Branching, but execute them in milliseconds on a GPU.

