Skip to content

Superseded (2026-05-25) — this operator is a Layer-1 transform, not a Layer-0 atomic input. Merged into drawdown_series_v1. Kept for history.

What (One-liner)

Calculates drawdown series + max drawdown from daily returns. Library-level primitive, core dependency for portfolio risk metrics.

How to use

python
from services.algo.time_series import drawdown_series
dd_series, max_dd = drawdown_series(returns)
# max_dd = -0.23 means 23% max drawdown

Core formulas

cum_t = Π(1 + r_i) for i in 1..t  (起始 1.0)
running_max_t = max(cum_1, ..., cum_t)
dd_t = (cum_t - running_max_t) / running_max_t   ∈ (-1, 0]
max_dd = min(dd_series)

Assumptions & applicability

Assumptions: simple returns (not log) + compounding + starting 1.0.

Applicable: backtest performance, CPPI, fund fact-sheet.

Not applicable: price series input, log returns, n<2.

Known limitations

  1. No recovery time output
  2. Starting point 1.0 (not actual capital)
  3. log returns will have second-order error

References

Magdon-Ismail & Atiya (2004) + Chekhlov et al. (2005) optimization embedding.

Golden Test

tests/golden/fixtures/tier1/drawdown_series/, 1e-12 tolerance, 2026-04-20 passing.

Changelog

  • 1.0.0 (2026-04-20) — First Active

Verifiable intelligence for the decisions that demand scrutiny.