Maximum Drawdown
PortfolioOptimisers.MaximumDrawdown — Type
struct MaximumDrawdown{__T_settings} <: RiskMeasureMeasures the Maximum Drawdown, the deepest fall of the uncompounded cumulative return below its running peak.
The drawdown series is the one of absolute_drawdown_vec: the cumulative return is a sum of the returns, and its running peak starts at $c_0 = 0$. A first return that is negative is thus a drawdown. RelativeMaximumDrawdown takes the deepest point of the compounded drawdown series.
Mathematical definition
\[\begin{align} \mathrm{MDD}(\boldsymbol{x}) &= -\min_{1 \leq t \leq T} d_t\,. \end{align}\]
Where:
- $\mathrm{MDD}(\boldsymbol{x})$: Maximum drawdown.
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $d_t \leq 0$: Absolute drawdown at period $t$.
absolute_drawdown_vecstates the series. - $T$: Number of observations.
A path that never falls below its running peak has a Maximum Drawdown of zero. The measure is the limit of DrawdownatRisk and of ConditionalDrawdownatRisk as alpha falls to zero, and it is the WorstRealisation of the drawdown series. The measure takes no observation weights, because a positive weight does not change the deepest point of a series.
Algorithm
- Compute the drawdown series
ddwithabsolute_drawdown_vec. - Return the negated minimum of
dd.
Fields
settings: Risk measure settings.
Constructors
MaximumDrawdown(; settings::RiskMeasureSettings = RiskMeasureSettings()) -> MaximumDrawdownKeywords correspond to the struct's fields.
Functor
(r::MaximumDrawdown)(x::VecNum)Computes the Maximum Drawdown of a portfolio returns vector x.
Arguments
x::VecNum: Portfolio returns vector.
Examples
julia> MaximumDrawdown()MaximumDrawdown settings ┼ RiskMeasureSettings │ scale ┼ Float64: 1.0 │ ub ┼ nothing │ rke ┴ Bool: trueOn the path of AverageDrawdown, the drawdown series is [0, -0.25, -0.1875, -0.3125, 0].
julia> x = [0.125, -0.25, 0.0625, -0.125, 0.375];julia> MaximumDrawdown()(x)0.3125Related
RiskMeasureRiskMeasureSettingsAverageDrawdownDrawdownatRiskConditionalDrawdownatRiskWorstRealisationRelativeMaximumDrawdown
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.1, Definition 3.2, Equation 3.3.
PortfolioOptimisers.RelativeMaximumDrawdown — Type
struct RelativeMaximumDrawdown{__T_settings} <: HierarchicalRiskMeasureMeasures the Relative Maximum Drawdown, the deepest fall of the compounded wealth below its running peak, as a fraction of that peak.
The drawdown series is the one of relative_drawdown_vec: the wealth compounds the returns, and its running peak starts at $C_0 = 1$. MaximumDrawdown takes the deepest point of the uncompounded series. The compounded wealth is a product of linear functions of the weights, so the library states no JuMP formulation of the measure, and it is a HierarchicalRiskMeasure.
Mathematical definition
\[\begin{align} \mathrm{RMDD}(\boldsymbol{x}) &= -\min_{1 \leq t \leq T} rd_t\,. \end{align}\]
Where:
- $\mathrm{RMDD}(\boldsymbol{x})$: Relative maximum drawdown.
- $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
- $rd_t \leq 0$: Relative drawdown at period $t$.
relative_drawdown_vecstates the series. - $T$: Number of observations.
The measure is the limit of RelativeConditionalDrawdownatRisk as alpha falls to zero. It is never above one when every return is above $-1$, because the wealth then stays positive.
Section 3 of [200] defines the drawdown of the uncompounded cumulative return only. It names the relative drawdown and states that it lacks the properties of the absolute drawdown, but it defines no measure on it. The deepest point of the relative drawdown series is the library's extension of that work.
Algorithm
- Compute the relative drawdown series
ddwithrelative_drawdown_vec. - Return the negated minimum of
dd.
Fields
settings: Risk measure settings.
Constructors
RelativeMaximumDrawdown(; settings::HierarchicalRiskMeasureSettings = HierarchicalRiskMeasureSettings()) -> RelativeMaximumDrawdownKeywords correspond to the struct's fields.
Functor
(r::RelativeMaximumDrawdown)(x::VecNum)Computes the Relative Maximum Drawdown of a portfolio returns vector x.
Arguments
x::VecNum: Portfolio returns vector.
Examples
julia> RelativeMaximumDrawdown()RelativeMaximumDrawdown settings ┼ HierarchicalRiskMeasureSettings │ scale ┴ Float64: 1.0On the path of AverageDrawdown, the deepest point of the compounded wealth is 30.27 % below its peak, which is less than the 0.3125 of the uncompounded series.
julia> x = [0.125, -0.25, 0.0625, -0.125, 0.375];julia> RelativeMaximumDrawdown()(x)0.302734375Related
HierarchicalRiskMeasureHierarchicalRiskMeasureSettingsMaximumDrawdownRelativeAverageDrawdownRelativeConditionalDrawdownatRisk
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.
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).