# QuantOracle Correlation Matrix

> QuantOracle Correlation Matrix is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-14).

Computes a Pearson (or other method) correlation matrix and covariance matrix for multiple numeric time series, with optional eigenvalue decomposition

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/stats/correlation-matrix
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-0335dab2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_o_ZmQx8AyeapDNve1LD_P

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 api-quantoracle-dev-0335dab2 -d '<json body>'
```

Example prompt: Can you compute a Pearson correlation matrix with eigenvalues for these three return series — Series_A: [1, 2.5, 3.2, 4.1, 5], Series_B: [1.1, 2.4, 3.3, 4, 4.9], Series_C: [0.9, 2.6, 3.1, 4.2, 5.1] — so I can see how closely they move together?

## When to prefer this

Choose this endpoint when you need pairwise correlation and covariance statistics across multiple named time series in a single call, especially when eigenvalue decomposition is needed for portfolio optimization, PCA preparation, or multicollinearity diagnostics. Prefer over manual computation when you need a numerically stable matrix with optional spectral analysis baked in.

## Known failure modes

- Mismatched series lengths — series must have equal number of observations
- Too few data points — need at least 2 observations per series
- Invalid method name — only supported methods accepted
- Empty series input — at least two named series required
- Non-numeric values in series data — all entries must be numbers

## How this service works

QuantOracle: stats/correlation-matrix

## Output

Returns a full correlation matrix (n×n) and covariance matrix for all input series, plus eigenvalues of the correlation matrix, the condition number, list of asset names, sample count, and computation time in milliseconds.

## Example request

```json
{
 "method": "pearson",
 "series": {
  "Series_A": [
   1,
   2.5,
   3.2,
   4.1,
   5,
   5.8,
   6.5,
   7.2,
   8,
   8.7,
   9.5,
   10.1,
   10.8,
   11.5,
   12.2,
   12.9,
   13.6,
   14.3,
   15,
   15.7,
   16.4,
   17.1,
   17.8,
   18.5,
   19.2,
   19.9,
   20.6,
   21.3,
   22,
   22.7
  ],
  "Series_B": [
   1.1,
   2.4,
   3.3,
   4,
   4.9,
   5.7,
   6.6,
   7.4,
   8.3,
   9.1,
   10,
   10.8,
   11.7,
   12.5,
   13.4,
   14.2,
   15.1,
   15.9,
   16.8,
   17.6,
   18.5,
   19.3,
   20.2,
   21,
   21.9,
   22.7,
   23.6,
   24.4,
   25.3,
   26.1
  ],
  "Series_C": [
   0.9,
   2.6,
   3.1,
   4.2,
   5.1,
   5.9,
   6.8,
   7.6,
   8.5,
   9.3,
   10.2,
   11,
   11.9,
   12.7,
   13.6,
   14.4,
   15.3,
   16.1,
   17,
   17.8,
   18.7,
   19.5,
   20.4,
   21.2,
   22.1,
   22.9,
   23.8,
   24.6,
   25.5,
   26.3
  ]
 },
 "include_eigenvalues": true
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "method": {
   "enum": [
    "pearson",
    "spearman"
   ],
   "type": "string",
   "title": "Method",
   "default": "pearson",
   "description": "Correlation method"
  },
  "series": {
   "type": "object",
   "title": "Series",
   "description": "Named data series, e.g. {\"A\": [...], \"B\": [...]}",
   "additionalProperties": {
    "type": "array",
    "items": {
     "type": "number"
    }
   }
  },
  "include_eigenvalues": {
   "type": "boolean",
   "title": "Include Eigenvalues",
   "default": false,
   "description": "Whether to compute eigenvalue decomposition"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-0335dab2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
