Ulcer Index: private API

PortfolioOptimisers.ulcer_index — Function
ulcer_index(dd::VecNum, ::Nothing) -> Number
ulcer_index(dd::VecNum, w::VecNum) -> Number

Aggregate a drawdown series into its root-mean-square drawdown.

UlcerIndex and RelativeUlcerIndex both call this kernel. They differ only in the series that they give it: absolute_drawdown_vec for the first, and relative_drawdown_vec for the second. average_drawdown is the kernel of the mean drawdown.

The type of the second argument selects the method. Callers resolve the observation weights with checked_observation_weights first, so the kernel sees a weight vector or nothing, and never a DynamicAbstractWeights.

Mathematical definition

\[\begin{align} \mathrm{UI}(\boldsymbol{\delta}) &= \frac{\lVert \boldsymbol{\delta} \rVert_2}{\sqrt{T}}\,, \\ \mathrm{UI}_{w}(\boldsymbol{\delta}) &= \sqrt{\frac{1}{W_{T}} \sum_{t=1}^{T} w_{t} \delta_t^2}\,. \end{align}\]

Where:

  • $\boldsymbol{\delta}$: Drawdown series dd $T \times 1$, absolute or relative, every entry $\leq 0$.
  • $\mathrm{UI}(\boldsymbol{\delta})$, $\mathrm{UI}_{w}(\boldsymbol{\delta})$: The root-mean-square drawdown of the methods without and with weights.
  • $w_{t}$: Observation weight of observation $t$.
  • $W_{T} = \sum_{t=1}^{T} w_{t}$: Total observation weight.
  • $T$: Number of observations.

Arguments

  • dd::VecNum: Drawdown series, every entry $\leq 0$. The function does not write it.
  • w: Resolved observation weights, or nothing for the index without weights.

Returns

  • Number: Ulcer index, returned as a nonnegative loss.

Related

source