(py: Python<'_>, parent: &Bound<'_, PyModule>)
| 62 | } |
| 63 | |
| 64 | /// Conditional drawdown at risk: the mean of the worst `1 - confidence_level` share of drawdowns. |
| 65 | /// |
| 66 | /// Chekhlov, Uryasev and Zabarankin (2005). The drawdown is `running_max(returns) - returns`, |
| 67 | /// in the units of the input. The threshold is the "higher" `confidence_level`-quantile of the |
| 68 | /// drawdowns and every drawdown at or above it is averaged, so the tail is never empty. |
| 69 | /// |
| 70 | /// Despite its name (kept so existing keyword calls work), `returns` must be a cumulative |
| 71 | /// series such as an equity curve, a price or a cumulative return, not per-period returns. |
| 72 | /// `confidence_level` is the upper-tail level (0.95 averages the worst 5%), the opposite of |
| 73 | /// `calculate_value_at_risk`, which takes the lower-tail probability (0.05). |
| 74 | /// |
| 75 | /// Parameters |
| 76 | /// ---------- |
| 77 | /// returns : list[float] |
| 78 | /// Cumulative series (equity curve, price or cumulative return), oldest first. |
| 79 | /// confidence_level : float |
nothing calls this directly
no outgoing calls
no test coverage detected