# Portfolio Stats – Annualized Volatility

> Portfolio Stats – Annualized Volatility 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 annualized volatility (sample standard deviation of returns) from a supplied price or return series, with optional annualization period.

## Facts

- Endpoint: GET https://portfolio-stats.x402tookit.com/volatility?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-annualized-volatility-82fba33e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_byp5z6TXvG3KK0U1YYtOn

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-annualized-volatility-82fba33e
```

Example prompt: Can you calculate the annualized volatility from these daily closing prices, oldest first: 100, 101.5, 99.8, 102.3, 103.1, 101.7, 104.2? Use 252 periods per year.

## When to prefer this

Choose this endpoint when you need a fast, stateless computation of annualized historical volatility from a raw price or return series you already have in hand. It is ideal for portfolio risk dashboards, agent-driven quantitative analysis, or any workflow that requires a quick volatility figure without connecting to market data APIs. Prefer it over general-purpose statistics tools because it is finance-domain-specific and handles both price-to-return conversion and annualization automatically.

## Known failure modes

- Missing both prices and returns parameters — endpoint requires one of the two
- Too many data points supplied (limit is 1000)
- Malformed price/return array (non-numeric values or invalid JSON)
- Fewer than 2 data points provided (cannot compute standard deviation)
- Invalid periodsPerYear value causing annualization error

## How this service works

Annualized volatility (sample standard deviation of returns) from a price or return series you supply. Not advice.

## Output

Returns annualized volatility as both a decimal and percentage, period volatility, mean return per period, observation count, periods-per-year used, and an input kind label. Also includes a summary, disclaimer, and educational-only notice clarifying the result is not investment advice.

## 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"
      },
      "periodsPerYear": {
       "type": "integer",
       "description": "Periods per year for annualising: 252 daily (default), 52 weekly, 12 monthly"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "inputKind": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "observations": {
       "type": [
        "null",
        "number"
       ]
      },
      "periodsPerYear": {
       "type": [
        "null",
        "number"
       ]
      },
      "educationalOnly": {
       "type": [
        "null",
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/portfolio-stats-annualized-volatility-82fba33e/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)
