[horse races] How to sort horses by odds in a simple manner?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fdsafds
    Junior Member
    • Jul 2022
    • 23

    #1

    [horse races] How to sort horses by odds in a simple manner?

    I have historical data for horse races. I'm trying to figure out an algorithm of how to:

    for any given date/event:

    * take top N horses in the descending order (winner will go 1st, then - horse on the 2nd place, etc...)

    * attach odds to each one

    * data should be as close to "start" time as possible; that is, the most recent will have presedence over the old one, and overwrite them


    But what prevents me is understanding how to combine all those files for an event: "$event_id" and "1.$market_id", in a directory of an event.

    And what data should I actually take, except "runners'? Whilst having in mind that there're market changes too.

    So how to do it, what would be a simple algorithm? I don't need perfect solution, rather one which will just do.


    P.S.
    I'm a developer - able to program
    Last edited by fdsafds; 30-07-2022, 03:03 PM.
  • fdsafds
    Junior Member
    • Jul 2022
    • 23

    #2
    Or rather: is the amount of information in the historical data of the BASIC tariff even suffient to determine the order in which top N horses finished?

    Comment

    • BetfairDeveloperProgram
      Administrator
      • Oct 2008
      • 680

      #3
      The BASIC files specifically show the change in the last traded price of every selection in a market at 1-minute intervals. They do not provide details showing the order in which the horses have finished, only the WINNER and LOSER in the final marketDefinition message at the end of each file.

      You can find sample code for visualizing the historical data files via https://docs.developer.betfair.com/d...HistoricalData

      Comment

      • fdsafds
        Junior Member
        • Jul 2022
        • 23

        #4
        Alright, thanks

        Comment

        • prasedenica
          Junior Member
          • Aug 2022
          • 3

          #5
          Originally posted by BetfairDeveloperProgram View Post
          The BASIC files specifically show the change in the last traded price of every selection in a market at 1-minute intervals. They do not provide details showing the order in which the horses have finished, only the WINNER and LOSER in the final marketDefinition message at the end of each file.

          You can find sample code for visualizing the historical data files via https://docs.developer.betfair.com/d...HistoricalDataduck life
          zz0.0us6g1sr1w3zz
          Thanks for the sample code you shared. Really helpful for me

          Comment

          Working...
          X