๐Ÿ’ธ Sponsor the strip
REPLAUSE

keeks

Kelly-criterion bet sizing and bankroll allocation in Python

๐Ÿงฉ Build it Free 02 in Risk & sizing ๐Ÿ†• NEW TODAY
Any marketStandalonePython

by wdm0006 โ†’

6 MITupdated 8 Sep '26

Overview

Keeks calculates a bankroll fraction to stake from nine bet-sizing strategies, including Kelly Criterion, then simulates the bankroll path over repeated trials.

  • Fordevelopers modeling repeated binary-outcome bets or trades who want a sizing rule and a bankroll simulator, not a one-off price.
  • NeedsPython 3.10-3.14; you supply your own win probability, payoff, loss, and transaction cost โ€” no data source or account.
  • Runsa pip-installed Python library โ€” a strategy object's evaluate() call, run through a BankRoll and a repeated-bet simulator.
  • Limitthe fraction it returns answers a repeated-bet question โ€” sizing a single, one-time trade off it is the wrong reading; use find_indifference_price for a one-time gamble instead.

Vibe it

Paste this into your AI agent. Write the first line, or take a suggestion; the copy carries your words.

Source: https://github.com/wdm0006/keeks โ€” clone it and read its README and examples before writing anything; its documented setup beats what you remember.
Stack: a Python library โ€” a BaseStrategy subclass (Kelly Criterion and eight others) that returns a bankroll fraction, plus a BankRoll object and a RepeatedBinarySimulator.
Needs: Python 3.10-3.14, and your own estimated win probability, payoff, loss, and transaction cost โ€” no data source or account.
Start: `pip install keeks`, then run the KellyCriterion example from the README against my own probability and payoff before wiring in a BankRoll simulation.
Limit: the fraction answers a repeated-bet question โ€” sizing a single, one-time trade off it is the wrong reading; use find_indifference_price for a one-time gamble instead.
Done means: you show me the bankroll fraction and dollar amount for my own inputs, and the strategy code you wrote.
Before you start, ask me: my estimated win probability, payoff, loss, and transaction cost, and whether I want a single fraction or a multi-trial bankroll simulation.

Something wrong here? Tell us โ†’