Skip to main content

Overview

The MaxExpectedValueBettingStrategy is a betting strategy that focuses on maximizing expected value (EV) rather than using the Kelly criterion. This strategy is ideal when you want to maximize expected returns per bet, especially for high-confidence predictions.
Expected Value (EV) represents the average return you expect from a bet over many repetitions. Positive EV means profitable over time.

When to Use

Choose MaxExpectedValueBettingStrategy when:
  • You have high-confidence predictions with clear edges
  • You prefer simpler bet sizing than Kelly
  • You’re optimizing for total expected returns rather than growth rate
  • You want consistent bet sizes regardless of odds
Unlike Kelly betting, this strategy doesn’t inherently protect against ruin risk. Use appropriate position limits.

MaxExpectedValueBettingStrategy

Import

from prediction_market_agent_tooling.deploy.betting_strategy import (
    MaxExpectedValueBettingStrategy,
)
from prediction_market_agent_tooling.gtypes import USD

Usage

from prediction_market_agent_tooling.deploy.agent import DeployableTraderAgent
from prediction_market_agent_tooling.markets.agent_market import AgentMarket

class MyAgent(DeployableTraderAgent):
    def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
        return MaxExpectedValueBettingStrategy(
            max_position_amount=USD(1.0),
        )

Parameters

max_position_amount
USD
required
Maximum amount to bet on a single position.Recommended values:
  • USD(0.5) to USD(1.0) - Conservative, for testing or uncertain edges
  • USD(2.0) to USD(5.0) - Moderate, for validated positive EV strategies
  • USD(10.0)+ - Aggressive, only for high-confidence strategies
Unlike Kelly betting, the strategy will tend to bet close to this maximum when it identifies positive expected value.

How It Works

Expected Value Calculation

Expected value is calculated as:
EV = (P(win) × Amount_won) - (P(lose) × Amount_lost)
For a binary prediction market:
EV = (p_yes × payout_if_yes) - ((1 - p_yes) × amount_bet)

Bet Sizing Logic

The strategy bets up to max_position_amount when:
  1. The predicted probability differs from market odds (edge exists)
  2. Expected value is positive
  3. Position size doesn’t exceed maximum
MaxExpectedValue strategy is more aggressive than Kelly - it will bet near maximum when any positive EV is detected.

Real-World Example

DeployablePredictionProphetGPTo3mini

This agent uses MaxExpectedValue with small bets for the o3-mini model:
from prediction_market_agent_tooling.deploy.agent import DeployableTraderAgent
from prediction_market_agent_tooling.deploy.betting_strategy import (
    BettingStrategy,
    MaxExpectedValueBettingStrategy,
)
from prediction_market_agent.agents.utils import get_maximum_possible_bet_amount
from prediction_market_agent.utils import APIKeys

class DeployablePredictionProphetGPTo3mini(DeployableTraderAgent):
    agent: PredictionProphetAgent

    def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
        return MaxExpectedValueBettingStrategy(
            max_position_amount=get_maximum_possible_bet_amount(
                min_=USD(0.5),
                max_=USD(1),
                trading_balance=market.get_trade_balance(APIKeys()),
            )
        )
Location: prediction_market_agent/agents/prophet_agent/deploy.py:730 Use case: Small position sizing for a reasoning model (o3-mini) where the goal is to accumulate small positive EV bets rather than maximize growth rate.

Expected Value vs Kelly

Pros:
  • Simpler to understand and implement
  • Maximizes expected monetary returns per bet
  • Consistent bet sizing
  • Good for tournaments and leaderboards
Cons:
  • No inherent bankroll protection
  • Can be more aggressive than optimal
  • Doesn’t account for variance
  • Risk of ruin if edges are overestimated
Best for:
  • High-confidence predictions
  • Small bet sizes relative to bankroll
  • When you want predictable position sizes
Pros:
  • Mathematically optimal for long-term growth
  • Inherent bankroll protection
  • Scales bets with edge and odds
  • Minimizes risk of ruin
Cons:
  • More complex calculation
  • Can recommend very large bets with big edges
  • Sensitive to probability estimates
  • Higher variance
Best for:
  • Long-term capital growth
  • Variable confidence levels
  • Risk-managed betting

Integration Example

Combine MaxExpectedValue with answer generation:
from prediction_market_agent_tooling.deploy.agent import DeployableTraderAgent
from prediction_market_agent_tooling.deploy.betting_strategy import (
    BettingStrategy,
    MaxExpectedValueBettingStrategy,
)
from prediction_market_agent_tooling.markets.agent_market import AgentMarket
from prediction_market_agent_tooling.markets.data_models import ProbabilisticAnswer
from prediction_market_agent_tooling.gtypes import USD, Probability

