skfolio.measures.get_drawdowns#
- skfolio.measures.get_drawdowns(returns, compounded=False)[source]#
Compute the drawdowns’ series from the returns.
- Parameters:
- returnsndarray of shape (n_observations,) or (n_observations, n_assets)
Array of return values.
- compoundedbool, default=False
If this is set to True, the cumulative returns are compounded otherwise they are uncompounded.
- Returns:
- values: ndarray of shape (n_observations,) or (n_observations, n_assets)
Drawdowns.
Notes
NaN handling: Missing values (NaNs) remain at their original locations in the output and are treated as neutral elements during accumulation, so they do not propagate to subsequent values.