| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Kelly Criterion https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=233 |
Page 1 of 4 |
| Author: | garyfritz [ Tue Jan 10, 2012 6:22 am ] |
| Post subject: | Re: Kelly Criterion |
Thanks, Khalid. OK, since you asked for it... The Kelly criterion and the conceptually-similar optimal F are designed to find the ""optimal"" risk level for a particular trading system. I put quotes around ""optimal"" because it is certainly not optimal in terms of safety. The so-called ""optimal"" point is the point at which you maximize your returns. I will call it the "max returns" point so it doesn't sound quite so much like the recommended risk level. Increasing your risk level increases your returns AND increases your drawdowns, until you reach the "max returns" risk level. Increasing beyond that point continues to increase your drawdowns, but your returns DECREASE. Furthermore the drawdowns at the "max returns" risk level are horrific, generally 90-95% or so. No one with any sense of self-preservation should trade anywhere NEAR the "max returns" level. That means you need to know where the "max returns" level is. That's what Kelly is for. The Kelly "max returns" risk level can be calculated in several ways. The original research applied to betting situations, where wins were always the same size and losses were always the same size. There are also equations to calculate Kelly for trading situations. These equations take the mathematical variance of the wins/losses into account, and are quite accurate for trading applications. (There are plenty of references for this online, see e.g. the link below.) However you can get a good approximation of the Kelly level with a simple equation. Kelly is approximately: AverageTrade / AverageWin. This is not an exact calculation, but the market conditions will certainly change in the future anyway. You really don't need to calculate your risk level to six decimals. A good approximation is far better than the blind guess most traders use, and is "good enough" for our needs. So if you look at all your trades and the average profit of all trades is $50, and the average profit of all WINNING trades is $100, your Kelly value is 50 / 100 = 0.50. That means that if you wanted to trade at the "max returns" risk level, you would risk 0.50 or 50% of your entire account on each trade. (!!!!!) Over the long run, you will maximize your returns with this system if you risk 50% of your account each time. The drawdowns will likely drive you insane but the returns will be maximized. But the intent of Kelly calculations is not to find and then trade at the "max returns" point. As I said, that's suicidal. The object of finding the Kelly level is to determine where the "max returns" point is, so you can choose a safe risk level well below it. You normally select some fraction of Kelly, and trade at that level. So if you have a Kelly value of 0.50, and you chose to trade at 5% of Kelly, then you would risk 5% * 0.50 = 2.5% of your account on each trade. In fact, you can get a very good feel for your likely future drawdown level, given your chosen fraction of Kelly. For any Kelly value, if K is your fraction of Kelly, and D is a particular drawdown level (D = 0.8 is a 20% drawdown), then the probability of a drawdown D is: P(D) = D^(2/K-1) (See e.g. this paper. As I said, these formulae don't apply precisely to the variable-sized wins/losses in trading, but they're a good approximation.) For a 20% drawdown, D = 1-20% = 0.8. So if you trade at full Kelly, the probability of hitting a 20% drawdown is 0.8^(2/1.0-1) = 80%. But if you trade at 10% of Kelly, the chance of that same 20% drawdown is only 0.8^(2/0.1-1) = 1.4%. If you trade at 2x Kelly, your chances of that (or any other) drawdown are 0.8^(2/2.0-1) = 1. At 2*Kelly you're guaranteed to hit any and all drawdown levels, including 100%. That risk of a particular drawdown looks like this, for varying levels of K (fraction of Kelly): So your risk of drawdown increases rapidly as you increase your size, but then the rate of increase actually drops off and the curve flattens out. But that's no-man's-land, and you don't want to be there anyway. So that's a calculation of risk of drawdown, which can be extended to a risk-of-ruin calculation. It doesn't directly address your expected return. For that I have a spreadsheet that I use to backtest one of my systems, and I can specify the Kelly fraction I want to trade at. Here is the shape of the "return vs. Kelly fraction" from those actual calculations on real trades: So the returns increase smoothly to the ""optimum"" at full Kelly, then drop off to zero at 1.51 * Kelly. (These numbers will vary somewhat depending on the particular backtest history, but the concepts remain the same.) So in theory you get your maximal returns at full Kelly, and it drops off fairly smoothly from there. But remember: no one in his right mind would trade anywhere near full Kelly!! Notice the red Drawdown line. At full Kelly it's at 95%. Can YOU survive a 95% drawdown?? If you decide you can only tolerate a 20% drawdown, you should be trading down around 10-15% of full Kelly. Furthermore this is the idealized Kelly, based on history. In actual forward trading, you are likely to encounter different market conditions, and the actual Kelly for those future trades will probably be different. In actual forward trading of this particular system, the returns peak at about 72% of full Kelly. That's because the forward-traded period included a worse drawdown than what I saw in the Kelly-calculation period. That's the kind of thing you have to expect and plan for, and that's one reason why you have to assume your historic Kelly values are optimistic. So that's a "quick" summary of Kelly. Khalid does not share my enthusiasm for Kelly position sizing, to put it mildly. For example, let's look at the system I mentioned above. If we follow the 1% rule of thumb, we make 18% CAGR and we see only 4% drawdowns in this backtest. If I choose to trade at 10% of Kelly, for this system that means risking about 4% per trade. The returns increase to 86% CAGR. In 2 years and over 500 trades, you never saw worse than a 12% drawdown. I said above that trading at 10% of Kelly means you have a 1.4% chance of a 20% drawdown. I'm very comfortable with that level of risk. I'm very willing to accept that level of risk to increase my returns from 18% to 86%. By the way, even my more aggressive risk levels are lower than where a lot of people trade, because they don't know where their system's "max returns" point is. They just look at the return they can get with their bigger betsizes and they're oblivious to the much higher risks they're taking. That's why so many people blow up their accounts with a winning system -- they're just trading too large! If you don't know exactly how your system performs and where your "max returns" point is, you're playing with fire to take on larger position sizes. Khalid's approach is MUCH safer if you haven't carefully analyzed your system's behavior. Unless you understand how to do the above analysis, and you understand the implications of that analysis, you should stick with Khalid's approach and play it safe. I prefer to understand and characterize my particular system, so I can project my likely risk of drawdown, and empirically choose a risk level that matches my risk tolerance. THIS is the real reason to use Kelly, IMHO -- so you can knowledgeably choose your risk level and have a good idea of what drawdown to expect. The fact that it generally lets you collect a much higher return is a terrific side benefit. |
|
| Author: | garyfritz [ Tue Jan 10, 2012 6:53 am ] |
| Post subject: | Re: Kelly Criterion |
I should point out that the whole concept of Kelly sizing assumes you have a fairly stable environment. It works great for coin flips and dice throws, because their probabilities never change. Unfortunately trading isn't quite that stable. If market conditions shift and your system quits working, you'll probably lose more with a larger Kelly position size than you would have at 1% risk. However, assuming you had a chance to trade the system for a while before it blew up, chances are you'll have more profits with the Kelly sizing even after the larger drawdown. Khalid, is that the type of thing that concerns you about Kelly sizing? Why do you say it is "not a recommendable position sizing method" ? |
|
| Author: | ironrick [ Wed Jan 11, 2012 8:37 pm ] |
| Post subject: | Re: Kelly Criterion |
Found this quote interesting. It is from the blog of Dr. Ernest Chan, the author of Quantitative Trading: And before I get jumped, I don't think he (and definitely not me) is suggesting trading full Kelly either... I just thought this was interesting as a truism. R http://epchan.blogspot.com/ |
|
| Author: | garyfritz [ Wed Jan 11, 2012 9:26 pm ] |
| Post subject: | Re: Kelly Criterion |
I'd agree with that. I never optimize on return. You can get into big trouble that way. Optimizing on Sharpe lets you find the best and most consistently-performing behavior. And as a benefit, the higher the Sharpe, the higher you can safely leverage. |
|
| Author: | ironrick [ Wed Jan 11, 2012 9:41 pm ] |
| Post subject: | Re: Kelly Criterion |
Another interesting bit, same source as above: http://epchan.blogspot.com/2010/04/how- ... kelly.html I think this is very similar to what you were describing, Gary. R EDIT: PS Further reading in the comments section: Sounds familiar... |
|
| Author: | ironrick [ Wed Jan 11, 2012 9:48 pm ] |
| Post subject: | Re: Kelly Criterion |
And lastly, same Author, different blog post. http://epchan.blogspot.com/2006/10/how- ... u-use.html Very interesting discussion! I really appreciate how much time Gary and Khalid have put into this! R |
|
| Author: | garyfritz [ Wed Jan 11, 2012 10:49 pm ] |
| Post subject: | Re: Kelly Criterion |
No, that's an interesting and reasonable approach, but that's not what I talked about. I said "If you trade your full account at K% of full Kelly, then here is the probability of a particular level of drawdown on that full account." That gives you an idea for how likely any particular drawdown is, but it doesn't place any kind of hard limit on the drawdown, unless you just quit trading when you hit that hard limit. Chan is saying "I only want to suffer a max of a 10% drawdown with my Kelly trading. So I'll only trade with 10% of my account. Even if the hyper-aggressive 100%-of-Kelly trading totally blows up the money I give it, I'm only giving it 10% of my account. So it can only lose 10% of my account." Let's look at that. Trading at full Kelly can give you some absolutely insane returns. If it gets you more than 10x what a "sane" level of risk would get, then trading 10% of your account at full Kelly might make a lot of sense. I trade the system I mentioned above at 20% of Kelly, which is fairly aggressive. I've seen drawdowns as high as 27%. In the backtest spreadsheet I mentioned, I can specify any fraction of Kelly I want. If I tell it to trade at 100% of Kelly, it makes an absolutely stupid return -- and then it hits the trades that produce the 27% drawdown with 20%-of-Kelly. With 100%-of-Kelly those same trades produce about a 95% drawdown. BUT it's only 9.5% of your account if you're only trading 10% of your account at full Kelly! So the drawdowns on your original $10k are lower. What happens to the return? At the worst bottom of that 95% drawdown, the returns on 10% of your account are about 10 TIMES as much as trading the full account at 20%-of-Kelly!!! And your drawdowns are limited to that original 10% of the account that you allocated to it. Of course, if you have a $10k account and trade $1k at full Kelly, and that $1k runs up to $100k, your account is at $109k. If you took a 95% drawdown on the full-Kelly portion, that's 95% of the $100k -- which takes your $109k down to $14k, an 87% drawdown on the value of the full account. You limited your drawdown on your original $10k to 10%, but you took an 87% drawdown from the highest equity point. Not fun. If you always give the full-Kelly trades 10% of the current value of your account, and reset that every month or whatever, your returns will be a whole lot less than what I said above. My spreadsheet's not set up to calculate that but I suspect it might be closer to what you'd have gotten trading at 20%-of-Kelly all along. I'll have to take a look at that and see how it behaves. Thanks for the pointer! |
|
| Author: | ironrick [ Wed Jan 11, 2012 11:40 pm ] |
| Post subject: | Re: Kelly Criterion |
Glad I could find something interesting -- and hopefully useful. I read further down in the comments of his original post and Chan did clarify the difference as you describe, including the re-balancing of accounts, but also suggesting that having 2 accounts is really just to keep things conceptually separate. Everything could be done as you describe from within 1 account. I was thinking as you, that in practice/actual use the two models will probably perform similarly... we shall see. It will be interesting to see what your maths lead us to conclude! R |
|
| Author: | garyfritz [ Thu Jan 12, 2012 7:21 am ] |
| Post subject: | Re: Kelly Criterion |
Yes, that's how the math is derived. However it is my experience that I can apply those same concepts to trading with good results. It's not a mathematically equivalent situation, so it's really an approximation of Kelly rather than "true" Kelly, but I find the approximation is "close enough." I've simulated many thousands of trades like this (and traded several hundred live) and I like the results. |
|
| Author: | garyfritz [ Thu Jan 12, 2012 7:30 am ] |
| Post subject: | Re: Kelly Criterion |
As I suspected, it's not that great. Trading 10% of your account at 100% of Kelly is exactly equivalent to trading 100% of your account at 10% of Kelly, if you allocate the 10% on each trade. It gets a bit more interesting if you set aside the 90%, and then trade the 10% for a while before rebalancing. The attached spreadsheet is a quick-and-dirty simulation of this approach with 300 trades, rebalancing every 20 trades. You can specify trade parameters &etc to experiment with different values. Press F9 to generate a new random set of trades. Bottom line: the 10%-at-100% approach often makes significantly more return than the standard 100%-at-10% approach -- but it generally has a bit higher drawdown too. And sometimes the 10% approach does no better or occasionally even a bit worse than the standard approach. You'd probably be better off to trade your whole account at 11% or 12% of Kelly. |
|
| All times are UTC | Page 1 of 4 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|