sigmaquant.performance.risk.drawdown_stats#
- sigmaquant.performance.risk.drawdown_stats(returns, kind='simple', starting_value=0.0)#
Compute summary statistics for drawdowns.
- Parameters:
returns (array-like) –
Input sequence of returns or PnL values. The interpretation of the input depends on the
kindparameter.This is typically a one-dimensional array-like object such as a
numpy.ndarrayorpandas.Series.kind ({"simple", "pnl", "log"}, optional) –
Type of input values.
"simple": simple (decimal) returns, compounded multiplicatively"log": log-returns, aggregated additively"pnl": additive profit-and-loss values
starting_value – Initial cumulative level.
- Returns:
Dictionary containing drawdown magnitude and time-underwater statistics.
- Return type:
dict