Took from the following link:
h t t p : / / w w w .poweryourinvestment . c o m / forum / technical / risk-ruin-determinng-optimal-position-size-426 . h t m l
This formula was originally developed by John L. Kelly Jr. of Bell Labs in the early 1940s, and is sometimes referred to as the Kelly formula. Edward
O. Thorp in The Mathematics of Gambling modified the fixed-fraction formula to account for the average payoff ratio, A, in addition to the average probability of success, p. The figures you will calculate using this formula are more aggressive than using the risk of ruin tables. In his book Money Management Strategies for Futures Traders, Professor Nauzer J. Balsara defines the formula for determining the optimal fraction, f , of capital to be risked on a trade as follows:
f = ( [(A+1) X P] - 1 ) / A
In this formula, the following definitions apply:
f is the optimal fraction (percentage) to be risked on one trade.
A is the average payoff ratio. (dollars earned to one dollar lost).
p is the average win ratio (probability in percentage of success).
Here is an example of the formula in use:
f is the unknown quantity (of the optimal percentage to be risked).
A is an average payoff ratio of 2 to 1.
p is an average win ratio of 35 percent winning trades.
f = ( [(2+1) X .35] - 1 ) / 2 = 0.025
To get a percentage, multiply f result by 100
This gives a value of .025 for f , or 2.5 percent is the optimal percentage of your trading account to risk on a trade based on this performance data and the optimal f formula.