class SimpleEVAgent(DeployableTraderAgent):
    def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
        return MaxExpectedValueBettingStrategy(
            max_position_amount=USD(1.0),
        )
    
    def answer_binary_market(self, market: AgentMarket) -> ProbabilisticAnswer | None:
        # Your prediction logic here
        return ProbabilisticAnswer(
            p_yes=Probability(0.75),
            confidence=0.8,
            reasoning="Strong evidence suggests yes outcome",
        )

Comparison with Market Odds

MaxExpectedValue strategy identifies profitable opportunities by comparing:
# Example calculation
your_probability = 0.70  # You think event has 70% chance
market_price = 0.50      # Market is at 50% (2:1 odds)

# Your edge
edge = your_probability - market_price  # 0.20 or 20% edge

# Expected value for $1 bet
if_win = 1.0 / market_price  # $2.00 payout per $1
if_lose = -1.0                # Lose $1

EV = (0.70 × 2.00) + (0.30 × -1.00) = 1.40 - 0.30 = $1.10

# Positive EV of $1.10 per $1 bet (110% ROI)
The strategy automatically identifies these opportunities - you just provide the probability via ProbabilisticAnswer.

Risk Management

MaxExpectedValue can be aggressive. Always set appropriate max_position_amount limits.

Conservative Approach

# Limit to 1% of bankroll per bet
class ConservativeAgent(DeployableTraderAgent):
    def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
        balance = market.get_trade_balance(self.api_keys)
        max_bet = balance * 0.01  # 1% of bankroll
        
        return MaxExpectedValueBettingStrategy(
            max_position_amount=max(USD(0.10), min(max_bet, USD(1.0))),
        )

Moderate Approach

# Scale with confidence
class ModerateAgent(DeployableTraderAgent):
    def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
        return MaxExpectedValueBettingStrategy(
            max_position_amount=get_maximum_possible_bet_amount(
                min_=USD(0.5),
                max_=USD(2.0),
                trading_balance=market.get_trade_balance(self.api_keys),
            )
        )
    
    def answer_binary_market(self, market: AgentMarket) -> ProbabilisticAnswer | None:
        answer = self.make_prediction(market)
        # Adjust confidence based on research quality
        return answer

Aggressive Approach

# Larger bets for high-confidence predictions
class AggressiveAgent(DeployableTraderAgent):
    def get_betting_strategy(self, market: AgentMarket) -> BettingStrategy:
        return MaxExpectedValueBettingStrategy(
            max_position_amount=USD(5.0),
        )

Use Cases

High-Confidence Predictions

When you have strong evidence and clear edges, MaxExpectedValue maximizes returns without complex Kelly calculations.

Small Position Sizing

Making many small bets to accumulate EV, similar to the o3-mini agent example.

Tournament Play

Optimizing for total expected returns in competitions rather than growth rate.

Testing New Models

Starting with MaxExpectedValue and small bets when validating a new prediction model.

Best Practices

1

Start Small

Begin with small max_position_amount values (e.g., 0.500.50-1.00) while validating your edge:
MaxExpectedValueBettingStrategy(
    max_position_amount=USD(0.5),
)
2

Track Performance

Monitor your realized returns vs expected value. If actual returns significantly underperform EV calculations, your probability estimates may be off.
3

Set Position Limits

Always cap bet sizes as a fraction of your bankroll (e.g., 1-5% per bet):
max_bet = min(USD(2.0), balance * 0.03)  # 3% max
4

Consider Switching to Kelly

Once validated, consider moving to Kelly betting for optimal long-term growth and bankroll protection.

Limitations

MaxExpectedValue focuses on average returns and doesn’t account for variance or drawdown risk. Long losing streaks are possible even with positive EV.
The strategy tends to bet near maximum whenever positive EV is detected, which can be too aggressive if your edge is small or uncertain.
Unlike Kelly, this strategy doesn’t automatically scale with your bankroll. You must implement position sizing limits yourself.
If you overestimate your edge (probability accuracy), you’ll consistently bet too much and can deplete your bankroll despite positive expected value.

Migration Path

From MaxExpectedValue to Kelly

Once you’ve validated positive EV, migrate to Kelly for better risk management:
# Before: MaxExpectedValue
return MaxExpectedValueBettingStrategy(
    max_position_amount=USD(2.0),
)

# After: Kelly with similar risk profile
return FullBinaryKellyBettingStrategy(
    max_position_amount=USD(2.0),
    max_price_impact=0.5,
)
Kelly will automatically:
  • Scale bets based on edge size
  • Protect against overbetting
  • Optimize for long-term growth
  • Reduce position sizes for uncertain predictions

See Also

Kelly Betting Strategies

Optimal growth strategies with built-in risk management

Max Accuracy Strategies

Optimize for prediction accuracy over returns

Betting Strategies Concept

Learn fundamental betting strategy concepts

Risk Management

Best practices for managing risk in production

Build docs developers (and LLMs) love