Ordered Weights Array (b)

PortfolioOptimisers.OrderedWeightsArrayRange — Type
struct OrderedWeightsArrayRange{__T_settings, __T_w1, __T_w2, __T_alg, __T_rev} <: RiskMeasure

Ordered Weights Array Range (OWA Range) risk measure.

Computes portfolio risk as the difference between two OWA linear combinations of sorted portfolio returns, providing a range-based risk measure.

The constructor reverses w2 unless the caller declares that it is already reversed (see rev). That reversal is what makes the difference of the two weight vectors a range: w1 addresses the lower tail of the sorted returns, and the reversed w2 addresses the upper tail, so w1 - w2 sums the two tails rather than cancelling them. It is the weight-space form of the convention ValueatRiskRange states on the returns themselves.

Mathematical definition

\[\begin{align} \mathrm{OWARange}_{\boldsymbol{w}_{1},\boldsymbol{w}_{2}}(\boldsymbol{x}) &= \sum_{t=1}^{T} \left(w_{1,t} - w_{2,t}\right) x_{(t)}\,. \end{align}\]

Where:

  • $\mathrm{OWARange}_{\boldsymbol{w}_{1},\boldsymbol{w}_{2}}(\boldsymbol{x})$: Ordered weights array range.
  • $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
  • $T$: Number of observations.
  • $\boldsymbol{w}_{1}$: Lower-tail OWA weight vector $T \times 1$.
  • $\boldsymbol{w}_{2}$: Upper-tail OWA weight vector $T \times 1$, held reversed by the constructor.
  • $x_{(t)}$: $t$-th smallest entry of $\boldsymbol{x}$, so $x_{(1)} \leq \dots \leq x_{(T)}$.

Fields

  • settings: Risk measure settings.
  • w1: Optional first OWA weight vector.
  • w2: Optional second OWA weight vector.
  • alg: Risk measure optimisation formulation algorithm.
  • rev: Whether w2 is already reversed. It is a done-flag, not an instruction: the constructor reverses w2 when rev == false, and leaves it as-is when rev == true. The field is stored as true whatever the caller passes, because w2 is reversed by the time the object exists, so rebuilding an instance from its own fields does not reverse twice. A default-constructed instance therefore prints rev as true.

Constructors

OrderedWeightsArrayRange(;    settings::RiskMeasureSettings = RiskMeasureSettings(),    w1::OWA_Func_VecNum = owa_tg,    w2::OWA_Func_VecNum = owa_tg,    alg::OrderedWeightsArrayFormulation = ApproxOrderedWeightsArray(),    rev::Bool = false) -> OrderedWeightsArrayRange

Keywords correspond to the struct's fields.

Validation

  • If w1 is a VecNum: !isempty(w1).
  • If w2 is a VecNum: !isempty(w2).
  • If both w1 and w2 are VecNum: length(w1) == length(w2).

Functor

(r::OrderedWeightsArrayRange)(x::VecNum)

Computes the OWA range of a portfolio returns vector x, as the sorted returns weighted by w1 - w2. A w1 or w2 that is a callable is evaluated at length(x) first, so the weight vectors always match the sample.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia> OrderedWeightsArrayRange()OrderedWeightsArrayRange  settings ┼ RiskMeasureSettings           │   scale ┼ Float64: 1.0           │      ub ┼ nothing           │     rke ┴ Bool: true        w1 ┼ typeof(owa_tg): PortfolioOptimisers.owa_tg        w2 ┼ ComposedFunction{typeof(reverse), typeof(owa_tg)}: reverse ∘ PortfolioOptimisers.owa_tg       alg ┼ ApproxOrderedWeightsArray           │   p ┴ Vector{Float64}: [2.0, 3.0, 4.0, 10.0, 50.0]       rev ┴ Bool: true

Related

References

  • [136] W. Ogryczak and T. Śliwiński. On solving linear programs with the ordered weighted averaging objective. European Journal of Operational Research 148, 80–91 (2003).
  • [133] D. Cajas. OWA portfolio optimization: A disciplined convex programming framework. Available at SSRN 3988927 (2021).
  • [5] D. Cajas. Advanced Portfolio Optimization: A Cutting-edge Quantitative Approach (Springer Nature Switzerland, 2025). Section 7.2.3.
source

References

[5]
D. Cajas. Advanced Portfolio Optimization: A Cutting-edge Quantitative Approach (Springer Nature Switzerland, 2025).
[133]
D. Cajas. OWA portfolio optimization: A disciplined convex programming framework. Available at SSRN 3988927 (2021).
[136]
W. Ogryczak and T. Śliwiński. On solving linear programs with the ordered weighted averaging objective. European Journal of Operational Research 148, 80–91 (2003).