Skip to main content
Skip to main content
Version: 1.0 (Current)

How to Implement Kelly Criterion

Problem

You want to optimize position sizing to maximize long-term growth while managing risk. Fixed percentage sizing doesn't account for your strategy's edge, while the Kelly Criterion calculates the mathematically optimal bet size based on your win rate and profit factor.

Prerequisites

  • Basic algorithm configuration completed
  • Position sizing configured (Step 2)
  • Minimum 30 trades of performance history
  • Understanding of win rate and profit factor
  • Positive expectancy strategy (profitable)

What is the Kelly Criterion?

The Kelly Criterion is a mathematical formula that calculates the optimal position size to maximize long-term wealth growth. It was developed by John Kelly in 1956 and is widely used in gambling, investing, and trading.

Key Principle: Bet more when you have an edge, bet less when the edge is small.

Formula:

Kelly % = (Win Rate × Avg Win - Loss Rate × Avg Loss) / Avg Win

Where:
- Win Rate = Winning Trades / Total Trades
- Loss Rate = Losing Trades / Total Trades = 1 - Win Rate
- Avg Win = Average profit on winning trades
- Avg Loss = Average loss on losing trades

Alternative Formula:

Kelly % = (bp - q) / b

Where:
- b = Avg Win / Avg Loss (win/loss ratio)
- p = Win Rate (probability of winning)
- q = Loss Rate (probability of losing) = 1 - p

Basic Configuration

Enable Kelly Criterion

{
"positionSizing": {
"method": "kelly_criterion",
"fractionalKelly": 0.25
}
}

Parameters:

  • method: Set to "kelly_criterion"
  • fractionalKelly: Fraction of Kelly to use (0.1 to 1.0)

Understanding the Formula

Example Calculation

Strategy Performance:

Total Trades: 100
Winning Trades: 60
Losing Trades: 40
Win Rate: 60%
Loss Rate: 40%
Average Win: ₹5,000
Average Loss: ₹2,000

Kelly Calculation:

Kelly % = (Win Rate × Avg Win - Loss Rate × Avg Loss) / Avg Win
Kelly % = (0.60 × 5000 - 0.40 × 2000) / 5000
Kelly % = (3000 - 800) / 5000
Kelly % = 2200 / 5000
Kelly % = 0.44 or 44%

Interpretation: The optimal position size is 44% of your account per trade.

Alternative Calculation

b = Avg Win / Avg Loss = 5000 / 2000 = 2.5
p = Win Rate = 0.60
q = Loss Rate = 0.40

Kelly % = (bp - q) / b
Kelly % = (2.5 × 0.60 - 0.40) / 2.5
Kelly % = (1.5 - 0.40) / 2.5
Kelly % = 1.1 / 2.5
Kelly % = 0.44 or 44%

Fractional Kelly

Why Use Fractional Kelly?

Full Kelly (1.0) maximizes growth but has high volatility. Fractional Kelly reduces volatility while still providing good growth.

Benefits of Fractional Kelly:

  • Reduces drawdowns
  • More psychologically comfortable
  • Protects against estimation errors
  • Still provides excellent growth

Fractional Kelly Values

{
"fractionalKelly": 0.25 // Quarter Kelly (recommended)
"fractionalKelly": 0.5 // Half Kelly
"fractionalKelly": 1.0 // Full Kelly (aggressive)
}

Quarter Kelly (0.25):

Full Kelly: 44%
Quarter Kelly: 44% × 0.25 = 11%

Half Kelly (0.5):

Full Kelly: 44%
Half Kelly: 44% × 0.5 = 22%

Comparison of Fractional Kelly

FractionPosition SizeVolatilityGrowthRecommended For
0.110% of KellyVery LowSlowVery Conservative
0.2525% of KellyLowGoodConservative (Recommended)
0.550% of KellyModerateExcellentModerate
0.7575% of KellyHighMaximumAggressive
1.0100% of KellyVery HighMaximumVery Aggressive

Example: Different Fractional Kelly Values

Strategy with 44% Full Kelly:

Account: ₹10,00,000

Quarter Kelly (0.25):
Position Size: ₹10,00,000 × 44% × 0.25 = ₹1,10,000 (11%)

Half Kelly (0.5):
Position Size: ₹10,00,000 × 44% × 0.5 = ₹2,20,000 (22%)

