Norm-Ball Uncertainty Sets

PortfolioOptimisers.NormBallUncertaintySetType
struct NormBallUncertaintySet{__T_kappa, __T_L, __T_p, __T_class, __T_val} <: AbstractUncertaintySetResult

Holds a radius, a geometry map and a norm order, so the set is the image of a norm ball under the map, on the mean axis or on the covariance axis.

The map may have fewer columns than the quantity has entries, so the set may be flat, which is what a set confined to an Orthogonal Subspace needs, and it may have no column at all, which is the rank-zero set whose worst case is the nominal quantity. Its worst case is the radius times the dual norm of the map's transpose applied to the exposure, so no consumer factorises anything: the mean builder raises one cone on $\mathbf{L}^{\intercal}\boldsymbol{w}$, and the covariance builder puts $\mathbf{L}^{\intercal}$ where the ellipsoid's Cholesky factor goes. The cone follows the dual norm: a second-order cone at $p = 2$, a norm-one cone at $p = \infty$, a norm-infinity cone at $p = 1$, and power cones otherwise.

class names the axis, and the axis fixes the row count of L and the index a view applies. A MuUncertaintySetClass set carries an $N \times r$ map and takes the plain asset index. A SigmaUncertaintySetClass set carries an $N^{2} \times r$ one, because it bounds a vectorised covariance, so port_opt_view recovers $N$ from the map and maps the asset index through fourth_moment_index_generator before it slices. The robust-return builder refuses a set that carries the covariance tag.

Three existing shapes are diagonal or square cases of this one. The mean BoxUncertaintySet is the $p = \infty$ set with $\mathbf{L} = \operatorname{diag}((\boldsymbol{u} - \boldsymbol{\ell})/2)$ and $\kappa = 1$. The L1UncertaintySet is the $p = 1$ set with $\mathbf{L} = \operatorname{diag}(\boldsymbol{\sigma})$ and $\kappa = \epsilon$. The EllipsoidalUncertaintySet is the $p = 2$ set with $\mathbf{L}$ the lower Cholesky factor of its shape matrix and $\kappa = k$, which is what the converter constructor builds. Each of the three reaches the same weights as the norm ball it corresponds to, and each keeps its own builder.

Mathematical definition

\[\begin{align} U^{p}_{\boldsymbol{z}} &= \left\{ \hat{\boldsymbol{z}} + \mathbf{L}\boldsymbol{u} \, \vert \, \lVert \boldsymbol{u} \rVert_{p} \leq \kappa \right\}\,, \\ \underset{\boldsymbol{z} \in U^{p}_{\boldsymbol{z}}}{\min} \boldsymbol{z}^{\intercal}\boldsymbol{e} &= \hat{\boldsymbol{z}}^{\intercal}\boldsymbol{e} - \kappa \lVert \mathbf{L}^{\intercal}\boldsymbol{e} \rVert_{q}\,, \quad \frac{1}{p} + \frac{1}{q} = 1\,. \end{align}\]

Where:

  • $U^{p}_{\boldsymbol{z}}$: Norm-ball uncertainty set of order $p$ for the quantity $\boldsymbol{z}$.
  • $\boldsymbol{z}$: Uncertain quantity, the mean vector on the mean axis and the vectorised covariance on the covariance axis.
  • $\hat{\boldsymbol{z}}$: Estimated centre of the set.
  • $\mathbf{L}$: Geometry map, $N \times r$ on the mean axis and $N^{2} \times r$ on the covariance axis.
  • $\boldsymbol{u}$: Coordinates in the ball, $r \times 1$.
  • $\kappa \geq 0$: Radius of the ball.
  • $p \geq 1$: Norm order of the ball, $\infty$ admitted.
  • $q$: Dual norm order, $\infty$ at $p = 1$ and $1$ at $p = \infty$.
  • $\boldsymbol{e}$: Exposure the worst case is taken against, the weights on the mean axis and the vectorised lifted weight matrix on the covariance axis.

The second line is Hölder's inequality with equality, which is why the worst case needs no factorisation and holds for a rank-deficient $\mathbf{L}$. A radius of zero, or a map with no column, leaves the nominal quantity. On the covariance axis the worst case is taken jointly with the positive semi-definite constraint, and the consumer states the lifted form it builds.

Fields

  • kappa: Radius $\kappa \geq 0$ of the ball, the multiplier of the dual-norm penalty. 0 leaves the nominal quantity.
  • L: Geometry map $\mathbf{L}$, $N \times r$ on the mean axis and $N^{2} \times r$ on the covariance axis. It may be rank deficient, and r = 0 is admitted and leaves the nominal quantity.
  • p: Norm order $p \geq 1$ of the ball, Inf admitted. The consumer raises the cone of the dual order.
  • class: Uncertainty set class.
  • val: Quantity the set is a neighbourhood of — a characteristic vector on the mean axis, a covariance matrix on the covariance axis. nothing defers to the consumer's own quantity. When it is set, it takes precedence over the returns estimator's field and over the prior.

Constructors

NormBallUncertaintySet(;    kappa::Number,    L::MatNum,    p::Number = 2,    class::AbstractUncertaintySetClass,    val::Option{<:ArrNum} = nothing) -> NormBallUncertaintySetNormBallUncertaintySet(ucs::EllipsoidalUncertaintySet) -> NormBallUncertaintySet

Keywords correspond to the struct's fields. The second constructor converts a built EllipsoidalUncertaintySet with one Cholesky factorisation at construction time: L = LinearAlgebra.cholesky(ucs.sigma).L, p = 2, and kappa, class and val carried through from k, class and val. It is the route through which every estimator that emits an ellipsoid reaches this type.

