Power Norm X at Risk
PortfolioOptimisers.PowerNormValueatRisk — Type
struct PowerNormValueatRisk{__T_settings, __T_slv, __T_alpha, __T_p, __T_w} <: RiskMeasureMeasures the Power Norm Value-at-Risk (PNVaR), a threshold plus the power norm of the losses above it, divided by the significance level.
[205] defines the measure as the higher moment coherent risk measure. As $p$ falls to one it falls to the Conditional Value-at-Risk, and it rises with $p$ to the largest loss. PRM computes it with a power cone programme. The constructor refuses $p = 1$, because the power cone of that programme is then degenerate and a solver does not solve it. ConditionalValueatRisk measures that case. On a short sample it equals WorstRealisation. At the defaults alpha = 0.05 and p = 2, this holds on every series of at most 400 equally weighted observations.
Mathematical definition
The PNVaR at level $\alpha$ with power $p$ is:
\[\begin{align} \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{x}) &= \underset{\eta}{\min} \left\{ \eta + \frac{1}{\alpha} \left( \sum_{i=1}^{T} p_i \max(L_i - \eta,\, 0)^{p} \right)^{1/p} \right\}\,. \end{align}\]
Where:
- $\mathrm{PNVaR}_{\alpha,p}(\boldsymbol{x})$: Power Norm Value-at-Risk.
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $T$: Number of observations.
- $p > 1$: Order of the power norm.
- $L_i = -x_i$: Loss at observation $i$.
- $p_i$: Probability of observation $i$. It is $1/T$ without observation weights, and the $i$-th observation weight divided by the sum of the weights with them.
- $\eta$: Threshold of the losses.
Equation 4 of [205] states this definition with the confidence level $1 - \alpha$ in place of $\alpha$, for $p \geq 1$. For a sample, the minimum is that of a power cone programme:
\[\begin{align} \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{x}) &= \underset{\eta,\, t,\, \boldsymbol{w},\, \boldsymbol{v}}{\min} \left\{ \eta + \frac{t}{\alpha T^{1/p}} \;:\; \boldsymbol{w} \geq \boldsymbol{0},\; \sum_{i=1}^{T} v_i \leq t,\; (x_i + w_i) + \eta \geq 0,\; (v_i, t, w_i) \in \mathcal{K}_{\mathrm{pow}}(1/p)\; \forall i \right\}\,. \end{align}\]
Where:
- $t$: Power norm bound on $\boldsymbol{w}$.
- $w_i$: Excess loss of observation $i$ above the threshold $\eta$.
- $v_i$: Power term bound of observation $i$, a bound on $w_i^{p} / t^{p-1}$.
- $\mathcal{K}_{\mathrm{pow}}(p) = \{(a,b,c) : a^{p} b^{1-p} \geq |c|,\, a \geq 0,\, b \geq 0\}$: Power cone.
Equation 32 of [205] states this programme for equally weighted observations. The cone rows give $v_i \geq w_i^{p} / t^{p-1}$, so the budget row gives $t \geq \|\boldsymbol{w}\|_{p}$. Equations 4.4 and 4.5 of [206] state that encoding of the power norm.
The conic variable $\boldsymbol{w}$ is unrelated to the w field, which carries the observation weights. Write those weights $\boldsymbol{q}$. When they are present, the normalisation $T^{1/p}$ becomes $\left(\sum_{t=1}^{T} q_t\right)^{1/p}$ and the budget constraint becomes $\sum_{i=1}^{T} q_i v_i \leq t$. That weighted programme is the library's extension.
The definition has these consequences:
\[\begin{align} \mathrm{CVaR}_{\alpha}(\boldsymbol{x}) = \lim_{p \to 1} \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{x}) \leq \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{x}) &\leq \mathrm{PNVaR}_{\alpha,p'}(\boldsymbol{x}) \leq \max_{i} L_i\,, \quad 1 < p \leq p'\,. \end{align}\]
Where:
- $\mathrm{CVaR}_{\alpha}$: Conditional Value-at-Risk at the same level $\alpha$.
Section 3 of [205] states that $p = 1$ gives the Conditional Value-at-Risk, and its Equation 5 states the order in $p$. The objective is continuous in $p$, so the measure tends to the Conditional Value-at-Risk as $p$ tends to one. No order holds between the PNVaR and EntropicValueatRisk. Either of the two can be the larger on a sample.
Let $\ell = \max_i L_i$ be the largest loss, and let $\pi_\ell$ be the probability of the observations at $\ell$. For $m$ equally weighted observations at $\ell$, $\pi_\ell = m / T$. With observation weights, $\pi_\ell$ is the share of $\sum_{t=1}^{T} q_t$ that those observations carry. The objective is convex in $\eta$, and its slope just below $\eta = \ell$ is $1 - \pi_\ell^{1/p} / \alpha$. So the minimum is at $\eta = \ell$ exactly when that slope is not positive:
\[\begin{align} \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{x}) = \ell &\iff \alpha\, \pi_\ell^{-1/p} \leq 1 \iff p \geq \frac{\ln \pi_\ell}{\ln \alpha}\,. \end{align}\]
So the measure is the largest loss at every $p$ above a finite value. With equal weights and no tie, the condition is $\alpha T^{1/p} \leq 1$, that is $T \leq \alpha^{-p}$. At $\alpha = 0.05$ and $p = 2$, this is $T \leq 400$. A portfolio that minimises the measure can tie $m$ of its losses at $\ell$. This raises $\pi_\ell$ to $m / T$, so at such a portfolio the measure can equal the largest loss for $T$ up to $m\, \alpha^{-p}$.
Fields
settings: Risk measure settings.
slv: Solver or vector of solvers.
alpha: Quantile level for the lower tail. The bound isNum_SigCal, so the slot takes the level itself, anAbstractSignificanceCalibrationAlgorithmthat computes it from the prior result, or a plain function of the same five arguments.
p: Order of the power norm of the tail,p > 1. Aspfalls to one, the measure falls to the Conditional Value-at-Risk of the same series at the same level. The value does not fall asprises, and it is the largest loss of the series oncepis large enough.
w: Optional observation weights vectorobservations × 1, or a concrete subtype ofDynamicAbstractWeights. Ifnothing, the computation is unweighted.
Constructors
PowerNormValueatRisk(; settings::RiskMeasureSettings = RiskMeasureSettings(), slv::Option{<:Slv_VecSlv} = nothing, alpha::Num_SigCal = 0.05, p::Number = 2.0, w::Option{<:ObsWeights} = nothing) -> PowerNormValueatRiskKeywords correspond to the struct's fields.
Validation
- If
alphais a number:0 < alpha < 1. p > 1.- If
slvis aVecSlv:!isempty(slv). - If
wis aStatsBase.AbstractWeights, it is not empty, each entry is finite and>= 0, andsum(w) > 0, throughassert_observation_weights. ADynamicAbstractWeightsholds no weights until it reads the data, sochecked_observation_weightschecks it at evaluation, and also checks there that the weights have one entry for each observation.
Propagated parameters
factory passes its arguments on to these @fprop fields:
w: Replaced with the incomingObsWeights.
Observation weight parameters
obs_weights_view indexes these fields to the selected observations:
w: Indexed to the selected observations throughobs_weights_view.
Functor
(r::PowerNormValueatRisk)(x::VecNum)Computes the PNVaR of a portfolio returns vector x with PRM. The value equals the largest loss of x under the condition in the mathematical definition, and PRM then returns it without a solver. Otherwise it returns NaN when no solver of slv solves the programme. The functor needs a solver: with slv = nothing the call raises an IsNothingError that names slv, see checked_kernel_solver. It raises the error also under the condition in which the value is the largest loss. factory fills slv from the solver of the optimiser.
Arguments
x::VecNum: Portfolio returns vector.
Examples
julia> PowerNormValueatRisk()PowerNormValueatRisk settings ┼ RiskMeasureSettings │ scale ┼ Float64: 1.0 │ ub ┼ nothing │ rke ┴ Bool: true slv ┼ nothing alpha ┼ Float64: 0.05 p ┼ Float64: 2.0 w ┴ nothingRelated
RiskMeasureRiskMeasureSettingsConditionalValueatRisk: the value of the measure at $p = 1$.EntropicValueatRiskRelativisticValueatRiskPowerNormValueatRiskRangePowerNormDrawdownatRiskWorstRealisation: the value of the measure when the largest loss carries a probability of at least $\alpha^{p}$.PRMfactoryobs_weights_view
References
- [205] P. A. Krokhmal. Higher moment coherent risk measures. Quantitative Finance 7, 373–387 (2007). Section 3, Equations 4, 5 and 32.
- [206] P. R. Chares. Cones and interior-point algorithms for structured convex optimization involving powers and exponentials. Ph.D. Thesis, Université catholique de Louvain, Louvain-la-Neuve, Belgium (2009). Section 4.1, Equations 4.4 and 4.5.
PortfolioOptimisers.PowerNormValueatRiskRange — Type
struct PowerNormValueatRiskRange{__T_settings, __T_slv, __T_alpha, __T_beta, __T_pa, __T_pb, __T_w} <: RangeRiskMeasureMeasures the spread of the returns as the sum of the Power Norm Value-at-Risk of the losses and that of the gains.
The loss tail has the level alpha and the order pa, and the gain tail has the level beta and the order pb. Each tail equals its largest loss under the condition that PowerNormValueatRisk states.
Mathematical definition
\[\begin{align} \mathrm{PNVaRRange}_{\alpha,p_a,\beta,p_b}(\boldsymbol{x}) &= \mathrm{PNVaR}_{\alpha,p_a}(\boldsymbol{x}) + \mathrm{PNVaR}_{\beta,p_b}(-\boldsymbol{x})\,. \end{align}\]
Where:
- $\mathrm{PNVaRRange}_{\alpha,p_a,\beta,p_b}(\boldsymbol{x})$: Power Norm VaR range.
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $\mathrm{PNVaR}_{\alpha,p_a}(\boldsymbol{x})$: Power Norm Value-at-Risk of the losses at level $\alpha$ and order $p_a$.
- $\mathrm{PNVaR}_{\beta,p_b}(-\boldsymbol{x})$: Power Norm Value-at-Risk of the gains at level $\beta$ and order $p_b$.
The upper tail is the base measure applied to the negated returns $-\boldsymbol{x}$, so both tails are reported on the same sign convention and the range is their sum, not their difference.
[205] defines one tail. The range of two tails is the library's extension.
Fields
settings: Risk measure settings.
slv: Solver or vector of solvers.
alpha: Quantile level for the lower tail. The bound isNum_SigCal, so the slot takes the level itself, anAbstractSignificanceCalibrationAlgorithmthat computes it from the prior result, or a plain function of the same five arguments.
beta: Quantile level for the upper tail. The bound isNum_SigCal, so the slot takes the level itself, anAbstractSignificanceCalibrationAlgorithmthat computes it from the prior result, or a plain function of the same five arguments.
pa: Order of the power norm of the loss tail,pa > 1.
pb: Order of the power norm of the gain tail,pb > 1.
w: Optional observation weights vectorobservations × 1, or a concrete subtype ofDynamicAbstractWeights. Ifnothing, the computation is unweighted.
Constructors
PowerNormValueatRiskRange(; settings::RiskMeasureSettings = RiskMeasureSettings(), slv::Option{<:Slv_VecSlv} = nothing, alpha::Num_SigCal = 0.05, beta::Num_SigCal = alpha, pa::Number = 2.0, pb::Number = pa, w::Option{<:ObsWeights} = nothing) -> PowerNormValueatRiskRangeKeywords correspond to the struct's fields.
Validation
- If
alphais a number:0 < alpha < 1. Ifbetais a number:0 < beta < 1. pa > 1,pb > 1.- If
slvis aVecSlv:!isempty(slv). - If
wis aStatsBase.AbstractWeights, it is not empty, each entry is finite and>= 0, andsum(w) > 0, throughassert_observation_weights. ADynamicAbstractWeightsholds no weights until it reads the data, sochecked_observation_weightschecks it at evaluation, and also checks there that the weights have one entry for each observation.
Propagated parameters
factory passes its arguments on to these @fprop fields:
w: Replaced with the incomingObsWeights.
Observation weight parameters
obs_weights_view indexes these fields to the selected observations:
w: Indexed to the selected observations throughobs_weights_view.
Functor
(r::PowerNormValueatRiskRange)(x::VecNum)Computes the PNVaR Range of a portfolio returns vector x with two calls of PRM. The functor needs a solver, as the functor of PowerNormValueatRisk does.
Arguments
x::VecNum: Portfolio returns vector.
Examples
julia> PowerNormValueatRiskRange()PowerNormValueatRiskRange settings ┼ RiskMeasureSettings │ scale ┼ Float64: 1.0 │ ub ┼ nothing │ rke ┴ Bool: true slv ┼ nothing alpha ┼ Float64: 0.05 beta ┼ Float64: 0.05 pa ┼ Float64: 2.0 pb ┼ Float64: 2.0 w ┴ nothingRelated
RiskMeasureRiskMeasureSettingsPowerNormValueatRiskEntropicValueatRiskRangeGenericValueatRiskRange: the same value, with twoPowerNormValueatRisktails.range_tailsPRMfactoryobs_weights_view
References
- [205] P. A. Krokhmal. Higher moment coherent risk measures. Quantitative Finance 7, 373–387 (2007). Equation 4.
PortfolioOptimisers.PowerNormDrawdownatRisk — Type
struct PowerNormDrawdownatRisk{__T_settings, __T_slv, __T_alpha, __T_p, __T_w} <: RiskMeasureMeasures the Power Norm Drawdown-at-Risk (PNDaR), the Power Norm Value-at-Risk of the absolute drawdown series of the portfolio.
It equals the largest drawdown under the condition that PowerNormValueatRisk states, with the drawdowns in place of the losses.
Mathematical definition
Define the absolute drawdown series:
\[\begin{align} c_t &= \sum_{s=1}^{t} x_s\,, \\ d_t &= c_t - \max_{0 \leq s \leq t} c_s \leq 0\,. \end{align}\]
Where:
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $c_t$: Cumulative simple portfolio return at period $t$.
- $d_t \leq 0$: Absolute drawdown at period $t$.
The Power Norm Drawdown-at-Risk is the PNVaR of the drawdown series:
\[\begin{align} \mathrm{PNDaR}_{\alpha,p}(\boldsymbol{x}) &= \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{d}(\boldsymbol{x}))\,. \end{align}\]
Where:
- $\mathrm{PNDaR}_{\alpha,p}(\boldsymbol{x})$: Power Norm Drawdown-at-Risk.
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $p > 1$: Order of the power norm.
- $\boldsymbol{d}(\boldsymbol{x})$: Absolute drawdown series.
The order of PowerNormValueatRisk holds for the drawdowns too:
\[\begin{align} \mathrm{CDaR}_{\alpha}(\boldsymbol{x}) \leq \mathrm{PNDaR}_{\alpha,p}(\boldsymbol{x}) \leq \mathrm{PNDaR}_{\alpha,p'}(\boldsymbol{x}) \leq \mathrm{MDD}(\boldsymbol{x})\,, \quad 1 < p \leq p'\,. \end{align}\]
Where:
- $\mathrm{CDaR}_{\alpha}$: Conditional Drawdown-at-Risk at the same level $\alpha$.
- $\mathrm{MDD}(\boldsymbol{x}) = -\min_{t} d_t$: Maximum drawdown.
Equation 3.2 of [200] defines the drawdown, with the opposite sign. Neither that work nor [205] defines a power norm measure of the drawdowns, so this measure is the library's extension of them.
Fields
settings: Risk measure settings.
slv: Solver or vector of solvers.
alpha: Quantile level for the lower tail. The bound isNum_SigCal, so the slot takes the level itself, anAbstractSignificanceCalibrationAlgorithmthat computes it from the prior result, or a plain function of the same five arguments.
p: Order of the power norm of the tail,p > 1. Aspfalls to one, the measure falls to the Conditional Value-at-Risk of the same series at the same level. The value does not fall asprises, and it is the largest loss of the series oncepis large enough.
w: Optional observation weights vectorobservations × 1, or a concrete subtype ofDynamicAbstractWeights. Ifnothing, the computation is unweighted.
Constructors
PowerNormDrawdownatRisk(; settings::RiskMeasureSettings = RiskMeasureSettings(), slv::Option{<:Slv_VecSlv} = nothing, alpha::Num_SigCal = 0.05, p::Number = 2.0, w::Option{<:ObsWeights} = nothing) -> PowerNormDrawdownatRiskKeywords correspond to the struct's fields.
Validation
- If
alphais a number:0 < alpha < 1. p > 1.- If
slvis aVecSlv:!isempty(slv). - If
wis aStatsBase.AbstractWeights, it is not empty, each entry is finite and>= 0, andsum(w) > 0, throughassert_observation_weights. ADynamicAbstractWeightsholds no weights until it reads the data, sochecked_observation_weightschecks it at evaluation, and also checks there that the weights have one entry for each observation.
Propagated parameters
factory passes its arguments on to these @fprop fields:
w: Replaced with the incomingObsWeights.
Observation weight parameters
obs_weights_view indexes these fields to the selected observations:
w: Indexed to the selected observations throughobs_weights_view.
Functor
(r::PowerNormDrawdownatRisk)(x::VecNum)Computes the PNDaR of a portfolio returns vector x with PRM on its drawdown series. The functor needs a solver, as the functor of PowerNormValueatRisk does.
Arguments
x::VecNum: Portfolio returns vector.
Examples
julia> PowerNormDrawdownatRisk()PowerNormDrawdownatRisk settings ┼ RiskMeasureSettings │ scale ┼ Float64: 1.0 │ ub ┼ nothing │ rke ┴ Bool: true slv ┼ nothing alpha ┼ Float64: 0.05 p ┼ Float64: 2.0 w ┴ nothingRelated
RiskMeasureRiskMeasureSettingsPowerNormValueatRiskRelativisticDrawdownatRiskEntropicDrawdownatRiskRelativePowerNormDrawdownatRiskConditionalDrawdownatRiskMaximumDrawdownabsolute_drawdown_vecPRMfactoryobs_weights_view
References
- [200] A. Chekhlov, S. Uryasev and M. Zabarankin. Drawdown measure in portfolio optimization. International Journal of Theoretical and Applied Finance 8, 13–58 (2005). Section 3, Equation 3.2.
- [205] P. A. Krokhmal. Higher moment coherent risk measures. Quantitative Finance 7, 373–387 (2007). Equations 4 and 5.
PortfolioOptimisers.RelativePowerNormDrawdownatRisk — Type
struct RelativePowerNormDrawdownatRisk{__T_settings, __T_slv, __T_alpha, __T_p, __T_w} <: HierarchicalRiskMeasureMeasures the Relative Power Norm Drawdown-at-Risk, the Power Norm Value-at-Risk of the compounded drawdown series, for hierarchical optimisation.
It equals the largest relative drawdown under the condition that PowerNormValueatRisk states, with the drawdowns in place of the losses.
Mathematical definition
Define the relative drawdown series:
\[\begin{align} C_t &= \prod_{s=1}^{t} (1 + x_s)\,, \\ rd_t &= \frac{C_t}{\max_{0 \leq s \leq t} C_s} - 1 \leq 0\,. \end{align}\]
Where:
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $C_t$: Compound wealth process at period $t$.
- $rd_t \leq 0$: Relative drawdown at period $t$.
The Relative Power Norm Drawdown-at-Risk is the PNVaR of the relative drawdown series:
\[\begin{align} \mathrm{RPNDaR}_{\alpha,p}(\boldsymbol{x}) &= \mathrm{PNVaR}_{\alpha,p}(\boldsymbol{rd}(\boldsymbol{x}))\,. \end{align}\]
Where:
- $\mathrm{RPNDaR}_{\alpha,p}(\boldsymbol{x})$: Relative Power Norm Drawdown-at-Risk.
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $p > 1$: Order of the power norm.
- $\boldsymbol{rd}(\boldsymbol{x})$: Relative drawdown series.
Section 3 of [200] defines the drawdown of the uncompounded cumulative return only, and [205] defines the measure on a loss. Neither work defines a measure on the relative drawdown, so this measure is the library's extension of them.
Fields
settings: Risk measure settings.
slv: Solver or vector of solvers.
alpha: Quantile level for the lower tail. The bound isNum_SigCal, so the slot takes the level itself, anAbstractSignificanceCalibrationAlgorithmthat computes it from the prior result, or a plain function of the same five arguments.
p: Order of the power norm of the tail,p > 1. Aspfalls to one, the measure falls to the Conditional Value-at-Risk of the same series at the same level. The value does not fall asprises, and it is the largest loss of the series oncepis large enough.
w: Optional observation weights vectorobservations × 1, or a concrete subtype ofDynamicAbstractWeights. Ifnothing, the computation is unweighted.
Constructors
RelativePowerNormDrawdownatRisk(; settings::HierarchicalRiskMeasureSettings = HierarchicalRiskMeasureSettings(), slv::Option{<:Slv_VecSlv} = nothing, alpha::Num_SigCal = 0.05, p::Number = 2.0, w::Option{<:ObsWeights} = nothing) -> RelativePowerNormDrawdownatRiskKeywords correspond to the struct's fields.
Validation
- If
alphais a number:0 < alpha < 1. p > 1.- If
slvis aVecSlv:!isempty(slv). - If
wis aStatsBase.AbstractWeights, it is not empty, each entry is finite and>= 0, andsum(w) > 0, throughassert_observation_weights. ADynamicAbstractWeightsholds no weights until it reads the data, sochecked_observation_weightschecks it at evaluation, and also checks there that the weights have one entry for each observation.
Propagated parameters
factory passes its arguments on to these @fprop fields:
w: Replaced with the incomingObsWeights.
Observation weight parameters
obs_weights_view indexes these fields to the selected observations:
w: Indexed to the selected observations throughobs_weights_view.
Functor
(r::RelativePowerNormDrawdownatRisk)(x::VecNum)Computes the Relative PNDaR of a portfolio returns vector x with PRM on its relative drawdown series. The functor needs a solver, as the functor of PowerNormValueatRisk does.
Arguments
x::VecNum: Portfolio returns vector.
Examples
julia> RelativePowerNormDrawdownatRisk()RelativePowerNormDrawdownatRisk settings ┼ HierarchicalRiskMeasureSettings │ scale ┴ Float64: 1.0 slv ┼ nothing alpha ┼ Float64: 0.05 p ┼ Float64: 2.0 w ┴ nothingRelated
HierarchicalRiskMeasureHierarchicalRiskMeasureSettingsPowerNormDrawdownatRiskRelativeRelativisticDrawdownatRiskRelativeEntropicDrawdownatRiskrelative_drawdown_vecPRMfactoryobs_weights_view
References
- [200] A. Chekhlov, S. Uryasev and M. Zabarankin. Drawdown measure in portfolio optimization. International Journal of Theoretical and Applied Finance 8, 13–58 (2005). Section 3, Equation 3.2.
- [205] P. A. Krokhmal. Higher moment coherent risk measures. Quantitative Finance 7, 373–387 (2007). Equation 4.
References
- [200]
- A. Chekhlov, S. Uryasev and M. Zabarankin. Drawdown measure in portfolio optimization. International Journal of Theoretical and Applied Finance 8, 13–58 (2005).
- [205]
- P. A. Krokhmal. Higher moment coherent risk measures. Quantitative Finance 7, 373–387 (2007).
- [206]
- P. R. Chares. Cones and Interior-Point Algorithms for Structured Convex Optimization Involving Powers and Exponentials. Ph.D. Thesis, Université catholique de Louvain (Louvain-la-Neuve, Belgium, 2009).