Skip to main content

Overview

Kelly betting strategies implement the Kelly criterion for optimal bet sizing that maximizes long-term capital growth. The framework provides multiple Kelly implementations for different market types and risk profiles.
Kelly betting automatically calculates optimal position sizes based on your predicted probability, current market odds, and available capital.

BettingStrategy Base Class

All betting strategies inherit from the BettingStrategy base class.

Base Parameters

USD
required
Maximum amount to allocate to a single position. This caps the Kelly recommendation to prevent over-betting.

SimpleBinaryKellyBettingStrategy

Basic Kelly criterion implementation for binary markets. Calculates optimal bet size using the standard Kelly formula.

Usage

Parameters

USD
required
Maximum amount to bet on a single position. The Kelly formula will recommend a bet size, but it will be capped at this amount.Example values:
  • USD(2.5) - Fixed maximum of $2.50 per bet
  • USD(5.0) - Fixed maximum of $5.00 per bet

How It Works

The simple Kelly strategy uses this formula:
SimpleBinaryKellyBettingStrategy is ideal for beginners. It provides optimal bet sizing without additional complexity.

FullBinaryKellyBettingStrategy

Advanced Kelly implementation that accounts for price impact (slippage) when placing large orders. Recommended for markets with variable liquidity.

Usage

Parameters

USD
required
Maximum amount to bet on a single position
float | None
default:"0.1"
Maximum acceptable price impact (slippage) as a decimal fraction.Common values:
  • 0.1 (10%) - Very conservative, suitable for low-liquidity markets
  • 0.3 (30%) - Moderate risk tolerance
  • 0.6 (60%) - Aggressive, accepts significant slippage
  • 0.7 (70%) - Very aggressive
  • None - No limit on price impact
Example: With max_price_impact=0.5, if the market price is 0.60, you’ll accept prices up to 0.90 (60% + 50% of 60%).
bool
default:"True"
Whether to automatically take profits by selling positions when profitable.
  • True - Automatically realize gains when positions become profitable
  • False - Hold positions until market resolution for potentially larger final payout

Real-World Examples

Standard configuration with moderate price impact tolerance:
Location: prediction_market_agent/agents/prophet_agent/deploy.py:122
Aggressive betting on high-confidence predictions:
Location: prediction_market_agent/agents/known_outcome_agent/deploy.py:31
Holds positions until market resolution:
Use case: Testing whether holding positions to resolution increases profits via larger final payouts.Location: prediction_market_agent/agents/prophet_agent/deploy.py:324
Configuration for o1-preview agent with moderate price impact:
Location: prediction_market_agent/agents/prophet_agent/deploy.py:611
High max_price_impact values can result in poor execution prices. Start conservative and increase based on your market’s liquidity.

SimpleCategoricalKellyBettingStrategy

Kelly betting for markets with more than two outcomes. Supports single-outcome betting or multi-categorical strategies.

Usage

Parameters

USD
required
Maximum amount to bet on a single outcome
bool
default:"True"
Allow placing bets on multiple outcomes within the same market.
  • True - Can bet on multiple outcomes if Kelly recommends it
  • False - Only bet on the single most favorable outcome
bool
default:"False"
Allow betting against outcomes (shorting).
  • True - Can take short positions on overpriced outcomes
  • False - Only take long positions
bool
default:"False"
Enable multi-categorical betting mode.
  • True - Use multi-categorical Kelly formula
  • False - Treat each outcome independently
For most use cases, set allow_multiple_bets=False and allow_shorting=False for simpler, more conservative betting.

FullCategoricalKellyBettingStrategy

Advanced Kelly betting for categorical markets with price impact consideration.

Usage

Parameters

USD
required
Maximum amount to bet on a single outcome
float
default:"0.1"
Maximum acceptable price impact as a decimal fraction (see FullBinaryKellyBettingStrategy for details)
bool
default:"True"
Allow betting on multiple outcomes in the same market
bool
default:"False"
Allow betting against outcomes (shorting)
bool
default:"False"
Enable multi-categorical betting mode

Real-World Examples

Conservative categorical betting with low price impact tolerance:
Location: prediction_market_agent/agents/prophet_agent/deploy.py:164
Aggressive categorical betting accepting high price impact:
Location: prediction_market_agent/agents/prophet_agent/deploy.py:366
Balanced configuration for embedding-based agent:
Location: prediction_market_agent/agents/prophet_agent/deploy.py:571
The framework automatically falls back to tiny bets on non-Omen markets where full Kelly isn’t properly implemented yet.

Integration with Agents

Override the get_betting_strategy() method in your DeployableTraderAgent:
The method receives the market parameter, allowing you to:
  • Adjust bet sizes based on market liquidity
  • Use different strategies for different market types
  • Scale bets with your current trading balance
  • Apply custom risk management rules

Helper Utilities

get_maximum_possible_bet_amount

Utility function for dynamic bet sizing based on available balance:
Logic:
  1. Calculates 95% of trading balance (reserves 5% for fees)
  2. Ensures result is at least min_ amount
  3. Caps result at max_ amount
  4. Returns the bounded value

Best Practices

Begin with conservative settings and gradually increase risk as you validate performance:
Use appropriate strategies for binary vs categorical markets:
Adjust price impact tolerance based on liquidity:
Bet a fraction of the Kelly recommendation to reduce variance:

See Also

Max Expected Value

Alternative strategy focused on expected value

Max Accuracy

Strategies optimized for prediction accuracy

Betting Strategies Concept

Learn about betting strategy fundamentals

Agent Architecture

Understand how agents use betting strategies