{"uid":"cap_QtkFdz1rfze4nt6LO5Xei","slug":"finmath-kelly-criterion-calculator-a18df9fa","name":"finmath Kelly Criterion Calculator","description":"Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.","url":"https://finmath.qzqh5rrbkz.workers.dev/v1/kelly_criterion","method":"POST","headers":{},"bodySchema":{"type":"object","required":["win_prob","win_loss_ratio"],"properties":{"win_prob":{"type":"number","description":"win_prob"},"win_loss_ratio":{"type":"number","description":"win_loss_ratio"}}},"responseSchema":{"type":"object","required":["result","meta"],"properties":{"meta":{"type":"object"},"result":{}}},"example":{"request":{"win_prob":0.55,"win_loss_ratio":2},"response":{"meta":{"tool":"kelly_criterion","disclaimer":"Deterministic calculation utility. Not financial, investment, or trading advice.","deterministic":true},"result":{"half_kelly":0.16250000000000003,"kelly_fraction":0.32500000000000007}}},"exampleRequest":{"win_prob":0.55,"win_loss_ratio":2},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PuKsvxpHAF5a3wFuLB1X3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the optimal Kelly Criterion fraction — the theoretically ideal bet size as a fraction of bankroll — given a win probability and win/loss ratio.","exampleAgentPrompt":"What's the optimal Kelly Criterion bet fraction if I have a 55% win probability and my average win is 2x my average loss?","exampleUseCases":null,"resultDescription":"Returns a result object containing the computed Kelly fraction (a number between 0 and 1 representing the optimal bankroll percentage to wager), plus a meta object with call metadata such as cost and request details.","failureModes":["win_prob outside [0,1] range returns validation error","win_loss_ratio of zero or negative may cause division error or undefined result","missing required fields (win_prob or win_loss_ratio) returns 400 bad request","win_prob of exactly 0 or 1 returns degenerate Kelly fractions (0 or undefined)","payment failure (402) if USDC balance insufficient for $0.001 per call fee"],"whenToPreferThis":"Use this endpoint when you need exact, deterministic Kelly Criterion math rather than relying on an LLM's approximation, which is known to make arithmetic errors. Ideal for algorithmic trading agents, portfolio optimizers, or gambling strategy bots that require provably correct position sizing without floating-point ambiguity.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:58:14.783Z","isFirstParty":false}