# Kelly Position Sizing & Fixed Fractional Risk Calculator

> Kelly Position Sizing & Fixed Fractional Risk Calculator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Calculates optimal bet/trade size using full or fractional Kelly Criterion from win probability and payoff ratio, or fixed fractional sizing from stop distance and account risk percentage.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/kelly-position-sizing
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kelly-position-sizing-fixed-fractional-risk-calculator-d1f59449
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VQczZhhZjs_cg6pIHjFCm

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-position-sizing-fixed-fractional-risk-calculator-d1f59449 -d '<json body>'
```

Example prompt: Calculate my Kelly position size for a trade with a 60% win probability and a 2.5:1 payoff ratio on a $25,000 account using half Kelly, and also give me the fixed fractional size assuming a $500 stop distance and 1% account risk.

## When to prefer this

Use this endpoint when you need a mathematically rigorous position sizing recommendation grounded in Kelly Criterion theory or fixed fractional risk management. Prefer it over manual calculation or generic advice when the user has quantified win probability and payoff ratio (for Kelly) or a defined stop distance and risk percentage (for fixed fractional). Best suited for traders, sports bettors, or algorithmic systems that need consistent, repeatable sizing logic embedded in an automated workflow.

## Known failure modes

- Win probability outside 0–1 range returns a validation error
- Negative or zero payoff ratio returns an error
- Kelly fraction parameter outside valid range (e.g. > 1) may be rejected or clamped
- Missing required fields (e.g. bankroll without win probability) returns 400-level error
- Negative Kelly result (when edge is negative) may return zero or an explanatory message indicating the bet should not be placed

## How this service works

Optimal stake from win probability, payoff ratio and bankroll (full or fractional Kelly), plus fixed fractional risk sizing from stop distance and account risk %.

## Output

Returns the recommended position size or stake amount — including the Kelly stake (in currency or fraction of bankroll) for full or fractional Kelly configurations, and/or the fixed fractional dollar risk and position size based on stop distance and account risk percentage. May also return intermediate values like the raw Kelly fraction before scaling.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "bankroll": {
   "type": "number"
  },
  "win_prob": {
   "type": "number"
  },
  "kelly_fraction": {
   "type": "number"
  },
  "win_loss_ratio": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kelly_pct": 32.5,
  "applied_kelly_pct": 16.25,
  "recommended_stake": 1625
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kelly-position-sizing-fixed-fractional-risk-calculator-d1f59449/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
