# Investing Math: Drawdown & Recovery Calculator

> Investing Math: Drawdown & Recovery Calculator is a paid API for AI agents from invest-math.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Calculates the gain needed to recover from a percentage loss, or computes maximum drawdown and required recovery gain from a series of period returns.

## Facts

- Endpoint: GET https://invest-math.x402tookit.com/drawdown-recovery?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/investing-math-drawdown-recovery-calculator-14bd602e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MwcQhdzKDCROCz1OAscUN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability investing-math-drawdown-recovery-calculator-14bd602e
```

Example prompt: I lost 35% on my portfolio this year — how much of a gain do I need to get back to even, and how many years would that take at a 7% annual return?

## When to prefer this

Use this endpoint when you need to quantify the asymmetric math of investment losses — specifically how much more you must gain to recover from a drawdown. It handles both a simple single-loss scenario (via lossPct) and full time-series drawdown analysis (via returnsPct). Prefer this over general statistics endpoints when the core question is loss recovery or drawdown impact.

## Known failure modes

- Missing both lossPct and returnsPct parameters returns an error
- lossPct out of range (0-99.9) results in validation failure
- Malformed returnsPct string (non-numeric, wrong delimiter) causes parse error
- Empty returnsPct list returns no drawdown result
- Network timeout or service unavailability returns HTTP 402/503

## How this service works

Gain needed to recover a percentage loss, or the maximum drawdown and recovery gain from a list of period returns.

## Output

Returns the required gain percentage to recover from a loss, maximum drawdown from a period-returns series, the corresponding recovery gain needed, estimated years to recover at 7% and 10% annual returns, the input loss percentage, a plain-language summary, and optional disclaimer text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "lossPct": {
       "type": "number",
       "description": "A loss in percent, 0 to 99.9, for the gain needed to get back to even"
      },
      "returnsPct": {
       "type": "string",
       "description": "Period returns in percent, comma separated, e.g. 5,-10,3 (instead of lossPct)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "lossPct": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "yearsAt7Pct": {
       "type": [
        "null",
        "number"
       ]
      },
      "yearsAt10Pct": {
       "type": [
        "null",
        "number"
       ]
      },
      "requiredGainPct": {
       "type": [
        "null",
        "number"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/investing-math-drawdown-recovery-calculator-14bd602e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from invest-math.x402tookit.com](https://www.zero.xyz/host/invest-math.x402tookit.com/llms.txt)
