Skip to content
ForexBob
Risk management8 min read

Kelly criterion in trading: the formula and why traders use a fraction

The Kelly formula for traders, a worked example, how to get the inputs from an MT5 report, why full Kelly is too much and how half and quarter Kelly compare.

A pocket calculator on squared paper, the kind of quick sum a Kelly criterion risk percentage takes.

The Kelly criterion tells you what share of your account to risk on each trade so the account grows fastest over many trades. For trading, the formula is Kelly % = W − (1 − W) ÷ R, where W is your win rate and R is your average win divided by your average loss. A strategy that wins 40% of its trades with wins twice the size of its losses gives 0.40 − 0.60 ÷ 2 = 10%.

That 10% is the amount you lose if the stop is hit, so it is your risk per trade. Few traders use the full figure. The drawdowns at full Kelly are deep, and the formula assumes you know your real win rate, which you don't. Most who use it risk half or a quarter of the Kelly percentage, or less.

The Kelly formula for traders

John Larry Kelly Jr., a researcher at Bell Labs, described the criterion in 1956, according to Wikipedia's Kelly criterion article. It was written for bets with known odds. A trade with a fixed stop and a target behaves much like such a bet: you either lose what you risked or win a multiple of it.

Kelly % = W − (1 − W) ÷ R

  • W is the win rate, as a decimal: 40% is 0.40.
  • 1 − W is the loss rate.
  • R is the average win divided by the average loss. With wins of $200 and losses of $100, R is 2.

If you already know your expectancy in R, there's a shortcut. With losses of 1R, the Kelly percentage is the expectancy divided by the average win. The example above has an expectancy of 0.40 × 2 − 0.60 × 1 = 0.2R, and 0.2 ÷ 2 = 10%.

A Kelly percentage of zero or below means the trades have no edge, and the formula says not to trade them at all.

A worked example

Say a strategy wins 40% of its trades. The winners average 2R and the losers 1R, the full amount risked.

  • W = 0.40, so the loss rate is 0.60.
  • R = 2 ÷ 1 = 2.
  • Kelly % = 0.40 − 0.60 ÷ 2 = 0.40 − 0.30 = 10%.
Worked Kelly criterion example: a 40% win rate and wins twice the size of losses give 0.40 minus 0.60 divided by 2, which is 10% of the account at risk per trade.

On a $10,000 account, full Kelly risks $1,000 a trade. Half Kelly risks $500 (5%), and quarter Kelly risks $250 (2.5%). All three are well above the 0.5% to 2% many traders use, which our guide on how much to risk per trade covers. The example strategy is a strong one on paper, and the figure for a typical strategy usually comes out lower.

Getting the inputs from an MT5 report

The Backtest tab of the MT5 Strategy Tester has the three numbers you need. The MT5 testing report help describes them:

  • Profit Trades (% of total): the number of winning trades and their share of all trades. The percentage is W.
  • Average profit trade: the total of profits divided by the number of winning trades.
  • Average loss trade: the total of losses divided by the number of losing trades.

Divide the average profit trade by the average loss trade (ignore the minus sign) to get R.

Here's a made-up test of 300 trades: 126 winners, so 42%, an average profit trade of 150 and an average loss trade of −100. R is 1.5, and the Kelly percentage is 0.42 − 0.58 ÷ 1.5 = 0.42 − 0.387 = 3.3%. Quarter Kelly would be about 0.8%.

One check before you use the result. Kelly gives the share of the account to lose on an average losing trade. If some losers were closed early, the average loss is smaller than the full risk at the stop, and the risk per trade that matches the Kelly figure is a little lower. An EA that trades a fixed lot also risks a different amount on each trade, so work out each trade's result in R from the deals list first, as our expectancy guide explains.

In Excel or Google Sheets, with each trade's result in R in column F, the win rate is =COUNTIF(F:F,">0")/COUNT(F:F), the average win is =AVERAGEIF(F:F,">0") and the average loss is =-AVERAGEIF(F:F,"<0").

Why full Kelly is too much

Full Kelly gives the fastest growth over a very long run of trades. Over the runs a trader actually lives through, it swings hard. At 10% risk, 10 losses in a row take 65.1% off the account. A strategy that wins 40% of the time will meet a streak like that sooner or later, as our article on how many losing trades in a row is normal shows.

Near the top of the curve, risking less costs little growth. For the example strategy, the long-run growth per trade at each risk level, as a share of the growth at full Kelly, works out like this:

  • 1% risk: 19%.
  • Quarter Kelly, 2.5%: 45%.
  • Half Kelly, 5%: 76%.
  • Full Kelly, 10%: 100%.
  • Double Kelly, 20%: 7%.
Line chart of long-run account growth against risk per trade for a 40% win rate with 2R wins: growth peaks at the 10% full Kelly risk, half Kelly keeps 76% of it, quarter Kelly 45%, 1% risk 19%, and double Kelly falls to 7%.

Half Kelly keeps about three quarters of the growth with half the risk per trade. Above full Kelly the account grows more slowly, and somewhere past double Kelly it shrinks over time even though every trade still has an edge. The Wikipedia article puts it plainly: betting more than the Kelly amount increases the risk of ruin.

Your win rate is an estimate

