1. #1
    jokerjoe
    jokerjoe's Avatar Become A Pro!
    Join Date: 05-29-08
    Posts: 10

    Simultaneous Event Kelly (Mut Ex) with changing prices

    I'm looking for some help in extending Ganchrow's Simultaneous Event Kelly for mutually exclusive outcome events as outlined here.

    I coded it up and it works beautifully, my problem comes from my pretty much exclusively using betting exchange Betfair. In order to not affect prices I often drip feed an order in, however whilst this is going on the price is virtually guaranteed to move, sometimes significantly.

    What should I do when the price moves and I've already got part of my money down?

  2. #2
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Have you tried playing around with http://www.sportsbookreview.com/forum/handicappe...readsheet.html at all?

  3. #3
    jokerjoe
    jokerjoe's Avatar Become A Pro!
    Join Date: 05-29-08
    Posts: 10

    I have looked at it previously but I wasn't sure if I could apply it directly as changing implied probabilities would be changing the quotient in the mut ex kelly algorithm.

    I think I see what's going on, I've just come across another of your posts though ("Another Kelly Conundrum"). I feel that approach of keeping tabs of the trading p/l as I build the full stake is more intuitive and will be better for me from a programming perspective, p/l I can then realise before the market goes in play.

    On a sidenote I'd be grateful for any suggestions on how to calculate the effective odds when betting multiple selections in a market where one pays commission on net winnings, specifically again I'd be using the mut ex kelly algorithm. There seems to be a circular problem whereby the effective odds change with amount wagered, the optimal amount of which changes depending on the effective odds.

  4. #4
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by jokerjoe View Post
    On a sidenote I'd be grateful for any suggestions on how to calculate the effective odds when betting multiple selections in a market where one pays commission on net winnings,
    For backing a single side of a market, check out the Exch2Dec() function of my http://www.sportsbookreview.com/forum/handicappe...tml#post256487.

    The formula it uses for calculating net odds after commissions is:
    NetOddsAfterComm = Commission + (1 - Commission) * GrossOddsBeforeComm

  5. #5
    jokerjoe
    jokerjoe's Avatar Become A Pro!
    Join Date: 05-29-08
    Posts: 10

    I'm happy calculating net odds, it's just that it will be an underestimate of the true odds if you're betting on more than one outcome (more than one horse in my case), the commission will be smaller as the net win contains losing bets. My problem is that the true odds is thus determined by the bet size, but the correct bet size is in itself affected by the true odds.

    I'm guessing there's no easily solvable closed form solution, should I accept the underestimate?

  6. #6
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by jokerjoe View Post
    I'm happy calculating net odds, it's just that it will be an underestimate of the true odds if you're betting on more than one outcome (more than one horse in my case), the commission will be smaller as the net win contains losing bets. My problem is that the true odds is thus determined by the bet size, but the correct bet size is in itself affected by the true odds.

    I'm guessing there's no easily solvable closed form solution, should I accept the underestimate?
    Because in a multiway market differing outcomes will yield differing financial results, it's not particularly convenient to speak in terms of binary outcome odds for Kelly purposes. While a closed form solution certainly does exist, it requires some rather tedious linear algebra and as such I'd suggest it far simpler to look at actual raw outcomes.

    You might want to try playing around with the attached spreadsheet.

    The second worksheet page ("AddTrades") will demonstrate the impact of additional back or lay wagers (shown on worksheet page "Main").

    Worksheet "Main" also permits for a simple Kelly optimization using Excel Solver.

    No guarantees as to bug free-edness.

    (Btw, the cell entitled "# of Outcomes" currently doesn't do anything. Regardless of the value in the corresponding cell, the # of Outcomes is essentially hardcoded to 10.)
    Attached Files

  7. #7
    jokerjoe
    jokerjoe's Avatar Become A Pro!
    Join Date: 05-29-08
    Posts: 10

    Thanks that's given me food for thought, I'll start looking into incorporating a Kelly optimization into my sheets.

    A quick question, if the price goes out then my understanding is that it's optimal to add to the position. And the reverse applies, if the price comes in it's optimal to lay off/take the other side(s) right? Also given the back/lay price spread it probably only makes sense to either back or lay a selection at a time if a price taker?

    edit: Just to clarify I ask the first part as it's not immediately obvious from reading the Another Kelly Conundrum thread, but the line change kelly spreadsheet indicates that if the price comes in you would take the opposing side even if it has a negative edge. And I ask the second question about the spread to check whether that should be constraint on the optimization.
    Last edited by jokerjoe; 06-27-09 at 09:05 AM. Reason: clarification

  8. #8
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by jokerjoe View Post
    A quick question, if the price goes out then my understanding is that it's optimal to add to the position. And the reverse applies, if the price comes in it's optimal to lay off/take the other side(s) right?
    In general this would be correct.

    Quote Originally Posted by jokerjoe View Post
    Also given the back/lay price spread it probably only makes sense to either back or lay a selection at a time if a price taker?
    I fail to see why this would be true in general.

    Quote Originally Posted by jokerjoe View Post
    Just to clarify I ask the first part as it's not immediately obvious from reading the Another Kelly Conundrum thread, but the line change kelly spreadsheet indicates that if the price comes in you would take the opposing side even if it has a negative edge.
    Yes, and this is indeed implied by the equations in the aforementioned post.

    Also, you'll note that the above spreadsheet now contains a column on the main page entitled "Net Back", which refers to the decomposed net position for each of the given bets at the current back price. (You'll need to download a new copy for this to work.)

    This needs to be looked at in conjunction with the cell labeled "M2M P&L", which shows the current "marked-to-market P&L" after marking each position to the current back price.

    You'll further note that in order to make the problem solvable, and in order to avoid negative back exposures, the P&L is seeded by assigning to the wager corresponding to the outcome with the smallest gross exposure a net back exposure of zero.

  9. #9
    jokerjoe
    jokerjoe's Avatar Become A Pro!
    Join Date: 05-29-08
    Posts: 10

    Quote Originally Posted by Ganchrow
    Quote Originally Posted by jokerjoe
    Also given the back/lay price spread it probably only makes sense to either back or lay a selection at a time if a price taker?
    I fail to see why this would be true in general.
    If a price taker then the back price will always be lower than the lay price, for each selection across the field. So if backing and laying an equal amount on any one selection the outcome will be neutral if the selection loses and negative if it wins. Surely that implies it'll never make sense to both back and lay a selection as one could deduct the larger of the back and lay amounts from the other and have a greater expectancy in both bankroll and utility terms?

    Mind you the optimizer only seems to spit out such situations where arbs exist. I've changed a few minor things on the spreadsheet, notes on the sheet. Your new function is great, thanks!
    Attached Files

  10. #10
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by jokerjoe View Post
    If a price taker then the back price will always be lower than the lay price, for each selection across the field. So if backing and laying an equal amount on any one selection the outcome will be neutral if the selection loses and negative if it wins. Surely that implies it'll never make sense to both back and lay a selection as one could deduct the larger of the back and lay amounts from the other and have a greater expectancy in both bankroll and utility terms?
    Yes, clearly so. However, there's no need to constrain the optimizer thusly as provided no arb exists, it would never be optimal to buy both the back and lay simulatenously. (Caveat: If overround were somehow exactly zero for a back/lay combination -- a situation that by design you'd never see on a Betfair market -- then results could be unpredictable.)

    Quote Originally Posted by jokerjoe View Post
    I've changed a few minor things on the spreadsheet, notes on the sheet. Your new function is great, thanks!
    Will check it out, thanks.

  11. #11
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by Ganchrow View Post
    Quote Originally Posted by jokerjoe View Post
    I've changed a few minor things on the spreadsheet, notes on the sheet. Your new function is great, thanks!
    Will check it out, thanks.
    One comment:

    changed gross outcome and vAddTrades - Your modification of the vAddTrades() function would only be accurate were the Lay quantities on the AddTrade sheet to represent win amounts. To keep things consistent however, I have them corresponding to risk amounts, which is why I'd recommend against your change.

    Other than that looks good to me. Let me know if you have any additional thoughts, comments, concerns, questions.

Top