+ Reply to Thread
Results 1 to 15 of 15

Kelly Formula

  1. #1
    Registered User
    Join Date
    02-28-2015
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    52

    Kelly Formula

    Hello. I'm reading the Dhandho Investor by Pabrai. There's a section in it that uses the Kelly Formula. However, this calculator is no longer available (the website shut down).

    Can the Kelly Formula be generated in Excel? If not, do you know where I can find one for multiple outcomes (3 or more)?

    I am looking to use it to determine how much I should bet when I'm offered the odds.

    Here's an example

    With a $1 bet and a $10,000 bankroll:

    80% chance of winning $21.00
    10% chance of winning $7.50
    10% chance of losing it all

    Using the Kelly Formula calculator, Pabrai stated I should bet $8,940 or 89.4% of my bankroll.

    Best regards,

    James

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,288

    Re: Kelly Formula

    Here's just one that came up in a Google search: http://www.albionresearch.com/kelly/
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-28-2015
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    52

    Re: Kelly Formula

    Thanks Ali. However I need one where it can calculate multiple outcomes.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,809

    Re: Kelly Formula

    Assuming this wikipedia page is the correct description of the kelly formula, it does not look overly complicated or difficult to program into Excel. https://en.wikipedia.org/wiki/Kelly_criterion It looks like a relatively simple formula relating the fraction you should bet to the probability of winning and the offered odds. As simple as the formula appears:
    Is this the correct formula?
    If it is correct, what difficulty do you have programming that formula in Excel?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    02-28-2015
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    52

    Re: Kelly Formula

    Quote Originally Posted by MrShorty View Post
    Assuming this wikipedia page is the correct description of the kelly formula, it does not look overly complicated or difficult to program into Excel. https://en.wikipedia.org/wiki/Kelly_criterion It looks like a relatively simple formula relating the fraction you should bet to the probability of winning and the offered odds. As simple as the formula appears:
    Is this the correct formula?
    If it is correct, what difficulty do you have programming that formula in Excel?
    Hi I did not see the formula that you posted.

    The only formula that I see in the Wikipedia is one with two outcomes. This part I understand. However, I'm looking for the formula for multiple outcomes such as the example I made in my original post.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,809

    Re: Kelly Formula

    I am not at all familiar with Kelly's paper or his formula algorithms, so I am dependent on you and any other source I can find to try to understand Kelly's formula(s). If the Wikipedia page is inadequate, then I would need you to help me understand the math formulas/algorithms you are trying to program here before I can help you program those algorithms into Excel.

    Is it possible that the "multiple horses" section of the Wikipedia article describes what you are trying to do? This described algorithm requires a few iterations, but the basic equations along that iteration seem simple enough that one should be able to program those equations into Excel and figure out the iterations needed.

    If anyone else is more familiar than with these equations/algorithms/strategies, I invite them to contribute. If I am going to help, I need some help from you to understand the math/algorithm you are trying to program into Excel.

  7. #7
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Kelly Formula

    I think this can be done in solver, though I don't have any real experience with Solver or the Kelly formula. With the percentages in A2:A4, the odds/returns in B2:B4, and the bankroll in E1, I put the following formula in H1:

    =SUMPRODUCT($A$2:$A$4,LOG10(1+$B$2:$B$4*$E$2))

    ...and used solver on evolutionary method (5 sec. time w/o improvement) to modify E2 to maximize the solution. The return was: 0.894356966441641. Multiply that by the bankroll to get your $ bet.

    There's probably a better way, but this seemed to work? You should be able to incorporate more alternatives without difficulty by expanding the A2:B4 range.
    Attached Files Attached Files
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Kelly Formula

    If you have an 80% chance of winning $21 on a $1 bet, and 10% of winning $7.50, that's equivalent to having a 90% chance of winning $17.55, which is 18.55:1 expressed in bookie odds. So:

    A
    B
    C
    D
    E
    1
    name
    p(win)
    win
    2
    80%
    $ 21.00
    3
    10%
    $ 7.50
    4
    Combined:
    p
    90%
    B4: =B2 + B3
    5
    $ 17.55
    C5: =SUMPRODUCT(C2:C3, B2:B3)
    6
    Bookie Odds
    b
    18.55
    C6: =C5 + 1
    7
    Kelly sez bet
    89.461%
    D7: =(b * p - (1 - p)) / b


    You could add any number of other payoffs in like fashion.
    Last edited by shg; 07-26-2017 at 10:47 AM.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Kelly Formula

    Rereading the Wikipedia article, my last post has an error.

    The wiki sez ...

    b is the net odds received on the wager ("b to 1"); that is, you could win $b (on top of getting back your $1 wagered) for a $1 bet
    I read b and thought "bookie", but b as described is decimal odds, not bookie odds, so you don't add one. So,

    B
    C
    D
    E
    4
    p(win)
    win
    5
    80%
    $ 21.00
    6
    10%
    $ 7.50
    7
    Combined probability (p) & odds (b):
    90%
    $ 17.55
    8
    Kelly sez bet this fraction of bankroll:
    89.43%
    D8: =p - (1 - p) / b


    I'm going to feel really bad if you've lost your life savings as a result of this.

  10. #10
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Kelly Formula

    Quote Originally Posted by shg View Post
    I'm going to feel really bad if you've lost your life savings as a result of this.
    Ha! At least this approach should keep him solvent longer than all of the OPs who request help with a Martingale gambling strategy.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Kelly Formula

    Amen .

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Kelly Formula

    Well ...

    I found Kelly's original paper (newly typeset) at https://www.princeton.edu/~wbialek/r...s/kelly_56.pdf, and it defines (toward the bottom of page 920):

    a_s the odds paid on the occurrence of the s'th transmitted symbol, i.e., a_s is the number of dollars returned for a one-dollar bet (including that one dollar)
    That "including that one dollar" part makes it bookie odds, which means the 1 should be added.

    So ... I dunno.

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Kelly Formula

    After rethinking this and looking at some earlier stuff, I realized my definitions of bookie odds and decimal odds are exactly reversed . The bookie odds of drawing a diamond from a standard card deck are 3:1; you get $3 plus your $1 bet back. Expressed in decimal odds, that's 4:1; that's what you get back if you win, and it includes your $1 bet.

    Soooo ... the words are misleading in post#9, but the calculation is the correct one.

  14. #14
    Registered User
    Join Date
    02-07-2016
    Location
    Barcelona. Espaņa
    MS-Off Ver
    2016
    Posts
    20

    Re: Kelly Formula

    Would it be considered necro-posting to bring back this thread? It's not as old, and perhaps someone knowledgeable could have valueable input they could share.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Kelly Formula

    Not necro-posting (although I had a good chuckle at that term), however it would be considered hijacking, which is a big no-no lol, so thanks for asking 1st (see Rule 2 of our Forum [/I][URL="http://www.excelforum.com/forum-rules/642590-forum-rules.html"]

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  2. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  3. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1