# Kelly Criterion Position Sizer

> Kelly Criterion Position Sizer is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Computes the Kelly-optimal bet fraction and dollar position size from a win probability and payoff ratio, or from an edge and odds.

## Facts

- Endpoint: GET https://payai.agentstools.dev/quant/kelly?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kelly-criterion-position-sizer-6194c869
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bH7Xo8zmFQysU_o9MOafx

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 kelly-criterion-position-sizer-6194c869
```

Example prompt: What's the Kelly-optimal fraction of my bankroll to bet if I have a 62% win probability and the payoff ratio is 1.8, with a half-Kelly multiplier and a $10,000 bankroll?

## When to prefer this

Use this endpoint when you need a pure, fast, stateless computation of the Kelly criterion given known probability and payoff parameters. Ideal for agents in trading, sports betting, or portfolio management contexts that already have an estimated edge and want mathematically optimal position sizing without any lookup or data fetching.

## Known failure modes

- Missing required input combination (need either win_prob+win_loss_ratio or edge+odds)
- odds or win_loss_ratio <= 0 returns validation error
- win_prob outside [0,1] returns validation error
- Negative Kelly fraction (negative edge) returns zero or unclamped negative value depending on clamp setting
- Missing bankroll means no dollar amount is returned, only the fraction

## How this service works

Kelly-criterion optimal bet fraction and position sizing from a win probability and payoff, or from an edge and odds. Pure computation over your inputs.

## Output

Returns the Kelly-optimal fraction of bankroll to wager and, if a bankroll is provided, the corresponding dollar position size. Optionally clamped to [0,1] and scaled by a fractional-Kelly multiplier.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "edge": {
       "type": "number",
       "description": "Expected edge, alternative input paired with odds"
      },
      "odds": {
       "type": "number",
       "description": "Odds b, alternative input paired with edge (> 0)"
      },
      "clamp": {
       "type": "boolean",
       "description": "Clamp the Kelly fraction to [0, 1], default true"
      },
      "bankroll": {
       "type": "number",
       "description": "Bankroll to size the position against"
      },
      "fraction": {
       "type": "number",
       "description": "Fractional-Kelly multiplier, default 1"
      },
      "win_prob": {
       "type": "number",
       "description": "Probability of a win in [0, 1]"
      },
      "win_loss_ratio": {
       "type": "number",
       "description": "Payoff ratio b of win size to loss size (> 0)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kelly-criterion-position-sizer-6194c869/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
