# 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

![](/files/-MMunU659UZpi7CYcujK)

{% file src="/files/-MMunjwTgLENy8PgClAW" %}
Example Workbook: MAXDD
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://excelhelp.windhamlabs.com/functions/exposure-to-loss/maxdd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
