# maxdrawdown

Compute maximum drawdown for one or more price series

## Syntax

```MaxDD = maxdrawdown(Data)
MaxDD = maxdrawdown(Data, `Format`)
[MaxDD, MaxDDIndex] = maxdrawdown(Data, `Format`)
```

## Arguments

 `Data` `T`-by-`N` matrix with `T` samples of `N` total return price series (also known as total equity). `Format` (Optional) MATLAB® character vector indicating format of data. Possible values are: `'return'` (default) — Maximum drawdown in terms of maximum percentage drop from a peak. `'arithmetic'` — Maximum drawdown of an arithmetic Brownian motion with drift (differences of data from peak to trough) using the equation`$dX\left(t\right)=\mu dt+\sigma dW\left(t\right).$` `'geometric'` — Maximum drawdown of a geometric Brownian motion with drift (differences of log of data from peak to trough) using the equation`$dS\left(t\right)={\mu }_{0}S\left(t\right)dt+{\sigma }_{0}S\left(t\right)dW\left(t\right)$`

## Description

`MaxDD = maxdrawdown(Data, Format)` computes maximum drawdown for each series in an `N`-vector `MaxDD` and identifies start and end indexes of maximum drawdown periods for each series in a `2`-by-`N` matrix `MaxDDIndex`.

To summarize the outputs of `maxdrawdown`:

• `MaxDD` is a `1`-by-`N` vector with maximum drawdown for each of `N` time series.

• `MaxDDIndex` is a `2`-by-`N` vector of start and end indexes for each maximum drawdown period for each total equity time series, where the first row contains the start indexes and the second row contains the end indexes of each maximum drawdown period.

 Notes   Drawdown is the percentage drop in total returns from the start to the end of a period. If the total equity time series is increasing over an entire period, drawdown is 0. Otherwise, it is a positive number. Maximum drawdown is an ex-ante proxy for downside risk that computes the largest drawdown over all intervals of time that can be formed within a specified interval of time. Maximum drawdown is sensitive to quantization error.

## Examples

See Maximum Drawdown.

## References

Christian S. Pederson and Ted Rudholm-Alfvin, "Selecting a Risk-Adjusted Shareholder Performance Measure," Journal of Asset Management, Vol. 4, No. 3, 2003, pp. 152–172.