Drawdown
Peak-to-trough decline in portfolio value.
Maximum drawdown (MaxDD) is the largest loss from a peak before a new peak is reached. A MaxDD of −30% means the portfolio once fell 30% from its high. It is a key risk metric alongside volatility.
Example
maxdd = (cum_ret / cum_ret.cummax() - 1).min()