Calculation of PROFIT in complicated cases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 8m0
    Junior Member
    • May 2022
    • 8

    #1

    Calculation of PROFIT in complicated cases

    Hi,

    Could someone please help me with formula to calculate PROFIT in cases when there are bets set for both players in Tennis?
    I have wasted on this a lot of time already, so I am asking not because I am lazy, but because I am close to desperate.

    I grabbed formula from here: https://support.developer.betfair.co...it%20criteria.

    Green up RESULTS for each bet:
    Pablo back: -0.58, lay: -0.41
    Dan back: -1.45, lay: -0.39

    I tried these combinations for each player side result:
    1. Pablo back + Dan lay: -0.97
    2. Dan back + Pablo lay: -1.8599999999999999

    It looks like second combination close to BF PROFIT value, but why there is a difference? Almost every time my results differs from BF results.
    The match on screenshot isn't In-Play, and will start next day I am testing it, so this are not actively changing values.

  • TooLateToTheParty
    Junior Member
    • Jan 2021
    • 10

    #2
    Is it possible there are small stakes (not being displayed) at prices between 1.84/1.97 Ruiz and 2.04/2.2 Michalski that you're unable to see and therefore can't include in your calcs?

    Comment

    • 8m0
      Junior Member
      • May 2022
      • 8

      #3
      Originally posted by TooLateToTheParty View Post
      Is it possible there are small stakes (not being displayed) at prices between 1.84/1.97 Ruiz and 2.04/2.2 Michalski that you're unable to see and therefore can't include in your calcs?
      Hi, thanks for your answer.
      I just got info from clearedOrders, here how it looked the time screenshot was made:

      Pablo back 1.85 - $4.15
      Pablo back 1.84 - $5.00
      Pablo lay 1.96 - $3.00
      Pablo lay 1.97 - $3.00
      TOTAL(avg): back 1.845 - $9.15, lay 1.965 - $6.00​​

      Daniel back 2.04 - $5.00​
      Daniel back 2.04 - $10.00​
      Daniel back 2.04 - $2.00​
      Daniel back 2.04 - $3.00
      Daniel lay 2.2 - $5.00​​​
      TOTAL(avg): back ​2.04 - $20.00, lay ​2.2 - $5.00

      So it's pretty much the same values I got yesterday, nothing changed .

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        Did you account for commission on your winnings?

        Comment

        • 8m0
          Junior Member
          • May 2022
          • 8

          #5
          Originally posted by jabe View Post
          Did you account for commission on your winnings?
          You mean include marketBaseRate for calculation of each green up result?
          Last edited by 8m0; 29-11-2022, 08:27 PM.

          Comment

          • geoffw123
            Senior Member
            • Mar 2014
            • 250

            #6
            I read this as a net losing market, so there should be no commission payable should there ? Not that it helps, but I cant spot how the -£1.79 figure is calculated either.

            Comment

            • jabe
              Senior Member
              • Dec 2014
              • 705

              #7
              If you back Pablo at 1.84 for $13.43 you end up losing $1.78 whoever wins. Maybe there are some other fractions that get the other cent off. Don't know where the $11.27 cash out figure is from.

              Before you ask, the $13.43 is from trial and error on a spreadsheet, so not really enough of a help.



              Okay, on later thoughts, the calculation is this:

              Don't know what the stake is yet. Call it S.

              For Pablo, the profit will be S x (1.84 - 1) + current profit = S x 0.84 - 13.06

              For Dan, the profit will be 11.65 - S

              For them both to be the same,

              0.84S - 13.06 = 11.65 - S

              Putting the stake terms on the left and the other terms on right gives

              S(0.84 + 1) = 11.65 + 13.06

              S(1.84) = 24.71

              S = 24.71 / 1.84

              which is 13.43, rounded to the nearest cent.

              Profit for Dan is now $12.65 - $13.43 which is -$1.78.


              Last edited by jabe; 30-11-2022, 12:17 AM.

              Comment

              • 8m0
                Junior Member
                • May 2022
                • 8

                #8
                Originally posted by jabe View Post
                Don't know where the $11.27 cash out figure is from.
                Hi, thank you for your answer.
                $11.27 = $13.06 - $1.79, basically liability - calculated Green Up profit.

                Comment

                • 8m0
                  Junior Member
                  • May 2022
                  • 8

                  #9
                  Originally posted by geoffw123 View Post
                  I read this as a net losing market, so there should be no commission payable should there ? Not that it helps, but I cant spot how the -£1.79 figure is calculated either.
                  Hi, yes... i think i have been sitting with calculator for more than one week already...... I've seen somebody asked BF to open their api for Green Up, no reaction ofc

                  Comment

                  • geoffw123
                    Senior Member
                    • Mar 2014
                    • 250

                    #10
                    Nice one Jabe, yep that makes sense now.

                    For the general equation I think its ......
                    Code:
                    if Player 1   back price=bp1        Player 1 back stake=bs1
                    if Player 1   lay price=lp1         Player 1 lay stake=ls1
                    ​etc
                    
                    Then
                    
                    S = (bs2*bp2 - ls2*lp2 - bs1*bp1 + ls1*lp1)
                        ---------------------------------------
                                          bp1now
                    
                    Profit for Dan is then $11.65 - S which should be -$1.78
                    But dont sue me if I got that equation wrong

                    Comment

                    • 8m0
                      Junior Member
                      • May 2022
                      • 8

                      #11
                      Originally posted by geoffw123 View Post
                      Nice one Jabe
                      Yes! I wonder why there is no info about it in google for all that time.... So much time wasted...

                      Comment

                      Working...
                      X