Kelly assumes you know W and R exactly. Wikipedia's article notes that the criterion is fully valid only when the outcome probabilities are known, which is almost never the case with investments. A backtest gives you a measured win rate, and the real one could be several points lower.

Take the example strategy and say its real win rate is 35%, not 40%. Its Kelly percentage drops to 0.35 − 0.65 ÷ 2 = 2.5%. A trader sizing from the measured 40% would risk 10%, four times the real Kelly figure, and over time that account shrinks. At half Kelly, 5%, it would go nowhere. At quarter Kelly or 1% it would still grow.

Table comparing 1%, quarter Kelly (2.5%), half Kelly (5%) and full Kelly (10%) risk per trade: the share of the fastest growth each keeps, the drop after 10 losses in a row, and whether the account still grows if the real win rate is 35% instead of 40%.

Five points of win rate is a small error. Our expectancy guide shows how wide the range around a measured result is, even after a few hundred trades. Settings optimised on the same data make it worse, so take the inputs from out-of-sample results, such as the test periods of a walk-forward optimization.

Half Kelly, quarter Kelly or a fixed percentage

Fractional Kelly means risking a set share of the Kelly figure. Half Kelly is the best known. Wikipedia's article gives the reasons gamblers bet less than full Kelly: to reduce the chance of ruin and the volatility, and to allow for model error, at the cost of slower growth.

A practical way to use it:

  1. Work out the Kelly percentage from out-of-sample results with realistic spread and commission.
  2. Take a quarter or half of it.
  3. Cap it at the most you're willing to lose on one trade, for example 1% or 2%.
  4. Use the smaller number and work out the lot size from your stop.
  5. Check the deepest drawdown you could face at that risk with the risk of ruin calculator or a Monte Carlo simulation of the trades.

For most retail strategies the cap ends up deciding, and Kelly works as a ceiling. If quarter Kelly comes out below your usual risk per trade, the edge is thinner than your sizing assumes. If the Kelly percentage is at or below zero after costs, no position size fixes that.

In the EAs we build, risk can be set as a fixed lot or as a percentage of the balance, alongside a daily loss limit and an equity stop. If you want to size by Kelly, enter your fractional Kelly figure as the risk percentage and leave it there through losing runs, rather than letting the EA raise it after a good week.

Turning the Kelly percentage into a lot size

Once you have the risk per trade, the stop sets the size: lots = (balance × risk %) ÷ (stop in pips × pip value per lot).

Using the MT5 example: a $10,000 account at quarter Kelly, rounded down to 0.8%, risks $80. With a 30-pip stop on EUR/USD, where one pip on a standard lot is worth $10, that's $80 ÷ (30 × $10) = 0.266 lots, which you round down to 0.26. The calculator at the end of this page does the sum.

Where Kelly doesn't fit

  • Several trades open at once. The formula sizes one bet at a time. Two trades on EUR/USD and GBP/USD often move together, so two positions at the Kelly figure can carry close to twice the Kelly risk.
  • Grid and martingale EAs. They have no fixed loss per trade, because they add to losing positions, so there's no stop to size from. Our article on grid and martingale EA risks explains why their win rate says little.
  • Prop firm accounts. A daily loss limit or a maximum drawdown ends the account long before full Kelly's swings play out. Size from the firm's limits first.
  • Changing markets. A win rate and R measured in one kind of market may not hold in the next. Work the Kelly figure out again as new results come in, and lower the fraction when they drift down.

Kelly sizing in an Expert Advisor

An EA can read its own results and size from a running Kelly figure, but that is risky. After a lucky run the measured win rate rises and the EA trades bigger just before results revert. The safer setup is a risk-percent input that you set yourself from a fractional Kelly figure, plus a daily loss limit and an equity stop. We build those into EAs for MT4 and MT5 (custom EA development).

FAQ

What is a good Kelly percentage in trading?

There's no good value as such, because the Kelly percentage only measures how strong the edge looks in your data. A figure between 0 and a few percent is common for a real strategy after costs. A very high one, such as 20% or more, usually means too few trades, optimised settings or costs left out.

Is half Kelly better than full Kelly?

For most traders, yes. In the worked example, half Kelly keeps about 76% of full Kelly's long-run growth with half the risk per trade, and it leaves room for a win rate that turns out lower than measured.

Can the Kelly criterion be negative?

Yes. A negative result means the strategy loses money on average with those inputs, and the formula says to risk nothing. No position size turns a negative edge into a positive one.

Is the Kelly percentage the position size?

No. It is the share of the account you lose if the stop is hit. The position size then depends on the stop distance: a wider stop means fewer lots for the same risk.

Keep reading: trading expectancy, how much to risk per trade, risk of ruin in trading and the risk of ruin calculator.

Risk note: trading forex carries a high level of risk and may not be suitable for everyone. This article is for education only and is not financial advice.

Position size

0.40 lots

Exact size 0.4000 lots, rounded down to the 0.01 lot step · 40,000 units

Amount at risk

$100.00

Pip value (1 lot)

$10.00

Mini lots

4.0

Micro lots

40

Have a strategy you want automated?

We turn trading rules into tested Expert Advisors for MT4 and MT5. Tell us how you trade and we'll send a specification and a quote.