Here's a primer for those traders who are confused abut Kelly sizing.
You have a trading strategy that you want to evaluate. Naturally you'd want to perform a backtest.
For the first test trade, you put forth an amount of money t1 into your favorite trade instrument, and at the end of the first test trade, your trading account changes by an amount t1*R1, which may be positive, negative, or zero. And t1*R1 includes slippage and commissions.
For the second test trade, you put forth an amount of money t2 (which may or may not be equal to t1) and your equity changes by an amount t2*R2 (including slippage and commissions).
You continue this for some statistically significant number of test trades (n), and your final equity differs from your initial equity by an amount t1*R1 + t2*R2 + ... + tn*Rn = sum[ti*Ri]_n.
What the Kelly formula does is answer the following question:
If you had traded a constant fraction (f) of your equity for each trade in the test, what value of f would have maximized your compound growth?
Gain[f] = (1 + f*R1)*(1 + f*R2)*...*(1 + f*Rn)
This function is maximized at f = k and mathematically (don't ask, it involves logarithms and calculus :eek: ), this reduces to
0 = R1/(1 + k*R1) + R2/(1 + k*R2) + ... + Rn/(1 + k*Rn)
This is unsolvable exactly for the general case, but it can be solved numerically for a specific case with a canned routine like Excel's Solver.
Fortunately, the last equation can be approximated by the following:
0 ~ R1*(1 - k*R1) + R2*(1 - k*R2) + ... + Rn*(1 - k*Rn)
0 ~ sum[Ri]_n - k*sum[Ri²]_n
k ~ sum[Ri]_n / sum[Ri²]_n
This is sometimes expressed by blackjack card counters as "expected return over expected squared return". Six little easy-to-remember words.
The best things about this approximation are (1) it can be instantly updated with each new completed trade (or each new count after a blackjack hand) and (2) it will always underestimate the actual optimal betting/trading fraction, thus reducing the dreaded "Kelly risk"
eek: ).
Example 1
You're sitting in a cocktail lounge with a rich compulsive gambler and he talks you into playing the following game. Betting only the risk capital in your pockets, he will flip a coin (you've examined it, it's fair) and if it comes up tails, you lose your bet. But if it comes up heads, he will pay you double your bet.
How much of your betting account should you bet?
Given this simple two-outcome situation, the usual Kelly formula you see posted can evaluate this exactly: 25% of your betting account will on average grow your money the fastest.
Using the approximation gives k ~ (2 + (-1))/(2² + (-1)²) = 1/5 = 20%.
This is 80% of the optimal fraction. Not too shabby for a quick-and-dirty approximation.
Example 2
Your new rich friend/compulsive gambler decides to up the ante. He brings out an opaque jar containing ten balls. Before the game begins, you examine the balls and they are identical in every way except color: there are seven yellow balls, one red ball and two green balls. Then he puts the balls in the jar and reaches into the jar without looking and swirls them around and pulls one out.
If he pulls out a yellow ball, you lose your bet. If he pulls out the red ball, you lose five times your bet. If he pulls out a green ball, you win ten times your bet.
How much of your betting account should you bet?
Using the approximation gives
k ~ (7(-1) + (-5) + 2(+10))/(7(+1) + 25 + 2(+100)) = 8/232 = 3.45%
This is 76.5% of the optimal fraction (4.51%), which you can get from Excel's Solver.
Using the typical posted Kelly formula, you'd reduce this to a 2-outcome sitch (2 green balls worth +10 each and 8 orange balls worth -1.5 each) and end up overbetting:
Kelly_typical-posted = p - (1-p)/(W/L) = 0.2 - 0.8/(10/1.5) = 8% :eek:
HTH
kut2k2
You have a trading strategy that you want to evaluate. Naturally you'd want to perform a backtest.
For the first test trade, you put forth an amount of money t1 into your favorite trade instrument, and at the end of the first test trade, your trading account changes by an amount t1*R1, which may be positive, negative, or zero. And t1*R1 includes slippage and commissions.
For the second test trade, you put forth an amount of money t2 (which may or may not be equal to t1) and your equity changes by an amount t2*R2 (including slippage and commissions).
You continue this for some statistically significant number of test trades (n), and your final equity differs from your initial equity by an amount t1*R1 + t2*R2 + ... + tn*Rn = sum[ti*Ri]_n.
What the Kelly formula does is answer the following question:
If you had traded a constant fraction (f) of your equity for each trade in the test, what value of f would have maximized your compound growth?
Gain[f] = (1 + f*R1)*(1 + f*R2)*...*(1 + f*Rn)
This function is maximized at f = k and mathematically (don't ask, it involves logarithms and calculus :eek: ), this reduces to
0 = R1/(1 + k*R1) + R2/(1 + k*R2) + ... + Rn/(1 + k*Rn)
This is unsolvable exactly for the general case, but it can be solved numerically for a specific case with a canned routine like Excel's Solver.
Fortunately, the last equation can be approximated by the following:
0 ~ R1*(1 - k*R1) + R2*(1 - k*R2) + ... + Rn*(1 - k*Rn)
0 ~ sum[Ri]_n - k*sum[Ri²]_n
k ~ sum[Ri]_n / sum[Ri²]_n
This is sometimes expressed by blackjack card counters as "expected return over expected squared return". Six little easy-to-remember words.
The best things about this approximation are (1) it can be instantly updated with each new completed trade (or each new count after a blackjack hand) and (2) it will always underestimate the actual optimal betting/trading fraction, thus reducing the dreaded "Kelly risk"
eek: ).Example 1
You're sitting in a cocktail lounge with a rich compulsive gambler and he talks you into playing the following game. Betting only the risk capital in your pockets, he will flip a coin (you've examined it, it's fair) and if it comes up tails, you lose your bet. But if it comes up heads, he will pay you double your bet.
How much of your betting account should you bet?
Given this simple two-outcome situation, the usual Kelly formula you see posted can evaluate this exactly: 25% of your betting account will on average grow your money the fastest.
Using the approximation gives k ~ (2 + (-1))/(2² + (-1)²) = 1/5 = 20%.
This is 80% of the optimal fraction. Not too shabby for a quick-and-dirty approximation.
Example 2
Your new rich friend/compulsive gambler decides to up the ante. He brings out an opaque jar containing ten balls. Before the game begins, you examine the balls and they are identical in every way except color: there are seven yellow balls, one red ball and two green balls. Then he puts the balls in the jar and reaches into the jar without looking and swirls them around and pulls one out.
If he pulls out a yellow ball, you lose your bet. If he pulls out the red ball, you lose five times your bet. If he pulls out a green ball, you win ten times your bet.
How much of your betting account should you bet?
Using the approximation gives
k ~ (7(-1) + (-5) + 2(+10))/(7(+1) + 25 + 2(+100)) = 8/232 = 3.45%
This is 76.5% of the optimal fraction (4.51%), which you can get from Excel's Solver.
Using the typical posted Kelly formula, you'd reduce this to a 2-outcome sitch (2 green balls worth +10 each and 8 orange balls worth -1.5 each) and end up overbetting:
Kelly_typical-posted = p - (1-p)/(W/L) = 0.2 - 0.8/(10/1.5) = 8% :eek:
HTH
kut2k2