OWA risk measures constraints: private API

PortfolioOptimisers.set_owa_constraints! — Function
set_owa_constraints!(
    model::Model,
    X::AbstractMatrix{<:Union{Number, AbstractJuMPScalar}};
    prefix
) -> Any

Set up the OWA portfolio returns variable and equality constraint.

Introduces a vector variable owa of length T and adds the equality constraint sc * (net_X - owa) == 0. Returns the existing owa if already present.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • X::MatNum: Asset returns matrix (T × N).

Keyword arguments

  • prefix::Symbol: Model State namespace (default: empty, i.e. the bare key).

Returns

  • owa: JuMP vector variable of length T for OWA portfolio returns.

Related

source
PortfolioOptimisers.SortingNetworkParts — Type
struct SortingNetworkParts{__T_z, __T_c_eq, __T_c_a, __T_c_b, __T_risk}

The parts of a relaxed sorting network in a JuMP model: the network variable, its three blocks of rows and the OWA risk expression.

This type is an implementation detail and is not intended for direct use. set_sorting_network_owa! makes it, and the two sorting-network methods of set_risk_constraints! register each part in the Model State under the keys of their measure.

Fields

  • z: z: Vector variable of length 2K, the two values that each of the K comparators writes.
  • c_eq: c_eq: The K equality rows, one for each comparator.
  • c_a: c_a: The K rows that put the larger value of a comparator at or above its first input.
  • c_b: c_b: The K rows that put the larger value of a comparator at or above its second input.
  • risk: risk: The OWA risk expression of the network.

Related

source
PortfolioOptimisers.set_sorting_network_owa! — Function
set_sorting_network_owa!(
    model::Model,
    alg::SortingNetworkOrderedWeightsArray,
    X::AbstractMatrix{<:Union{Number, AbstractJuMPScalar}},
    owa_w::AbstractVector{<:Union{Number, AbstractJuMPScalar}};
    prefix
) -> SortingNetworkParts{Vector{VariableRef}, __T_c_eq, __T_c_a, __T_c_b} where {__T_c_eq<:(ConstraintRef{Model, C} where C<:MathOptInterface.ConstraintIndex), __T_c_a<:(ConstraintRef{Model, C} where C<:MathOptInterface.ConstraintIndex), __T_c_b<:(ConstraintRef{Model, C} where C<:MathOptInterface.ConstraintIndex)}

Add the relaxed sorting network of a SortingNetworkOrderedWeightsArray to model, and return the OWA risk expression of the weight vector owa_w.

The network reads the owa variable of set_owa_constraints!, so the fees and the costs enter as they do for ExactOrderedWeightsArray. The inputs are divided by the largest absolute asset return and the risk is multiplied by it, which keeps the network values near one. The OWA risk is positively homogeneous, so the scale does not change it.

JuMP formulation

  • z: Vector variable of length 2K, the two values that each of the K comparators writes, in the columns that alg.ordering gives.
  • c_eq: The K rows sc * (z_l + z_h - z_a - z_b) == 0, where comparator k reads z_a and z_b, and writes the smaller value z_l and the larger value z_h.
  • c_a, c_b: The K rows sc * (z_h - z_a) >= 0 and the K rows sc * (z_h - z_b) >= 0.
  • risk: The expression s * dot(owa_w, z_out), where z_out holds the last value that the network writes to each position, in ascending position, and s is the largest absolute asset return.

Arguments

  • model::JuMP.Model: The JuMP optimisation model.
  • alg: The sorting-network formulation.
  • pr::AbstractPriorResult: Prior result containing the returns matrix X.
  • owa_w: Nondecreasing OWA weight vector of length T.

Validation

Keyword arguments

  • prefix::Symbol: Model State namespace (default: empty, i.e. the bare key).

Returns

  • net::SortingNetworkParts: The network variable, the three blocks of rows and the risk expression, which the caller registers.

Related

References

  • [212] M. X. Goemans. Smallest compact formulation for the permutahedron. Mathematical Programming 153, 5–11 (2015).
source

References

[212]
M. X. Goemans. Smallest compact formulation for the permutahedron. Mathematical Programming 153, 5–11 (2015).