Equal Risk Measure

PortfolioOptimisers.EqualRisk — Type
struct EqualRisk{__T_settings} <: HierarchicalRiskMeasure

Measures the same risk for every portfolio, so that a hierarchical optimiser splits every cluster evenly.

The risk is the reciprocal of the length of the weights vector. A hierarchical optimiser weights a cluster by the reciprocal of its risk, so a constant risk makes every split an even one. HierarchicalRiskParity gives each half of each bisection one half of the weight of the parent, so its weights are $1/N$ only when $N$ is a power of two. HierarchicalEqualRiskContribution splits each cluster evenly and gives the assets of a cluster equal weights. The risk does not change when the weights change, so every contribution of risk_contribution is zero.

Mathematical definition

For a portfolio of $N$ assets with weights $\boldsymbol{w} \in \mathbb{R}^N$:

\[\begin{align} \mathrm{EqR}(\boldsymbol{w}) &= \frac{1}{N}\,. \end{align}\]

Where:

  • $\mathrm{EqR}(\boldsymbol{w})$: Equal risk of the portfolio.
  • $\boldsymbol{w}$: Portfolio weights vector $N \times 1$.
  • $N$: Number of assets.

$N$ is the length of the weight vector the functor receives, not the size of a cluster. A hierarchical optimiser passes the full-length weight vector with zeros outside the cluster, so every cluster reports the same $1/N$ and every bisection splits the weight evenly.

Fields

  • settings: Risk measure settings.

Constructors

EqualRisk(;    settings::HierarchicalRiskMeasureSettings = HierarchicalRiskMeasureSettings()) -> EqualRisk

Keywords correspond to the struct's fields.

Functor

(r::EqualRisk)(w::VecNum)

Returns the reciprocal of the length of the weights vector w, in the element type of w. An integer element type gives a floating point number.

Arguments

  • w::VecNum: Portfolio weights vector.

Examples

julia> EqualRisk()EqualRisk  settings ┼ HierarchicalRiskMeasureSettings           │   scale ┴ Float64: 1.0julia> EqualRisk()([0.5, 0.3, 0.2, 0.0])0.25julia> EqualRisk()(Float32[0.6, 0.4])0.5f0

Related

source