# Portfolio Stats – Equity Curve Summary

> Portfolio Stats – Equity Curve Summary is a paid API for AI agents from portfolio-stats.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Computes a comprehensive equity-curve summary (CAGR, volatility, Sharpe, Sortino, Calmar, max drawdown, best/worst period) from a price or return series you supply.

## Facts

- Endpoint: GET https://portfolio-stats.x402tookit.com/equity-curve?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/portfolio-stats-equity-curve-summary-1fc5ebb5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dN2X2O7ekIWQJdXIbtc0y

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 portfolio-stats-equity-curve-summary-1fc5ebb5
```

Example prompt: Can you give me a full equity-curve summary — CAGR, Sharpe, Sortino, max drawdown, best and worst period — for this daily price series [100, 102, 101, 105, 103, 108, 107, 110], treating it as 252 trading days per year with a 4% annual risk-free rate?

## When to prefer this

Choose this endpoint when you need a single call that returns the full suite of equity-curve performance metrics at once — CAGR, Sharpe, Sortino, Calmar, drawdown, and best/worst period — rather than calling individual sibling endpoints for each statistic separately. Ideal when summarizing a strategy, fund, or portfolio for reporting or comparison purposes and you want one comprehensive result object.

## Known failure modes

- Fewer than 2 data points provided — returns error or degraded result
- Both prices and returns supplied simultaneously — ambiguous input rejected
- Invalid JSON format in prices or returns query parameter
- periodsPerYear set to 0 or negative — causes division errors
- All returns are identical or zero — Sharpe/Sortino undefined
- Input series longer than 1000 periods — truncated or rejected
- Network or payment failure returns 402/503

## How this service works

Equity-curve summary of a price or return series you supply: CAGR, volatility, Sharpe, drawdown, best and worst period.

## Output

Returns a structured JSON object with: CAGR (%), annualized volatility, Sharpe ratio, Sortino ratio, Calmar ratio, maximum drawdown (with peak/trough indices), best and worst period returns, start and end values, number of periods, elapsed years, a human-readable summary/verdict, and optional warnings or degraded-quality flags if inputs are too short or degenerate.

## 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": {
      "unit": {
       "type": "string",
       "description": "decimal (default, 0.01 = 1%) or percent (1 = 1%); applies to returns only"
      },
      "prices": {
       "type": "string",
       "description": "Price series, oldest first, JSON like [100,101,99.5] or 100,101,99.5 (up to 1000). Give prices OR returns"
      },
      "returns": {
       "type": "string",
       "description": "Period returns, oldest first, decimals by default (0.01 = 1%). Give returns OR prices"
      },
      "startValue": {
       "type": "number",
       "description": "Starting value when you give returns (default 100); ignored for prices"
      },
      "periodsPerYear": {
       "type": "integer",
       "description": "Periods per year for annualising: 252 daily (default), 52 weekly, 12 monthly"
      },
      "riskFreeRatePct": {
       "type": "number",
       "description": "Annual risk-free rate in percent for Sharpe and Sortino (default 0)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "years": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "cagrPct": {
       "type": [
        "null",
        "number"
       ]
      },
      "periods": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/portfolio-stats-equity-curve-summary-1fc5ebb5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from portfolio-stats.x402tookit.com](https://www.zero.xyz/host/portfolio-stats.x402tookit.com/llms.txt)