Validation

  • isfinite(kappa) and kappa >= 0.
  • !isnan(p) and p >= 1. Inf is admitted.
  • size(L, 1) > 0 and all(isfinite, L). A map with no column is admitted.
  • If class is a SigmaUncertaintySetClass: size(L, 1) is a perfect square, because the map lives on the vectorised covariance.
  • If val is provided: length(val) == size(L, 1). The rule reads a length rather than a size, so it holds on both axes: val is a characteristic vector of length $N$ beside a map of $N$ rows, and an $N \times N$ covariance matrix beside a map of $N^{2}$ rows. On the covariance axis val must also be square.

Examples

julia> NormBallUncertaintySet(; kappa = 2.0, L = [1.0 0.0; 0.0 1.0; 0.5 0.5],                              class = MuUncertaintySetClass())NormBallUncertaintySet  kappa ┼ Float64: 2.0      L ┼ 3×2 Matrix{Float64}      p ┼ Int64: 2  class ┼ MuUncertaintySetClass()    val ┴ nothing

Related

References

  • [88] A. Ben-Tal and A. Nemirovski. Robust Convex Optimization. Mathematics of Operations Research 23, 769–805 (1998). Section 3, Equation 14.
  • [89] D. Goldfarb and G. Iyengar. Robust Portfolio Selection Problems. Mathematics of Operations Research 28, 1–38 (2003). Section 5.
source
PortfolioOptimisers.port_opt_viewMethod
port_opt_view(
    risk_ucs::NormBallUncertaintySet{<:Any, <:AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}}, <:Any, <:MuUncertaintySetClass},
    i,
    args...
) -> Union{NormBallUncertaintySet{var"#s185", <:AbstractMatrix{var"#s137"}, <:Number, MuUncertaintySetClass, Nothing} where {var"#s185"<:Number, var"#s137"<:(Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar})}, NormBallUncertaintySet{var"#s185", var"#s1851", var"#s1852", MuUncertaintySetClass, <:AbstractArray{var"#s137", N}} where {var"#s185"<:Number, var"#s137"<:(Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}), var"#s1851"<:AbstractMatrix{var"#s137"}, var"#s1852"<:Number, var"#s137"<:(Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}), N}}

Return a view of a mean NormBallUncertaintySet restricted to assets at index i.

The view is the projection of the set onto the cluster's coordinates, and not a refit: a row slice of the map is the map of the projected set, because the coordinates $\boldsymbol{u}$ of the ball are untouched by dropping rows of $\mathbf{L}$. It is what the ellipsoid's view returns too, since $\mathbf{\Sigma}_{ii} = \mathbf{L}_{i}\mathbf{L}_{i}^{\intercal}$. A caller who wants the set the same estimator would fit on the subset alone fits the subset.

Algorithm

  1. Take view(risk_ucs.L, i, :), the rows of the map the selected assets occupy.
  2. Take nothing_scalar_array_view(risk_ucs.val, i), the fitted characteristic vector restricted to the same assets, which passes a nothing through unchanged.
  3. Build a NormBallUncertaintySet from the two views, carrying kappa, p and class through unchanged.

Arguments

  • risk_ucs: Mean norm-ball uncertainty set.
  • i: Cluster or asset index.
  • args...: Additional positional arguments (ignored).

Returns

  • risk_ucs::NormBallUncertaintySet: The set restricted to i.

Related

source
PortfolioOptimisers.port_opt_viewMethod
port_opt_view(
    risk_ucs::NormBallUncertaintySet{<:Any, <:AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}}, <:Any, <:SigmaUncertaintySetClass},
    i,
    args...
) -> Union{NormBallUncertaintySet{var"#s185", <:AbstractMatrix{var"#s137"}, <:Number, SigmaUncertaintySetClass, Nothing} where {var"#s185"<:Number, var"#s137"<:(Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar})}, NormBallUncertaintySet{var"#s185", var"#s1851", var"#s1852", SigmaUncertaintySetClass, <:AbstractArray{var"#s137", N}} where {var"#s185"<:Number, var"#s137"<:(Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}), var"#s1851"<:AbstractMatrix{var"#s137"}, var"#s1852"<:Number, var"#s137"<:(Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}), N}}

Return a view of a covariance NormBallUncertaintySet restricted to assets at index i, mapping the map's row index through the fourth-moment index generator.

The view is the projection of the set onto the cluster's coordinates, and not a refit. The set bounds a vectorised covariance, so its map lives on the $N^{2}$ axis while its centre lives on the $N$ axis, and the method applies two different indices, one to each field.

Algorithm

  1. Take nothing_scalar_array_view(risk_ucs.val, i), the fitted $N \times N$ covariance restricted to the selected assets. It takes the plain asset index, and a nothing passes through unchanged. The step runs first, because step 2 overwrites i.
  2. Recover N as isqrt(size(risk_ucs.L, 1)) from the map, and expand i with fourth_moment_index_generator(N, i), giving the positions the selected assets occupy in the vectorised covariance.
  3. Take view(risk_ucs.L, i, :) under the expanded index, giving the rows of the map the selected pairs occupy.
  4. Build a NormBallUncertaintySet from the two views, carrying kappa, p and class through unchanged.

Arguments

  • risk_ucs: Covariance norm-ball uncertainty set.
  • i: Cluster or asset index.
  • args...: Additional positional arguments (ignored).

Returns

  • risk_ucs::NormBallUncertaintySet: The set restricted to i.

Related

source

References

[88]
A. Ben-Tal and A. Nemirovski. Robust Convex Optimization. Mathematics of Operations Research 23, 769–805 (1998).
[89]
D. Goldfarb and G. Iyengar. Robust Portfolio Selection Problems. Mathematics of Operations Research 28, 1–38 (2003).