  We study the problem of maximizing a spectral risk measure of a given output
function which depends on several underlying variables, whose individual
distributions are known but whose joint distribution is not. We establish and
exploit an equivalence between this problem and a multi-marginal optimal
transport problem. We use this reformulation to establish explicit, closed form
solutions when the underlying variables are one dimensional, for a large class
of output functions. For higher dimensional underlying variables, we identify
conditions on the output function and marginal distributions under which
solutions concentrate on graphs over the first variable and are unique, and,
for general output functions, we find upper bounds on the dimension of the
support of the solution. We also establish a stability result on the maximal
value and maximizing joint distributions when the output function, marginal
distributions and spectral function are perturbed; in addition, when the
variables one dimensional, we show that the optimal value exhibits Lipschitz
dependence on the marginal distributions for a certain class of output
functions. Finally, we show that the equivalence to a multi-marginal optimal
transport problem extends to maximal correlation measures of multi-dimensional
risks; in this setting, we again establish conditions under which the solution
concentrates on a graph over the first marginal.
