A Fast Successive QP Algorithm for General Mean-Variance Portfolio Optimization

Shengjie Xiu, Xiwen Wang, Daniel P. Palomar

TL;DR

Researchers have developed a unified, high-performance algorithm (SCQP) that solves a wide array of mean-variance portfolio problems—from the classic Markowitz model to complex Kelly and robust formulations—by reducing them to a sequence of simple Quadratic Programs (QPs). By exploiting the inherent sparsity of optimal portfolios, the algorithm achieves nearly linear scaling, outperforming industry-standard solvers like MOSEK by up to 8.7x.

What Problem Does This Paper Address?

In quantitative finance, the "Mean-Variance" framework is the gold standard for balancing expected returns against risk. However, as investors have moved beyond the basic Markowitz model to more sophisticated objectives—like maximizing the Sharpe ratio, accounting for estimation errors (robust optimization), or using Kelly's growth criterion—the underlying math has become fragmented.

Currently, each specific portfolio "flavor" often requires a bespoke algorithm (e.g., Dinkelbach’s for fractional programs or Majorization-Minimization for robust models). General-purpose nonlinear solvers exist, but they are often "black boxes" that are computationally expensive and fail to exploit the specific structure of financial data. The authors address this by seeking a unified, fast, and scalable algorithm that can handle almost any mean-variance formulation.

Methods

The authors propose the Successive Quadratic Programming (SCQP) algorithm. The core idea is to break a complex, potentially non-convex optimization problem into a series of easier sub-problems.

  1. The Double-Loop Architecture:
    • Outer Loop: Approximates the complex objective function with a quadratic surrogate.
  2. Inner Loop: Handles mean-variance constraints by relaxing them into the objective using a dual-gradient projection method.
  3. The QP Engine: Crucially, every step in these loops results in a standard Quadratic Program (QP). Since QP solvers are highly mature and efficient, the algorithm leverages decades of optimization engineering.
  4. Fast Active-Set Strategy: This is the "secret sauce." The authors observed that "efficient" portfolios are naturally sparse—they usually only invest in a small subset of available assets. They developed a new active-set strategy that solves dimension-reduced versions of the QPs and uses "warm starts" (using the previous solution as a starting point) to drastically cut down computation time.

Datasets

The algorithm was evaluated using real-world market data:

  • Source: Historical daily price series from the S&P 500 index.
  • Scope: Data spanned a decade (2008–2018).
  • Setup: The researchers created 20 independent realizations for each test, randomly selecting $N$ stocks and $5N$ continuous trading days to test scalability across different problem sizes.

Key Insights and Ideas

  • Tracking the Pareto Frontier: Unlike general solvers that might wander through "illegal" territory, SCQP is designed to track the Pareto frontier (the set of optimal trade-offs) throughout its iteration process. This makes the path to the solution more direct and stable.
  • Sparsity is a Feature, Not a Bug: In high-dimensional finance (e.g., choosing from 500+ stocks), most assets get a weight of zero. By focusing only on the "active" assets, the algorithm avoids the $O(N^3)$ complexity trap that bogs down standard interior-point methods.
  • Unified Framework: The paper proves that many existing specialized algorithms (like the quadratic transform for Sharpe ratio maximization) are actually just special cases of their SCQP framework.

Key Results

The SCQP algorithm demonstrated significant advantages over benchmarks like ECOS, MOSEK, and NLopt:

  • Speed: For large-scale problems ($N \ge 100$), SCQP was 4.7x to 8.7x faster than the commercial MOSEK solver.
  • Scalability: While most solvers show a cubic time complexity ($O(N^3)$), SCQP achieved an empirical complexity of nearly $O(N^{1.1})$, making it exceptionally well-suited for large universes of assets.
  • Convergence: In tests involving the Kelly portfolio and robust GMRP, SCQP reached high-precision solutions ($10^{-9}$ gap) in significantly fewer iterations and less CPU time than specialized iterative methods.

Limitations and Future Work

While the algorithm is robust, it relies on a few key assumptions:

  • Strong Convexity: The convergence proof assumes the objective function contains at least one variance term to ensure strong convexity of the surrogate.
  • Constraint Types: The current fast implementation is optimized for linear and mean-variance constraints. Extending this to more exotic constraints (like cardinality or "buy-in" thresholds) might require further modifications to the active-set strategy.
  • Future Directions: The authors suggest that the SCQP framework could be extended to even higher-order portfolio optimization (accounting for skewness and kurtosis) or decentralized optimization for large-scale multi-agent systems.

Summary updated

BibTeX
@article{xiu2023fast,
  author = {Shengjie Xiu and Xiwen Wang and Daniel P. Palomar},
  title = {{A Fast Successive QP Algorithm for General Mean-Variance Portfolio Optimization}},
  journal = {IEEE Trans. Signal Process.},
  year = {2023},
  url = {https://openreview.net/forum?id=OFd59sxP9P},
}
Figure