# Sharpe Ratio Calculator

> Sharpe Ratio Calculator is a paid API for AI agents from handel.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-17).

Computes the historical Sharpe ratio from a user-supplied series of returns, risk-free rate, and annualization factor using sample standard deviation (n−1)

## Facts

- Endpoint: POST https://handel.halowerk.com/v1/rechner/sharpe?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sharpe-ratio-calculator-e9256483
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R1XwDD1SkS5Hon8K-AGb4

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 sharpe-ratio-calculator-e9256483 -d '<json body>'
```

Example prompt: Calculate the Sharpe ratio for these 12 monthly returns: [0.02, -0.01, 0.03, 0.015, -0.005, 0.04, 0.01, -0.02, 0.025, 0.03, 0.005, 0.02], with 12 periods per year and a monthly risk-free rate of 0.002.

## When to prefer this

Use this endpoint when you need a pure, stateless Sharpe ratio computation from your own return series without any data fetching, brokerage access, or financial advice. Prefer it over full portfolio analytics platforms when you already have the return array and just need the risk-adjusted performance metric computed correctly with sample standard deviation and flexible annualization.

## Known failure modes

- Returns error if fewer than 2 return values are provided (minItems: 2)
- Returns error if more than 5000 return values are provided (maxItems: 5000)
- Returns error if periods_per_year is zero or negative (minimum: 1e-12)
- Undefined or incorrect results if returns contain non-numeric values
- Division-by-zero or undefined ratio if standard deviation of returns is zero (all returns identical)
- Incorrect Sharpe if caller provides mismatched period conventions (e.g., daily returns with annual risk-free rate)

## How this service works

Historische Sharpe-Kennzahl. Stichprobenstandardabweichung n−1, risikofreie Rendite je Eingabeperiode; Annualisierung unter Unkorreliertheitsannahme. Alle Zahlen, Kurse und Vorgaben liefert der Aufrufer. Keine eigenen Kursdaten, kein Brokerzugriff, keine Ausführung. Rechenwerkzeug, keine Anlageberatung, keine Empfehlung.

## Output

Returns the computed (and annualized) Sharpe ratio as a numeric value, derived from the supplied returns array using sample standard deviation (n−1), the specified risk-free rate per period, and the annualization factor (periods_per_year). No market data is fetched; all inputs must be provided by the caller.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "returns": {
   "type": "array",
   "items": {
    "type": "number",
    "maximum": 1000000000000,
    "minimum": -1000000000000
   },
   "maxItems": 5000,
   "minItems": 2
  },
  "periods_per_year": {
   "type": "number",
   "maximum": 1000000000000,
   "minimum": 1e-12
  },
  "risk_free_per_period": {
   "type": "number",
   "maximum": 1000000000000,
   "minimum": -1000000000000
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sharpe-ratio-calculator-e9256483/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from handel.halowerk.com](https://www.zero.xyz/host/handel.halowerk.com/llms.txt)
