maxdrawdown

Compute maximum drawdown for one or more price series

Description

example

MaxDD = maxdrawdown(Data) 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.

example

MaxDD = maxdrawdown(___,Format) adds an optional argument for Format.

example

[MaxDD,MaxDDIndex] = maxdrawdown(___) adds an optional output for MaxDDIndex.

Examples

collapse all

Calculate the maximum drawdown (MaxDD) using example data with a fund, market, and cash series:

load FundMarketCash
MaxDD = maxdrawdown(TestData)
MaxDD = 1×3

    0.1658    0.3381         0

The maximum drop in the given time period was 16.58% for the fund series, and 33.81% for the market series. There was no decline in the cash series, as expected, because the cash account never loses value.

Input Arguments

collapse all

Total return price series, specified as a T-by-N matrix with T samples of N total return price series.

Data Types: double

Format of Data, specified as character vector with the following possible values:

  • '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(t)=μdt+σdW(t).

  • 'geometric'

    — Maximum drawdown of a geometric Brownian motion with drift (differences of log of data from peak to trough) using the equation

    dS(t)=μ0S(t)dt+σ0S(t)dW(t)

Data Types: char

Output Arguments

collapse all

Maximum drawdown, returned as a 1-by-N vector with maximum drawdown for each of N time series.

Note

  • 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.

Start and end indexes for each maximum drawdown period for each total equity time series, returned as a 2-by-N vector of start and end indexes. The first row of the vector contains the start indexes and the second row contains the end indexes of each maximum drawdown period.

References

[1] 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.

Introduced in R2006b