# MAXDD

## Description

Calculate the maximum drawdown for one or more time series of asset (or portfolio) returns. Maximum drawdown is the measure of peak to through and is typically used as an indicator of downside risk for historical data.

## Syntax

The following describes the function signature for use in Microsoft Excel's formula bar.

```excel-formula
=MAXDD(returns, dataPeriodicity, isAppendIndex)
```

### Input(s)

| Argument            | Description                                                                                                                                                                                                             |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **returns**         | Required. Vector or matrix of time series returns.                                                                                                                                                                      |
| **dataPeriodicity** | <p>Optional. Periodicity of the data, used for annualization. If you do not enter the argument, it defaults to 1. <br><em>e.g. Daily = 255, Monthly = 12,  Yearly = 1, Quarterly = 4.</em></p>                          |
| **isAppendIndex**   | Optional. Logical (TRUE or FALSE), when set to TRUE, the function will append the start and end index positions of the respective max drawdown periods. If not specified, the function defaults this argument to FALSE. |

### Output(s)

The function returns a vector of maximum drawdown estimates, $$mdd$$&#x20;

&#x20;$$\text{output}=\begin{bmatrix}mdd\_1 & mdd\_2 & \ldots & mdd\_N\end{bmatrix}$$&#x20;

When `isAppendIndex` is set to `TRUE`, the function appends the start index, $$p$$ , and end index, $$q$$ , of the corresponding maximum drawdown periods.

$$\text{output}=\begin{bmatrix}mdd\_1 & mdd\_2 & \ldots & mdd\_N \ p\_1 & p\_2 & \ldots & p\_N \ q\_1 & q\_2 & \ldots & q\_N  \end{bmatrix}$$&#x20;

## Example

![](https://258561627-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK66-MGuoULhqCDXLwy%2F-MMudx1pLzAPHwndGjQH%2F-MMunU659UZpi7CYcujK%2Fimage.png?alt=media\&token=d5809c97-5ee4-44a0-b66b-c9c533f69359)

{% file src="<https://258561627-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MK66-MGuoULhqCDXLwy%2F-MQVBCgvIH9i-QazFsZo%2F-MMunjwTgLENy8PgClAW%2FMAXDD.xlsx?alt=media&token=3e4e26fc-6b71-49d5-9d0c-340a31ecf1c5>" %}
Example Workbook: MAXDD
{% endfile %}
