StochasticDominance.jl: A Julia Package for Higher Order Stochastic Dominance
Rajmadan Lakshmanan, Alois Pichler
TL;DR
StochasticDominance.jl addresses the computational challenge of higher-order stochastic dominance by providing a Julia-based, open-source tool that verifies dominance and constructs dominance-constrained portfolios. The package implements a finite reduction of the infinite constraint set using the theoretical framework from lakshmanan2025HSDPrePrint, enabling practical optimization with non-integer orders. It couples Particle Swarm Optimization (PSO) for fast initialization with Newton’s method for precise refinement, and exposes a black-box interface with functions such as verify_dominance($X$,$Y$,$SDorder$), optimize_max_return_SD, and optimize_min_riskreturn_SD. The examples demonstrate both dominance verification (e.g., confirming $Y$ dominates $X$ in order $SDorder$) and portfolio optimization to maximize $\mathbb{E}[R]$ or minimize higher-order risk measures under the same $SDorder$, including plotting and convergence diagnostics. The work extends prior analyses to higher orders and non-integer orders, offering a practical tool for researchers and practitioners to integrate stochastic dominance into optimization workflows.
Abstract
Stochastic dominance is a fundamental concept in decision-making under uncertainty and quantitative finance, yet its practical application is hindered by computational intractability due to infinitely many constraints. We introduce the Julia package StochasticDominance, an open-source tool that efficiently verifies and optimizes under higher-order stochastic dominance constraints. Our approach builds on recent theoretical advancements that reduce infinite constraints to a finite number, making higher-order stochastic dominance more accessible. This package provides a user-friendly, black-box solution, enabling researchers and practitioners to incorporate stochastic dominance constraints seamlessly into their optimization frameworks.
