# Maximum Drawdown Calculator

> Scans a series of portfolio or equity values in time order for the largest percentage fall from a running peak, reporting the peak and trough values and positions, whether the peak was regained, and the drawdown at the end of the series.

- Calculator id: `max-drawdown` · Category: Investing & Real Estate (`investing`) · Tool name: `calculate_max_drawdown`
- Canonical page: https://tttkmbb.com/investing/max-drawdown · This document: https://tttkmbb.com/investing/max-drawdown.md · JSON definition: https://tttkmbb.com/investing/max-drawdown.json

## Purpose

Scans a series of portfolio or equity values in time order for the largest percentage fall from a running peak, reporting the peak and trough values and positions, whether the peak was regained, and the drawdown at the end of the series.

**Use when:** You want the worst historical loss of a strategy, fund or portfolio from a list of values, or the current distance below its high-water mark.

**Do not use when:** You need volatility-based risk (use sharpe-ratio or descriptive-statistics) or your data are period returns rather than values (convert them to a cumulative value series first). Informational only; not financial advice.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `values` | number_list |  | required | Portfolio values, prices or equity-curve points from oldest to newest (2–500 values, all greater than 0). |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `max_drawdown_percent` | number | % | Largest loss from a peak to a later trough, as a positive percentage of the peak. |
| `max_drawdown_amount` | number |  | peak_value − trough_value. |
| `peak_value` | number |  | Value at the start of the maximum drawdown. |
| `trough_value` | number |  | Lowest value after that peak. |
| `peak_index` | integer |  | 0-based position of the peak in the list. |
| `trough_index` | integer |  | 0-based position of the trough. |
| `drawdown_length_periods` | integer |  | trough_index − peak_index. |
| `recovered` | boolean |  | True when a later value reached or exceeded the peak value. |
| `recovery_index` | integer |  | 0-based position of the first value at or above the peak after the trough (only when recovered). |
| `current_drawdown_percent` | number | % | Fall of the last value from the running peak of the whole series, as a positive percentage (0 at a new high). |

## Formula

`drawdown_t = (max_{s≤t} values[s] − values[t]) / max_{s≤t} values[s]; max_drawdown_percent = 100 × max_t drawdown_t; current_drawdown_percent = 100 × drawdown_n`

Drawdown is measured from the running maximum (high-water mark); the first drawdown that reaches the maximum depth is reported. Values must be positive for the percentage to be defined. Informational mathematics only; not financial advice.

## Data Sources

- Wikipedia – Drawdown (economics) — https://en.wikipedia.org/wiki/Drawdown_(economics) (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/max-drawdown?values=…`
- `POST https://tttkmbb.com/api/v1/calculate/max-drawdown` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/max-drawdown · OpenAPI operationId `calculate_max_drawdown` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "max-drawdown", "inputs": {…}}`

## Example

- 100, 120, 90, 110, 80, 130: inputs `{"values":[100,120,90,110,80,130]}` → `{"max_drawdown_percent":33.33,"max_drawdown_amount":40,"peak_value":120,"trough_value":80,"peak_index":1,"trough_index":4,"drawdown_length_periods":3,"recovered":true,"recovery_index":5,"current_drawdown_percent":0}`
- 1000, 1100, 1050, 900, 950, 1000, 1080 (not recovered): inputs `{"values":[1000,1100,1050,900,950,1000,1080]}` → `{"max_drawdown_percent":18.18,"peak_value":1100,"trough_value":900,"peak_index":1,"trough_index":3,"recovered":false,"current_drawdown_percent":1.82}`

```
GET https://tttkmbb.com/api/v1/calculate/max-drawdown?values=100%2C120%2C90%2C110%2C80%2C130
```

## Limitations

You need volatility-based risk (use sharpe-ratio or descriptive-statistics) or your data are period returns rather than values (convert them to a cumulative value series first). Informational only; not financial advice. Drawdown is measured from the running maximum (high-water mark); the first drawdown that reaches the maximum depth is reported. Values must be positive for the percentage to be defined. Informational mathematics only; not financial advice. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why is the drawdown reported as a positive number?**

It is the size of the loss from the peak; a 33.33 % drawdown means the value fell to 66.67 % of its peak. A gain of 50 % is then needed to recover.

**Can I enter returns instead of values?**

Convert them first: start at 100 and multiply by (1 + return) each period to get a value series, then enter those values.

## Related

- [Sharpe Ratio Calculator](https://tttkmbb.com/investing/sharpe-ratio.md) — Volatility-based risk-adjusted return.
- [Descriptive Statistics Calculator](https://tttkmbb.com/statistics/descriptive-statistics.md) — Mean and standard deviation of the same series.
- [Percentage Change Calculator](https://tttkmbb.com/math/percentage-change.md) — Gain needed to recover from a given loss.
