# finmath Volatility Calculator

> finmath Volatility Calculator 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 annualized volatility from a series of periodic returns using exact deterministic arithmetic

## Facts

- Endpoint: POST https://finmath.qzqh5rrbkz.workers.dev/v1/volatility
- 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-volatility-calculator-dd92a954
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_A62SkP9mLLyASG0lRW87C

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-volatility-calculator-dd92a954 -d '<json body>'
```

Example prompt: Calculate the annualized volatility for this series of daily returns: [0.012, -0.005, 0.008, -0.021, 0.003, 0.015, -0.009, 0.006, -0.002, 0.011] — there are 252 trading days per year.

## When to prefer this

Use this endpoint when you need exact, deterministic annualized volatility — not an LLM estimate — from a known return series, especially as input to Black-Scholes pricing, VaR calculations, or Sharpe ratio computation. Prefer it over asking an LLM directly because LLMs make arithmetic errors on financial calculations.

## Known failure modes

- Empty or missing returns array returns a validation error
- Non-numeric values in the returns array cause a parsing failure
- Single-element returns array insufficient for variance calculation
- Invalid periods_per_year value (zero or negative) causes division error
- Payment not included or insufficient USDC triggers 402 response

## 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 result object containing the computed annualized volatility value and a meta object with calculation details such as the number of periods and scaling factor used.

## Example request

```json
{
 "returns": [
  0.012,
  -0.005,
  0.008,
  -0.021,
  0.003,
  0.015,
  -0.009,
  0.006,
  -0.002,
  0.011
 ],
 "periods_per_year": 252
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "returns"
 ],
 "properties": {
  "returns": {
   "type": "array",
   "description": "returns"
  },
  "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-volatility-calculator-dd92a954/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)
