Skip to main content

max_drawdown_duration

Function max_drawdown_duration 

Source
pub fn max_drawdown_duration(equity: &[Decimal]) -> Result<usize, MetricsError>
Expand description

Calculate maximum drawdown duration in periods.

Duration is the number of periods from peak to recovery (or end if not recovered).

§Arguments

  • equity - Equity curve

§Returns

Maximum number of periods spent in drawdown.