Announcement

Collapse
No announcement yet.

Re-Calculating Projected SP (Near)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Re-Calculating Projected SP (Near)

    Hi,

    I am working with the projected SP (near) price.
    I've noticed that it seems that the near price is calculated by betfair once, and then cached and returned without recalculation for a certain length of time (a minute perhaps?)

    I am working on something where I would like to know the near price based on the current market, and not with a potentially outdated value. A lot of markets don't move all that quickly, but the last minute on greyhound Win markets do.

    I know there are some details given here: https://promo.betfair.com/betfairsp/...dWorkings.html but I'm looking at calculating the exact near price myself.

    I will be calling `listMarketBook` with Project Projections of SP_TRADED and EX_ALL_OFFERS - I expect to be able to recreate the near price from this?

    Has anyone done something similar before with any success? My thought is to first match the SP_TRADED values for backing at 1.01 and laying at 1000, then to include more cash on whichever side of the SP has offers available at limited prices (so say the highest BACK limit offer is 6.0 but the initial SP value was 5.0, we would add more to the back side).

    Then after this, consider matching existing money from the exchange at the given price and see where that pushes the SP. Do we then cycle back to see if even more SP limit orders can be matched?

    I know we can get the NEAR price from the API passing in SP_AVAILABLE as the price projection, but its largely not that useful, as its constantly out of date.

  • #2
    So, last night I ran a test. 1 second before the advertised start time of each race, I logged the Near price on the API, as well as a near price that I calculated using the SP traded, as well as all exchange offers. This morning I came and compared those predictions with the actual BSP for each runner, and looked at the error for each.

    the Betfair API Near price was off, on average, by 8.75% with a standard deviation of 10.5%. my own calculation was off, on average, by 6.02% with a standard deviation of 8.9%. So I am able to calculate and get a better number on average.

    I'd love to improve on this, but not sure I really can from here. Would love to know if anyone can do better.

    Comment


    • #3
      Similar results today, haven;t changed how I calculate things but I've improved how I collect the data a little. Have stats for all time (a day and a half so far) and all of yesterday here, looks like I'm fairly consistent with a closer prediction... but its still a long way out. would love to improve it further...

      Click image for larger version

Name:	image.png
Views:	132
Size:	13.8 KB
ID:	39207Click image for larger version

Name:	image.png
Views:	18
Size:	13.7 KB
ID:	39210​​

      Comment

      Working...
      X