12 ms·
Kelly Criterion – how to calculate optimal bet sizes
- aborsy 5y agoBut how much is it actually used in trading?
- SatvikBeri 5y agoAlmost no one uses it directly – in practice, Kelly is too aggressive – but variations of it are quite common.
- syntaxing 5y agoWould love to hear about the variations!
- paulpauper 5y agobet less than the formula recommends. depends on personal preferences
- dcolkitt 5y agoKelly criterion is just the square of Sharpe ratio. Sharpe is used pretty extensively from a strategy selection and risk management perspective.
- SpicyP 5y agoThis is not correct. Kelly criterion is not the square of the sharpe ratio
- afryer 5y agohttps://ifta.org/public/files/journal/d_ifta_journal_11.pdf https://ifta.org/public/files/journal/d_ifta_journal_11.pdf Page 27: Vince(vi) and independently Thorpv(ii) provide a solution that satisfies the Kelly Criterion for the continuous finance case, often quoted in the financial community to the effect that “f should equal the expected excess return of the strategy divided by the expected variance of the excess return:” f = (m-r) / s^2 so it's Sharpe with variance instead of standard deviation in the denominator, correct?
- dcolkitt 5y agoYes, that's correct. An intuitive way to think about this is that Sharpe depends on the specific horizon you're using. E.g. annualized Sharpe will be sqrt(252) larger than daily Sharpe. It would not make sense to change the Kelly criterion based on a substitution of variables. In contrast variance, like returns, scales linearly with time horizon. Therefore the variance ratio is invariant to the time horizon.
- arthurcolle 5y agoPlease share this calculation, dying to know what kind of inter-universal Teichmüller space theoretic math you're using to come up with this.
- afryer 5y agohttps://news.ycombinator.com/item?id=27453365 https://news.ycombinator.com/item?id=27453365 Edward Thorpe and Ralph Vince both conclude that the Kelly Criterion in the continuous case is excess returns divided by variance, which is pretty close to the Sharpe Ratio, correct? Asking to understand better, not to be combative. Your comment made it seem like that formula is way off.
- fighterpilot 5y agoIt's not practical when the outcome is distributed in a very weird and unknown way and each bet isn't really iid. Moreover you can find the same result with a simple grid search over bet sizes, obviating the need to estimate any parameters of the outcome distribution. It would be more useful in professional gambling where outcome distributions are more knowable.
- evo 5y agoIt's useful as an upper limit--if you're leveraging past what Kelly suggests you're almost certainly overleveraged. In theory, Kelly is optimal--if you knew the exact probability density function of your returns, it would give you the right leverage to take. In practice, you're always playing with risks, some you're factoring into your models, some you're choosing not to because they're intractable, some you're not even aware of until they occur. The most basic premise--today's returns will be a function of hypotheses that I've derived from looking at past observations--is an approximation at best. This mismatch between model and reality can lead to expensive lessons learned when using the full Kelly model, so often traders will "half-kelly" or something like that, to incorporate the basic idea of risk scaling proposed by the Kelly model but with more safety margin.
- 6gvONxR4sf7o 5y ago> In theory, Kelly is optimal... It's optimal for one utility function (log of future $), but that doesn't make it necessarily optimal for everything, right?
- evo 5y agoThat’s a great callout as well: it’s optimal for maximizing your expected growth in the long term, but does carry significant volatility. That’s fine for an emotionless immortal robot investor, but as we’re human. If we’re close to an investment goal, like saving a house downpayment or retiring, the calculus is quite different. Even outside that, loss aversion is a real thing and we’re likely happier trading some upside for being able to sleep at night.
- LudwigNagasena 5y agoIt is optimal for the growth of your wealth in the long run. The issue of utility only comes into play if you have to bet a finite amount of times and you don’t plan to or cannot live forever.
- kqr 5y ago> This mismatch between model and reality can lead to expensive lessons learned when using the full Kelly model, so often traders will "half-kelly" or something like that, to incorporate the basic idea of risk scaling proposed by the Kelly model but with more safety margin. And to be clear, half-Kelly, quarter-Kelly, eighty-percent-Kelly and any other linear combination between wallet and full Kelly are actually still the only strategies that are growth optimal -- given the particular safety margin each corresponds to.
- rezahussain 5y agoI used it in live trading last year, I couldn't really make it work. I precalc my stoplosses + stopgains then use a simulation to get the win/loss probabilities on training data. What I observed is the kelly formula really prefers the tiny stoplosses, so when you sort your predictions by kelly score it will pick the ones with tiny stoplosses. What happened to me in the live test is the tiny stoplosses triggered, when a stopgain would have triggered later. I know someone is going to say "thats a problem with your stoplosses+stopgains OOS performance" and they are right, but OOS stoploss+stopgain calculation isn't trivial for me to calculate :\
- aborsy 5y agoWhere did you get the distribution of the real data from?
- rezahussain 5y agoYes, model predictions on volume+price data from 2019+2020
- Solstinox 5y agoKnowingly? Not often. You don't find long-run successful traders who don't knowingly/unknowingly use it or some variation of it.
- paulpauper 5y agoI am sure it is used but the challenge is calculating the necessary parameters
- mywacaday 5y agoDoes anyone know of any formulas that would accommodate p changing on every bet?
- dcolkitt 5y agoIf the distribution of p is ergodic, then Kelly criterion (re-sized at every p) still maximizes expected growth rate.
- hervature 5y agoWell, Kelly is infinite horizon, so any derivation is going to depend on the exact payouts. If it is not infinite horizon, you can do dynamic programming to figure it out but you will have to be careful with myopic reasoning (betting it all in the last stage). In practice, just plug your changing payoff into the formula. The rationale being every bet is growth optimal in the long run even if you only bet it once.
- awaythrowact 5y agohttps://news.ycombinator.com/item?id=26834333 https://news.ycombinator.com/item?id=26834333
- fairity 5y agoPerhaps I'm misunderstanding, but the post says that the optimal bet size f = 1-2p (where p is the probability of winning). But, this seems backwards. As p goes up, you should be betting more. Shouldn't the optimal bet size, f, be 2p-1?
- mgraczyk 5y agoYes, looks like a typo. The plots show the correct direction though (f* is an increasing function of p)
- bugzz 5y agoA great investing blog I follow is https://breakingthemarket.com/ https://breakingthemarket.com/. He talks about the Kelly Criterion and extending it to making correlated bets (investments).
- murbard2 5y agoThe Kelly criterion is to financial math as the Fibonacci sequence is to mathematics. Yes it's neat, no it's not special, please stop bringing it up all the time.
- bobbylarrybobby 5y agoThe Fibonacci sequence is not special because it is just one element of the family of linear recurrences. Is there a larger family to which the Kelly criterion belongs? (Not being snide — I’m genuinely asking)
- murbard2 5y agoYes, any utility function will give you a Kelly-like criterion. Kelly is log utility.
- spekcular 5y agoKelly is special though, it's not just log utility. In fact, viewing it as maximizing log utility is ahistorical; the original derivation was in terms of information theory. (The paper's title is "A new interpretation of information rate" [0].) Further, and most importantly, Kelly betting has certain favorable asymptotic properties that betting strategies motivated by other utility functions don't have. See Breiman's "Optimal gambling systems for favorable games" [1]. This point is well known in the literature, for instance see [2]: > Perhaps one reason is that maximizing E log S suggests that the investor has a logarithmic utility for money. However, the criticism of the choice of utility functions ignores the fact that maximizing E log S is a consequence of the goals represented by properties P1 and P2, and has nothing to do with utility theory. [0] https://www.princeton.edu/~wbialek/rome/refs/kelly_56.pdf https://www.princeton.edu/~wbialek/rome/refs/kelly_56.pdf [1] http://www-stat.wharton.upenn.edu/~steele/Resources/FTSResources/KellyBreiman/Breiman61.pdf http://www-stat.wharton.upenn.edu/~steele/Resources/FTSResou... [2] https://pubsonline.informs.org/doi/abs/10.1287/moor.5.2.161 https://pubsonline.informs.org/doi/abs/10.1287/moor.5.2.161
- 5y ago
- pge 5y agoFortune's Formula by William Poundstone is a fun read on the origin of the Kelly criterion, as well as the role of gangsters and bookies in the funding of the early communications infrastructure in the US.
- ArtWomb 5y agoThanks! I'm looking for "history of probability" mass market books and this looks spot on ;)
- sigmaskipper 5y agoUsed an abbreviated version to of the kelly criterion along with Markowitz portfolio optimization and applied it to sports betting. All I can say is that past results do not indicate future returns
- windsignaling 5y agoThe part that all these nice theories miss is that you actually do not know the distribution p(win) (in the case of Kelly) or the expected return and covariance (in the case of Markowitz).
- zorked 5y agoI know I would never be a writer of seminal papers because I would never publish a formula that includes unknowable parameters. Same goes for Black-Scholes which includes _future_ volatility.
- arthurcolle 5y agoIt's a real concern, but more realistically you can just compute many potential outcomes and at least get a sense of the structure of the surface
- tel 5y agoThat's something of a moot argument, though, since BSM computes prices in terms of the future volatility. Since we have the actual price, the volatility is actually what we solve for with BSM. Even if we had neither price nor volatility, we can still talk about the surface of possible (price, volatility) pairs which are compatible with the model.
- hgibbs 5y agoBut how do we get the prices? If I tell you the at-the-money front-month call is $1000 will you tell me the vol is 100pa?
- piyh 5y agoThere's a loose vs lose typo in the second paragraph. It's like school teachers whipped they're, their, there into our heads and where one typo door closes another opens.
- mwcremer 5y agoIts definately a loosing battle.
- sigstoat 5y agoread the original paper. the gambler's formulation is garbage, which obscures all insight.
- kqr 5y agoWhich one is the original to you? Kelly's new interpretation of the information rate? Or Bernoulli's new theory on the measurement of risk? Or one of the other seminal papers describing different aspects of the Kelly criterion?
- jyriand 5y agoHow you will go bust in favorable bet by N N Taleb - https://youtu.be/91IOwS0gf3g https://youtu.be/91IOwS0gf3g
- titanomachy 5y agoAm I missing something? It doesn’t seem counterintuitive to me that repeatedly making an all-or-nothing bet with a non-zero chance of losing will eventually cause my expected value of capital to go to zero. I like the presentation style though, and the allusion to Shannon’s theorem although I didn’t quite grasp the connection.
- oarabbus_ 5y agoRight, I don't think that's the part that's counterintuitive. It's the claim he makes "if someone offers you a bet 70% chance to win a dollar, 30% loss, it's better not to take it in some cases" is what is counterintuitive to people.
- itsdsmurrell 5y agoProbably depends on your aversion to losing it all. If it's a dollar go for it. If it's 100 dollars, again, take the bet. If it's your life savings of 50000 dollars and going to 0 would be worse for you than 70/30 doubling your money, you don't want to go for it.
- kqr 5y agoSure, much like the Kelly criterion would tell you. If your life savings are $50,000, and someone offers you an even odds bet but with a 70 % chance of winning, you get optimal growth by wagering $20,000. However, that assumes you'll get a large number of similar offers so that you can make your losses back later if you get unlucky now. That said, growth is pretty close to optimal even for smaller wagers. This plot shows growth rate as a function of wager size: https://www.wolframalpha.com/input/?i=plot+log%2850+-+x%29*0.3+%2B+log%2850%2Bx%29*0.7%2C+x%3D0..50 https://www.wolframalpha.com/input/?i=plot+log%2850+-+x%29*0...
- mewse-hn 5y agoI read about this on HN and then lost it for months when I wanted to apply it to a crappy game on a random discord server. The game lets you bet on chicken fights and tells you the probability your chicken will win (starts at like 62% chance to win), so this kelly criterion is perfect. It's a bit incredible how reliable it is.
- epapsiou 5y agoThis is so timely. I made this with a buddy of mine to help us figure out optimal allocation for stocks in a portfolio using Kelly. https://engine.oracled.com/ https://engine.oracled.com/
- hatsunearu 5y agoI have no idea how this website works, could you explain?
- epapsiou 5y agoThe probabilities are calculated using options market. Options (and risk neutral distribution) gives you the market implied probability of stock going up/down and by how much.
- Etheryte 5y agoSome estimates end up being negative, is that intentional? E.g AAPL.
- epapsiou 5y agoYes that happens when vol skew are a certain shape. I think better use this link. Gives a better understanding of what is happening https://wiki.oracled.com/ https://wiki.oracled.com/
- nostromo 5y agoIt’s telling me I should short SPY and go long GameStop and AMC… Sounds suicidal to me.
- allyourhorses 5y agoThis is beta hedging, it works on the assumption that when SPY performs positively, your risky basket will outperform SPY, but if there is some systemic risk-off event, your SPY short will at least dampen if not fully cover any losses made in your risky basket Good day, you lose -0.5% on SPY but gain +2% on AMC Bad day, you maybe gain 0.5-1%% on SPY and lose -2% on AMC
- zucker42 5y agoI wonder how professional gamblers approach bet sizing. It seems to me that for most applications the Kelly Criterion is not the right choice. The utility of money is asymmetric; gaining $25000 is worse than not losing $25000. Relatedly, most actual gamblers want to ensure good returns while not going broke, so minimizing risk of ruin is often more important than maximizing return rate. Further complicating the matter is that in real life you don't know your actual probability of success, but you may have an estimation. And finally, though this is less commonly significant, your rate of return in a given game might depend on your the amount you bet. From what I've seen in the poker community, no one has really approached this type of bet sizing from a rigorous perspective beyond the relatively simple Kelly Criterion.
- KerrickStaley 5y agoThe Kelly criterion takes into account the fact that "gaining $25000 is worse than not losing $25000". A game where you have a 50/50 chance of gaining $25k or losing $25k has a negative expectation in the log domain, so per the Kelly Criterion one would not bet on this game. You are right that "your rate of return in a given game might depend on your the amount you bet", this is actually very common. Consider a stock market: buying 1000 shares and selling them a year later will generate less than 1000x the return of buying 1 share and selling it a year later (assuming the stock goes up), because you pay more per share to buy 1000 shares and make less per share when you sell 1000 (because the share price moves as you buy/sell). Related, I really enjoyed this treatment of the Kelly Criterion by Thorp and highly recommend it http://www.eecs.harvard.edu/cs286r/courses/fall12/papers/Thorpe_KellyCriterion2007.pdf http://www.eecs.harvard.edu/cs286r/courses/fall12/papers/Tho...
- LudwigNagasena 5y agoKelly Criterion maximizes the wealth in the long-run. It doesn’t take asymmetric utility into account. It just happens to coincide with log-utility. If there is a fixed amount of bets the Kelly criterion will be suboptimal, but as the number of bets grows the optimal strategy will asymptotically reach the Kelly criterion.
- YossarianFrPrez 5y agoIt's well worth implementing and testing out the Kelly Criterion. It's super simple to code up in a Jupyter Notebook so that you get to enter an amount to bet each time. When I tried it, I found my own psychology changing as the bets continued, even when I knew the coin's bias. It's a really great demonstration of the difference between a) intellectually knowing the optimal strategy, and b) what actually happens. A bet on a biased coin paradigm was actually tried in the real world with finance professionals, with a cap on the maximum payout. The results are described here: https://arxiv.org/pdf/1701.01427.pdf https://arxiv.org/pdf/1701.01427.pdf It's pretty interesting. (Note though that the "average returns" reported hide a lot of variation.)
- kheyasdev 5y agoCould you share a link to the notebook? I think it would benefit everyone to learn about this by applying the criterion.
- kqr 5y agoIt's also worth (I think!) exploring how it generalises past sequences of discrete 0--1 outcomes. There are horse race situations (what Kelly originally modeled), portfolio selection, half-Kelly type strategies in various spaces, and plenty more.
- Schwolop 5y agoThere's a mistake in this: > I won’t go too deep into the math, but it can be shown that G achieves its maximum when f=1-2p Should be f=2p-1
- sdze 5y agoHow about optimal bet sizes in parallel occurrences? It is more important because in portfolio theories you must diversify...
- johndoe42377 5y ago> or decreasing by (1-f) when you lose This is wrong. It decreases by f, not (1-f). (1-f) is what /remains/ after each loss. Everything that follows is just wrong.
- orolle 5y agoYou need to very carefull to apply Kelly Criterion to stock market, as you cannot precisely calculate the p of your investments. If you assume a too high p then you will overbet and its only a matter of time to go bust (see N. N. Taleb MOOCS on Kelly). Thus the Kelly Criterion should be your UPPER bound for real-life investments with uncertain p, stay well below the betting amount what Kelly Criterion would suggest so that you stay longer in game. Related to this, the best investors in the world are quite old guys. Why? Because they lived long enough to accumulate enough wealth to be of public interest.
- Fnoord 5y ago> Notice that when p is 0.4 G is 0. What this basically means is that you should never bet if the odds are against you. Unless if you have a higher or other goal. For example, because you want to impress a woman, because your name is James Bond, or because (more likely) you earn as a result of the related drama of an outlier. This is why sometimes we see people losing and they gain from it on the longer term; they gain from it via advertising, for example. Influencers, advertisers, marketeers, terrorists -- they all abuse this mechanism.