# finmath CAGR from Series

> finmath CAGR from Series is a paid API for AI agents from finmath.qzqh5rrbkz.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Computes the Compound Annual Growth Rate (CAGR) from a time series of values, with configurable periods-per-year.

## Facts

- Endpoint: POST https://finmath.qzqh5rrbkz.workers.dev/v1/cagr_from_series
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/finmath-cagr-from-series-d67a1f53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PF3toGTerRi3Q-ei2STqM

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 finmath-cagr-from-series-d67a1f53 -d '<json body>'
```

Example prompt: Calculate the exact CAGR from this series of annual portfolio values — [100000, 112000, 125440, 140492] — with 1 period per year, using deterministic math so I get the precise annualized growth rate.

## When to prefer this

Use this endpoint when you need a deterministic, exact CAGR calculation from a sequence of values — especially when LLM-native arithmetic is unreliable or when auditability matters. Prefer this over asking an LLM to compute CAGR directly, over spreadsheet-style tooling, or when the series frequency is non-annual (use periods_per_year to normalize). Ideal for portfolio performance reporting, fund analysis, and any workflow requiring reproducible finance math.

## Known failure modes

- Too few values in the series (fewer than 2 data points) — likely returns a validation error
- Non-numeric or null values in the array — likely returns a parsing or computation error
- periods_per_year set to zero or negative — division error or invalid parameter response
- Malformed JSON body — 400 Bad Request
- Payment not included or insufficient — 402 Payment Required

## How this service works

Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.

## Output

Returns a JSON object with a 'result' field containing the computed CAGR as a decimal (e.g. 0.12 for 12% annual growth), plus a 'meta' object with computation details such as the number of periods and annualization factor used.

## Example request

```json
{
 "values": [
  100,
  110,
  121,
  133.1
 ],
 "periods_per_year": 1
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "values"
 ],
 "properties": {
  "values": {
   "type": "array",
   "description": "values"
  },
  "periods_per_year": {
   "type": "number",
   "description": "periods_per_year"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "result",
  "meta"
 ],
 "properties": {
  "meta": {
   "type": "object"
  },
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/finmath-cagr-from-series-d67a1f53/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finmath.qzqh5rrbkz.workers.dev](https://www.zero.xyz/host/finmath.qzqh5rrbkz.workers.dev/llms.txt)