Full Kelly (1.0):
Position Size: ₹10,00,000 × 44% × 1.0 = ₹4,40,000 (44%)

Performance History Requirements

Minimum Trade Count

Minimum: 30 trades
Recommended: 50+ trades
Ideal: 100+ trades

Why 30 trades minimum?

  • Statistical significance
  • Reliable win rate estimate
  • Stable average win/loss
  • Reduces estimation error

Data Quality Requirements

Required Data:

  • Win rate (percentage of winning trades)
  • Average win (mean profit on winners)
  • Average loss (mean loss on losers)
  • Consistent strategy (no major changes)

Example Performance Data:

{
"performanceHistory": {
"totalTrades": 100,
"winningTrades": 60,
"losingTrades": 40,
"totalProfit": 300000,
"totalLoss": 80000,
"averageWin": 5000,
"averageLoss": 2000
}
}

Strategy Consistency

Important: Kelly Criterion assumes future performance matches past performance.

Requirements:

  • No major strategy changes
  • Same market conditions
  • Same instruments
  • Same timeframe
  • Same risk parameters

If you change the strategy:

  • Reset performance history
  • Start with conservative sizing
  • Build new performance data

Complete Configuration Examples

Example 1: Conservative Kelly

{
"name": "Conservative Kelly Strategy",
"positionSizing": {
"method": "kelly_criterion",
"fractionalKelly": 0.25,
"minPositionSize": 0.5,
"maxPositionSize": 10.0
},
"riskParameters": {
"maxPositionSize": 10.0
}
}

Strategy:

  • Quarter Kelly (very conservative)
  • Minimum 0.5% position
  • Maximum 10% position (safety cap)
  • Good for: Risk-averse traders

Example 2: Moderate Kelly

{
"name": "Moderate Kelly Strategy",
"positionSizing": {
"method": "kelly_criterion",
"fractionalKelly": 0.5,
"minPositionSize": 1.0,
"maxPositionSize": 15.0
},
"riskParameters": {
"maxPositionSize": 15.0
}
}

Strategy:

  • Half Kelly (balanced)
  • Minimum 1% position
  • Maximum 15% position
  • Good for: Most traders

Example 3: Aggressive Kelly

{
"name": "Aggressive Kelly Strategy",
"positionSizing": {
"method": "kelly_criterion",
"fractionalKelly": 0.75,
"minPositionSize": 2.0,
"maxPositionSize": 25.0
},
"riskParameters": {
"maxPositionSize": 25.0
}
}

Strategy:

  • Three-quarter Kelly (aggressive)
  • Minimum 2% position
  • Maximum 25% position
  • Good for: Experienced traders with high conviction

Example 4: Kelly with Dynamic Adjustment

{
"name": "Dynamic Kelly Strategy",
"positionSizing": {
"method": "kelly_criterion",
"fractionalKelly": 0.5,
"minPositionSize": 0.5,
"maxPositionSize": 20.0,
"updateFrequency": "monthly"
}
}

Strategy:

  • Recalculate Kelly monthly
  • Adapts to changing performance
  • Caps at 20% for safety
  • Good for: Adaptive strategies

Kelly Criterion Examples

Example 1: Strong Strategy

Performance:

Win Rate: 60%
Avg Win: ₹5,000
Avg Loss: ₹2,000
Total Trades: 100

Calculation:

Kelly % = (0.60 × 5000 - 0.40 × 2000) / 5000
Kelly % = (3000 - 800) / 5000
Kelly % = 0.44 or 44%

Position Sizing:

Account: ₹10,00,000

Full Kelly (1.0):
₹10,00,000 × 44% = ₹4,40,000 per trade

Half Kelly (0.5):
₹10,00,000 × 22% = ₹2,20,000 per trade

Quarter Kelly (0.25):
₹10,00,000 × 11% = ₹1,10,000 per trade

Example 2: Moderate Strategy

Performance:

Win Rate: 50%
Avg Win: ₹3,000
Avg Loss: ₹2,000
Total Trades: 80

Calculation:

Kelly % = (0.50 × 3000 - 0.50 × 2000) / 3000
Kelly % = (1500 - 1000) / 3000
Kelly % = 500 / 3000
Kelly % = 0.167 or 16.7%

Position Sizing:

Account: ₹10,00,000

Full Kelly (1.0):
₹10,00,000 × 16.7% = ₹1,67,000 per trade

Half Kelly (0.5):
₹10,00,000 × 8.35% = ₹83,500 per trade

