# QuantOracle Risk-Parity Portfolio Weights

> QuantOracle Risk-Parity Portfolio Weights is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-12).

Computes risk-parity portfolio weights given asset volatilities and a correlation matrix, equalizing each asset's risk contribution

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/portfolio/risk-parity-weights?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-39c38b2e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8ghqkDmm1hr5j8GtXS6yH

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-39c38b2e -d '<json body>'
```

Example prompt: Calculate risk-parity weights for my three-asset portfolio — Stocks with 12% volatility, Bonds with 18% volatility, and Gold with 8% volatility — where Stocks and Bonds have 0.4 correlation, Stocks and Gold 0.2, and Bonds and Gold 0.3.

## When to prefer this

Use this endpoint when you need a principled, volatility-equalized asset allocation across multiple assets without specifying expected returns — ideal for risk-parity strategies, alternative to mean-variance optimization when return estimates are unreliable. Prefer over manual weight calculation when you have a correlation matrix and want each asset to contribute equally to total portfolio risk.

## Known failure modes

- Malformed or non-positive-definite correlation matrix returns a 4xx error
- Mismatch between number of asset names, volatilities, and correlation matrix dimensions causes validation error
- Zero or negative volatility values may cause computation failure
- Very high correlations close to 1.0 across all assets may produce near-uniform weights or numeric instability

## How this service works

Free, fast quant finance calculators powered by a deterministic, multi-chain API. Black-Scholes, options profit, Kelly, VaR, crypto liquidation, and more.

## Output

Returns per-asset portfolio weights (e.g. Gold: 0.49, Stocks: 0.31, Bonds: 0.20), each asset's risk contribution (equalized to 1/N in true risk parity), total portfolio volatility, effective N (number of effective assets), and the diversification ratio indicating how much diversification benefit is achieved. Response time is typically under 20ms.

## Example request

```json
{
 "asset_names": [
  "Stocks",
  "Bonds",
  "Gold"
 ],
 "volatilities": [
  0.12,
  0.18,
  0.08
 ],
 "correlation_matrix": [
  [
   1,
   0.4,
   0.2
  ],
  [
   0.4,
   1,
   0.3
  ],
  [
   0.2,
   0.3,
   1
  ]
 ]
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "asset_names": {
   "anyOf": [
    {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    {
     "type": "null"
    }
   ],
   "title": "Asset Names",
   "description": "Optional asset name labels"
  },
  "risk_budget": {
   "anyOf": [
    {
     "type": "array",
     "items": {
      "type": "number"
     }
    },
    {
     "type": "null"
    }
   ],
   "title": "Risk Budget",
   "description": "Optional risk budget weights (default: equal)"
  },
  "volatilities": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Volatilities",
   "description": "Array of annualized volatilities per asset"
  },
  "correlation_matrix": {
   "type": "array",
   "items": {
    "type": "array",
    "items": {
     "type": "number"
    }
   },
   "title": "Correlation Matrix",
   "description": "N x N correlation matrix"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-39c38b2e/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)
