# maxdrawdown

From tseries v0.8-0
by Kurt Hornik

##### Maximum Drawdown or Maximum Loss

This function computes the maximum drawdown or maximum loss of the
univariate time series (or vector) `x`

.

- Keywords
- ts

##### Usage

`maxdrawdown(x)`

##### Arguments

- x
- a numeric vector or univariate time series.

##### Details

The max drawdown or max loss statistic is defined as the maximum
value drop after one of the peaks of `x`

. For financial
instruments the max drawdown represents the worst investment loss for
a buy-and-hold strategy invested in `x`

.

##### Value

- A double representing the max drawdown or max loss statistic.

##### Examples

```
x <- c(1:10, 9:7, 8:14, 13:8, 9:20)
maxdrawdown(x)
plot(x)
lines(x = c(20, 28), y = c(14, 14), col="grey")
lines(x = c(20, 28), y = c(8, 8), col="grey")
arrows(26, 14, 26, 8, , col="red", length = 0.16)
```

*Documentation reproduced from package tseries, version 0.8-0, License: GPL (see file COPYING), except for ./src/muin2ser.f and ./misc which are free for non-commercial purposes. See file README for details.*

### Community examples

Looks like there are no examples yet.