Quarter Kelly (0.25):
₹10,00,000 × 4.18% = ₹41,800 per trade

Example 3: High Win Rate, Small Wins

Performance:

Win Rate: 70%
Avg Win: ₹2,000
Avg Loss: ₹3,000
Total Trades: 120

Calculation:

Kelly % = (0.70 × 2000 - 0.30 × 3000) / 2000
Kelly % = (1400 - 900) / 2000
Kelly % = 500 / 2000
Kelly % = 0.25 or 25%

Position Sizing:

Account: ₹10,00,000

Full Kelly (1.0):
₹10,00,000 × 25% = ₹2,50,000 per trade

Half Kelly (0.5):
₹10,00,000 × 12.5% = ₹1,25,000 per trade

Quarter Kelly (0.25):
₹10,00,000 × 6.25% = ₹62,500 per trade

Example 4: Low Win Rate, Large Wins

Performance:

Win Rate: 40%
Avg Win: ₹8,000
Avg Loss: ₹2,000
Total Trades: 90

Calculation:

Kelly % = (0.40 × 8000 - 0.60 × 2000) / 8000
Kelly % = (3200 - 1200) / 8000
Kelly % = 2000 / 8000
Kelly % = 0.25 or 25%

Position Sizing:

Account: ₹10,00,000

Full Kelly (1.0):
₹10,00,000 × 25% = ₹2,50,000 per trade

Half Kelly (0.5):
₹10,00,000 × 12.5% = ₹1,25,000 per trade

Quarter Kelly (0.25):
₹10,00,000 × 6.25% = ₹62,500 per trade

When Kelly Criterion Works Best

Ideal Conditions

  1. Positive Expectancy

    • Strategy must be profitable
    • Positive expected value per trade
    • Consistent edge
  2. Sufficient History

    • 50+ trades minimum
    • 100+ trades ideal
    • Recent performance data
  3. Stable Strategy

    • No major changes
    • Consistent market conditions
    • Reliable statistics
  4. Independent Trades

    • Each trade is independent
    • No correlation between trades
    • Random entry timing

When NOT to Use Kelly

  1. Insufficient Data

    • Less than 30 trades
    • New strategy
    • Untested approach
  2. Negative Expectancy

    • Losing strategy
    • No edge
    • Random results
  3. Changing Strategy

    • Recent modifications
    • Different instruments
    • New timeframe
  4. Correlated Trades

    • Multiple positions in same sector
    • Highly correlated instruments
    • Systematic risk

Optimal Sizing Examples

Comparison: Fixed % vs Kelly

Strategy Performance:

Win Rate: 55%
Avg Win: ₹4,000
Avg Loss: ₹2,000
Kelly: 32.5%

Fixed 2% Sizing:

Account: ₹10,00,000
Position: ₹20,000 per trade
100 trades: ₹20,00,000 total exposure

Quarter Kelly (8.125%):

Account: ₹10,00,000
Position: ₹81,250 per trade
100 trades: ₹81,25,000 total exposure

Result:

  • Kelly sizing: 4x larger positions
  • Kelly sizing: Higher growth potential
  • Kelly sizing: Higher volatility
  • Kelly sizing: Optimal for this edge

Growth Comparison

Scenario: 100 trades with above performance

Fixed 2%:

Expected Profit: ₹60,000
Return: 6%
Drawdown: ~8%

Quarter Kelly (8.125%):

Expected Profit: ₹2,44,000
Return: 24.4%
Drawdown: ~15%

Half Kelly (16.25%):

Expected Profit: ₹4,88,000
Return: 48.8%
Drawdown: ~25%

Full Kelly (32.5%):

Expected Profit: ₹9,76,000
Return: 97.6%
Drawdown: ~40%

Position Size Limits

Minimum Position Size

{
"positionSizing": {
"method": "kelly_criterion",
"minPositionSize": 0.5 // 0.5% minimum
}
}

Why set a minimum?

  • Avoid tiny positions
  • Cover transaction costs
  • Meaningful exposure

Maximum Position Size

{
"positionSizing": {
"method": "kelly_criterion",
"maxPositionSize": 20.0 // 20% maximum
}
}

Why set a maximum?

  • Prevent over-concentration
  • Limit single-trade risk
  • Protect against estimation errors
  • Psychological comfort

Example with Limits

