Kelly Position Size
kelly_sizeCompute the optimal Kelly position size for a prediction-market contract. Given your win probability, the market price (which sets the payout), your bankroll, and a Kelly fraction (full / half / quarter / eighth), returns the dollar stake and a risk rating. Use for "how much should I stake", "what is my position size", "Kelly sizing for this trade".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bankroll | No | Total bankroll in dollars (e.g. 1000). Optional — omit it and the result is the % of bankroll to stake, without a dollar figure. Accepts a number or a numeric string ("1000", "$1,000"). | |
| fraction | No | Kelly fraction to apply. Half-Kelly is the common sharp-money default. | half |
| marketPrice | Yes | Contract price in cents (1–99). Sets the payout ratio. Accepts 55, "55%", "55¢", "$0.55", 0.55 or American odds (+120 / -150) — all read as 55%. | |
| winProbability | Yes | Your probability the contract resolves YES, in % (0–100). Accepts 55, "55%", "55¢", "$0.55", 0.55 or American odds (+120 / -150) — all read as 55%. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rating | No | Qualitative read of the sizing. | |
| sources | No | ||
| tell_user | No | Show this sentence to the user first. | |
| timestamp | No | ||
| needs_input | No | ||
| example_call | No | ||
| stake_dollars | No | Suggested stake in dollars (when a bankroll was given). | |
| data_freshness | No | ||
| full_kelly_pct | No | Full-Kelly fraction of bankroll, %. | |
| applied_fraction_pct | No | The fraction applied, %. |