Overview
Betting strategies determine how much capital to risk on each prediction. The framework provides several pre-built strategies based on the Kelly criterion and other risk management approaches.Available Strategies
Theprediction-market-agent-tooling library provides these betting strategies:
SimpleBinaryKellyBettingStrategy
Basic Kelly betting for binary markets
FullBinaryKellyBettingStrategy
Advanced Kelly with price impact consideration
SimpleCategoricalKellyBettingStrategy
Kelly betting for categorical markets
MaxAccuracyWithKellyScaledBetsStrategy
Optimizes for prediction accuracy
CategoricalMaxAccuracyBettingStrategy
Accuracy-focused for categorical markets
MaxExpectedValueBettingStrategy
Maximizes expected value
The Kelly Criterion
The Kelly criterion is a formula for optimal bet sizing that maximizes long-term capital growth:Why Kelly? It mathematically guarantees optimal long-term growth while minimizing risk of ruin. Betting more than Kelly is aggressive, betting less is conservative.
Implementing Betting Strategies
Basic Setup
Override theget_betting_strategy() method in your agent:
SimpleBinaryKellyBettingStrategy
The simplest Kelly-based strategy for binary markets:USD
required
Maximum amount to bet on a single position
FullBinaryKellyBettingStrategy
Advanced Kelly strategy that accounts for price impact (slippage):USD
required
Maximum amount to bet on a single position
float
default:"0.1"
Maximum acceptable price impact (slippage) as a fraction.
0.1= 10% price impact0.57= 57% price impact (very aggressive)- Higher values allow larger bets but worse prices
SimpleCategoricalKellyBettingStrategy
For markets with more than two outcomes: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
MaxAccuracyWithKellyScaledBetsStrategy
Optimizes for accuracy while using Kelly scaling:This strategy is ideal when you care more about prediction accuracy than maximizing returns. Good for tournaments and reputation building.
CategoricalMaxAccuracyBettingStrategy
Minimalist strategy focusing on accuracy:Dynamic Bet Sizing
Adjust bet sizes based on market conditions:The get_maximum_possible_bet_amount Helper
This utility function manages bet sizing within safe bounds:- Uses 95% of trading balance (keeps 5% for fees)
- Ensures bet is at least
min_amount - Caps bet at
max_amount - Returns the value in between based on available balance
Risk Management Best Practices
Conservative: Fractional Kelly
Conservative: Fractional Kelly
Bet a fraction of Kelly to reduce variance:When to use:
- You’re uncertain about your edge
- You want smoother equity curves
- You’re testing a new agent
Balanced: Full Kelly
Balanced: Full Kelly
Bet the full Kelly amount:When to use:
- You’re confident in your predictions
- You want optimal long-term growth
- You can handle volatility
Aggressive: Kelly with Price Impact
Aggressive: Kelly with Price Impact
Accept higher slippage for larger positions:When to use:
- High-liquidity markets
- Strong conviction trades
- When opportunity cost is high
Ultra-Conservative: Fixed Small Bets
Ultra-Conservative: Fixed Small Bets
Ignore Kelly and bet fixed amounts:When to use:
- Learning and experimentation
- Very uncertain predictions
- Volume-based strategies (many small bets)
No Betting Strategy (Tiny Bets)
If you don’t overrideget_betting_strategy(), the base class uses a minimal betting strategy:
Example: Adaptive Strategy
Combine multiple factors for sophisticated bet sizing:Testing Betting Strategies
1
Start with Manifold
Test on Manifold Markets (play money) first:
2
Use Conservative Kelly
Start with 25-50% of Kelly recommendation:
3
Monitor Performance
Track your Sharpe ratio, max drawdown, and ROI over time.
4
Increase Gradually
Once proven, increase bet sizes or move to real-money markets.
Advanced: Custom Betting Strategies
Implement your own strategy by extendingBettingStrategy:
Next Steps
Agent Architecture
Learn how to implement the betting strategy in your agent
Trade Intervals
Control when your agent trades on the same market