# Delx Commerce — Pairs Hedge Ratio (OLS)

> Delx Commerce — Pairs Hedge Ratio (OLS) is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the OLS hedge ratio (beta) between two price series for pairs trading strategies.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/pairs-hedge-ratio?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-pairs-hedge-ratio-ols-a244aab9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M5zp1nQ2ahQ8Ax70KFDQG

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 delx-commerce-pairs-hedge-ratio-ols-a244aab9 -d '<json body>'
```

Example prompt: Calculate the OLS hedge ratio between these two price series — X: [100, 102, 101, 103, 105] and Y: [198, 202, 200, 205, 208] — so I know how many units of X to hold per unit of Y in my pairs trade.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call OLS hedge ratio calculation without building your own regression infrastructure. Ideal for AI agents running quantitative finance workflows, pairs trading signal generation, or spread construction where you need an exact hedge ratio on demand with no account setup and verifiable micropayment delivery via USDC.

## Known failure modes

- Mismatched array lengths between x and y series may cause errors or undefined behavior
- Empty or single-element arrays may produce invalid or degenerate regression results
- Non-numeric values in either series will likely cause computation failures
- Payment failure via x402 protocol will prevent the computation from executing
- Constant series (zero variance in x) will cause division-by-zero in OLS

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the number of observations used (n), the OLS beta coefficient representing the hedge ratio (beta), and a schema identifier string (schema). The beta value indicates how many units of the independent series (x) are needed to hedge one unit of the dependent series (y).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "x": {
   "type": "array",
   "description": "Independent series for OLS hedge ratio"
  },
  "y": {
   "type": "array",
   "description": "Dependent series for OLS hedge ratio"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "n": 5,
  "beta": 1.98,
  "schema": "delx/util-pairs-hedge-ratio/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-pairs-hedge-ratio-ols-a244aab9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
