# Drawdown (economics)

The drawdown is the measure of the decline from a historical peak in some variable (typically the cumulative profit or total open equity of a financial trading strategy).
Somewhat more formally, if X(t), t≥0{\textstyle X(t), \;t\geq 0} is a stochastic process with X(0)=0{\textstyle X(0)=0}, the drawdown at time $T$, denoted D(T){\textstyle D(T)}, is defined as:$D(T)=\max _{t\in (0,T)}X(t)-X(T)$The average drawdown (AvDD) up to time $T$ is the time average of drawdowns that have occurred up to time $T$:$\operatorname {AvDD} (T)={1 \over T}\int _{0}^{T}D(t)\,dt$The maximum drawdown (MDD) up to time $T$ is the maximum of the drawdown over the history of the variable. More formally, the MDD is defined as:$\operatorname {MDD} (T)=\max _{\tau \in (0,T)}D(\tau )=\max _{\tau \in (0,T)}\left[\max _{t\in (0,\tau )}X(t)-X(\tau )\right]$

## Pseudocode

The following pseudocode computes the Drawdown ("DD") and Max Drawdown ("MDD") of the variable "NAV", the Net Asset Value of an investment. Drawdown and Max Drawdown are calculated as percentages:

## Trading definitions

There are two main definitions of a drawdown:

### 1. How low it goes (the magnitude)

    Put plainly, a drawdown is the “pain” period experienced by an investor between a peak (new highs) and subsequent valley (a low point before moving higher) in the value of an investment.
    The Maximum Drawdown, more commonly referred to as Max DD, is the worst (the maximum) peak to valley loss since the investment’s inception.
In finance, the use of the maximum drawdown is an indicator of risk through the use of three performance measures: the Calmar ratio, the Sterling ratio and the Burke ratio. These measures can be considered as a modification of the Sharpe ratio in the sense that the numerator is always the excess of mean returns over the risk-free rate while the standard deviation of returns in the denominator is replaced by some function of the drawdown.

### 2. How long it lasts (the duration)

    The drawdown duration is the length of any peak to peak period, or the time between new equity highs.
    The max drawdown duration is the worst (the maximum/longest) amount of time an investment has seen between peaks (equity highs).
Many assume Max DD Duration is the length of time between new highs during which the Max DD (magnitude) occurred. But that isn't always the case. The Max DD duration is the longest time between peaks, period. So it could be the time when the program also had its biggest peak to valley loss (and usually is, because the program needs a long time to recover from the largest loss), but it doesn't have to be.
When $X$ is Brownian motion with drift, the expected behavior of the MDD as a function of time is known. If $X$ is represented as:$X(t)=\mu t+\sigma W(t)$Where $W(t)$ is a standard Wiener process, then there are three possible outcomes based on the behavior of the drift $\mu$:
* $\mu >0$ implies that the MDD grows logarithmically with time
* $\mu =0$ implies that the MDD grows as the square root of time
* $\mu <0$ implies that the MDD grows linearly with time

## Banking or other finance definitions
### Credit offered

Where an amount of credit is offered, a drawdown against the line of credit results in a debt (which may have associated interest terms if the debt is not cleared according to an agreement.)

### Funds offered

Where funds are made available, such as for a specific purpose, drawdowns occur if the funds – or a portion of the funds – are released when conditions are met.

## Optimization of drawdown

A passing glance at the mathematical definition of drawdown suggests significant difficulty in using an optimization framework to minimize the quantity, subject to other constraints; this is due to the non-convex nature of the problem. However, there is a way to turn the drawdown minimization problem into a linear program.
The authors start by proposing an auxiliary function $\Delta _{\alpha }(x)$, where $x\in \mathbb {R} ^{p}$ is a vector of portfolio returns, that is defined by:$\Delta _{\alpha }(x)=\min _{\zeta }\left\{\zeta +{1 \over {(1-\alpha )T}}\int _{0}^{T}[D(x,t)-\zeta ]_{+}\,dt\right\}$They call this the conditional drawdown-at-risk (CDaR); this is a nod to conditional value-at-risk (CVaR), which may also be optimized using linear programming. There are two limiting cases to be aware of:
* lim$_{α→0}$Δ$_α$(x){\textstyle \lim _{\alpha \rightarrow 0}\Delta _{\alpha }(x)} is the average drawdown
* lim$_{α→1}$Δ$_α$(x){\textstyle \lim _{\alpha \rightarrow 1}\Delta _{\alpha }(x)} is the maximum drawdown