← Back to Blog
RISK MANAGEMENT

Kelly Criterion: Mathematically Optimal Position Sizing for LMEX Traders

May 21, 2026 · 5 min read · LMEX.AI

Most traders size positions by gut feel or fixed percentages. The Kelly Criterion uses your strategy's actual win rate and risk-reward ratio to calculate the mathematically optimal bet size.


What is the Kelly Criterion?


The Kelly formula is: **f = (bp - q) / b**


Where f is the fraction of capital to risk, b is the net odds received, p is the probability of winning, and q is the probability of losing.


Why Quarter Kelly?


Full Kelly is theoretically optimal but produces extreme drawdowns. Most professional traders use Quarter Kelly which gives 94% of full Kelly returns with dramatically lower drawdown.


Implementation on LMEX


def kelly_fraction(trades, fraction=0.25):

if len(trades) < 10:

return 0.01

wins = [t for t in trades if t['pnl'] > 0]

losses = [t for t in trades if t['pnl'] <= 0]

win_rate = len(wins) / len(trades)

avg_win = sum(t['pnl'] for t in wins) / len(wins)

avg_loss = abs(sum(t['pnl'] for t in losses) / len(losses))

b = avg_win / avg_loss

q = 1 - win_rate

kelly = (b * win_rate - q) / b

return max(0, min(kelly * fraction, 0.25))


Frequently Asked Questions


Q: How do I calculate my win rate for Kelly Criterion on LMEX?

Track at least 30 completed trades per strategy. Divide the number of profitable trades by the total number of trades. For meaningful results, use a minimum of 50-100 trades. Your backtest win rate and live win rate will differ — always use live trade data once available.


Q: Why should I use Quarter Kelly instead of Full Kelly for crypto trading?

Full Kelly maximises long-term growth but produces extreme drawdowns that most traders cannot psychologically tolerate. Quarter Kelly gives approximately 94% of full Kelly returns with dramatically lower drawdown, making it the practical choice for crypto bot trading.


Q: Can I use Kelly Criterion across multiple LMEX strategies simultaneously?

Yes, but use a portfolio-level Kelly that accounts for correlation between strategies. Two highly correlated strategies running simultaneously effectively double your risk, so the combined Kelly fraction should reflect this.


Q: How often should I recalculate my Kelly fraction?

Recalculate after every 20-30 new trades or whenever market conditions change significantly. Win rates and average win/loss ratios shift over time, especially in crypto markets that cycle between bull, bear, and ranging regimes.


Related Articles


→ Portfolio Risk Management for Algorithmic Traders on LMEX
→ Backtesting Your LMEX Trading Bot in Python
→ Building a Crypto Perpetuals Trading Bot in Python
← All ArticlesBuild a Bot →