Kelly Calculation: 44%
Fractional Kelly (0.25): 11%
Max Position Size: 10%

Actual Position Size: 10% (capped at max)

Updating Kelly Calculation

Update Frequency

{
"positionSizing": {
"method": "kelly_criterion",
"updateFrequency": "monthly" // or "weekly", "quarterly"
}
}

Monthly (Recommended):

  • Balances stability and adaptation
  • Enough trades to update statistics
  • Not too reactive

Weekly:

  • More responsive
  • May be too volatile
  • Good for high-frequency strategies

Quarterly:

  • Very stable
  • Slow to adapt
  • Good for long-term strategies

Rolling Window

Use a rolling window of recent trades:

{
"positionSizing": {
"method": "kelly_criterion",
"rollingWindow": 100 // Last 100 trades
}
}

Benefits:

  • Adapts to changing conditions
  • Discounts old performance
  • More relevant statistics

Verification

After configuring Kelly Criterion, verify:

  1. Sufficient performance history

    • Minimum 30 trades
    • Preferably 50+ trades
    • Recent data
  2. Positive expectancy

    • Strategy is profitable
    • Positive expected value
    • Consistent edge
  3. Fractional Kelly is set

    • 0.25 for conservative
    • 0.5 for moderate
    • Never use full Kelly (1.0) without experience
  4. Position size limits are set

    • Maximum position size (10-20%)
    • Minimum position size (0.5-1%)
    • Reasonable ranges
  5. Update frequency is defined

    • Monthly recommended
    • Not too frequent
    • Not too infrequent

Troubleshooting

Kelly Percentage is Negative

Problem: Calculation results in negative Kelly.

Cause: Strategy has negative expectancy (losing strategy).

Solution:

  • Don't use Kelly Criterion
  • Fix the strategy first
  • Use fixed percentage sizing
Example:
Win Rate: 40%
Avg Win: ₹2,000
Avg Loss: ₹3,000

Kelly = (0.40 × 2000 - 0.60 × 3000) / 2000
Kelly = (800 - 1800) / 2000
Kelly = -1000 / 2000
Kelly = -0.5 or -50% (NEGATIVE!)

This means: Don't trade this strategy!

Kelly Percentage is Too High

Problem: Kelly suggests 60%+ position size.

Cause: Very strong edge or estimation error.

Solution:

  • Use fractional Kelly (0.25 or 0.5)
  • Set maximum position size limit
  • Verify performance data accuracy
{
"positionSizing": {
"fractionalKelly": 0.25,
"maxPositionSize": 20.0 // Cap at 20%
}
}

Insufficient Performance History

Problem: Less than 30 trades.

Solution:

  • Use fixed percentage sizing initially
  • Build performance history
  • Switch to Kelly after 30+ trades
{
"positionSizing": {
"method": "percentage", // Use this first
"percentage": 2.0
}
}

Volatile Position Sizes

Problem: Position size changes dramatically.

Solution:

  • Use smaller fractional Kelly
  • Increase rolling window size
  • Reduce update frequency
{
"positionSizing": {
"fractionalKelly": 0.25, // Reduced from 0.5
"rollingWindow": 100, // Increased from 50
"updateFrequency": "quarterly" // Changed from monthly
}
}

Position Size Too Small

Problem: Kelly suggests very small positions.

Cause: Small edge or high risk.

Solution:

  • Improve strategy edge
  • Use minimum position size
  • Consider if strategy is worth trading
{
"positionSizing": {
"minPositionSize": 1.0 // At least 1%
}
}

Best Practices

  1. Start with Quarter Kelly

    • Conservative approach
    • Reduces volatility
    • Protects against errors
  2. Set Position Size Limits

    • Maximum 20% per trade
    • Minimum 0.5% per trade
    • Prevents extremes
  3. Require Sufficient History

    • Minimum 30 trades
    • Preferably 50+ trades
    • Recent performance
  4. Update Regularly

    • Monthly updates recommended
    • Use rolling window
    • Adapt to changing conditions
  5. Verify Positive Expectancy

    • Strategy must be profitable
    • Positive expected value
    • Consistent edge
  6. Use with Stable Strategies

    • No major changes
    • Consistent approach
    • Reliable statistics
  7. Monitor Performance

    • Track actual vs expected
    • Adjust if needed
    • Review quarterly
  8. Combine with Risk Management

    • Daily loss limits
    • Maximum open positions
    • Stop losses on all trades