mdd#
- swordfish.function.mdd()#
Alias for maxDrawdown. Calculate the maximum drawdown for the input X. Null values are ignored in calculation.
- Parameters:
X (Constant) – A numeric vector, indicating the input data for calculating maximum drawdown (MDD), commonly cumulative return (or rate).
ratio (Constant, optional) –
A Boolean scalar indicating whether to express the MDD in ratio or absolute value.
true (default): Return the ratio of MDD over the peak.
false: Return the absolute value of MDD.
- Returns:
A scalar of the same type as X.
- Return type: