Rolling Max Drawdown Pass Node
Rolling Maximum Drawdown — Series Input
Overview
The Rolling Max Drawdown Pass Node computes the maximum peak-to-trough decline within a rolling window. It measures the worst loss experienced within any rolling period, expressed as a positive fraction.
Unlike the Drawdown node (which tracks cumulative drawdown from the all-time peak), Rolling Max Drawdown resets each window — ideal for regime-aware risk management or strategy evaluation.
Formula
Parameters
| Parameter | Default | Description |
|---|---|---|
| period | 20 | Rolling window in bars |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Any positive numeric series (equity curve, price) |
| values | Output | (number | null)[] | Rolling max drawdown in [0, 1]; nulls during warm-up |
| timestamps | Output | number[] | Unix timestamps aligned to input |
Use Cases
Position Sizing Risk Control
Scale position size inversely to rolling max drawdown — reduce exposure when recent drawdowns are elevated.
Strategy Stop Condition
Pause a strategy if rolling MDD exceeds a threshold (e.g. 10%) — an automated circuit breaker for drawdown-sensitive strategies.
Regime Identification
High rolling MDD periods correspond to volatile or trending regimes; low rolling MDD indicates calmer, range-bound conditions.
Tips & Best Practices
Apply to Equity Curves
Most useful when applied to a strategy's cumulative equity series, not raw price — measures the strategy's own recent worst-case loss.
Rolling vs Cumulative
Rolling MDD resets each window and may be lower than the lifetime MDD. For worst-ever drawdown from inception, use the Drawdown node instead.
Use in Calmar Ratio
Divide annualised return by rolling max drawdown to build a rolling Calmar ratio for dynamic performance evaluation.