sigmaquant.performance.risk.time_underwater#

sigmaquant.performance.risk.time_underwater(drawdown)#

Count consecutive underwater periods.

An underwater period is defined as a period where the drawdown is strictly negative.

Parameters:

drawdown – Drawdown time series.

Returns:

Time series of consecutive underwater counts. The value is zero when the system is not underwater and increases sequentially during each underwater spell.

Return type:

pandas.Series