Posts Tagged ‘Betfair API’
Comparing horses from different sources – the problem
Thursday, May 6th, 2010A recurring problem in developing automated betting strategies is accounting for differences in horse names from different data sources, when in fact each source is referring to the same animal.
We discuss the logic behind betting strategies that use different sources in Automatic Exchange Betting. In summary, an automated betting strategy may require various inputs that are only available from multiple data sources, – just as a manual betting strategy does. For example, one data source may contain a horse’s form, another may contain current exchange or bookmaker prices for the horse, and another a news feed we want to scan for information on a specific horse before betting.
This problem isn’t just limited to programming betting robots, it also applies to basic research – for example collecting and retrieving Betfair market prices for any given horse name, when the horse name you want to fetch prices for does not come from Betfair to start with.
In fact, the Betfair case is the most frequent issue that we deal with in automatic betting. Take a few examples from today’s racing:
Raddy ‘ell Pauline runs in the 4.30 at Chester, Mioche d’Estruval runs in the 5.25 at Newton Abbot, What’s Occurrin runs in the 6.50 at Wetherby, and Mandy’s Princess runs in the 3.55 at Chester. These horses are listed in Betfair as Raddy ell Pauline, Mioche DEstruval, Whats Occurrin, and Mandys Princess, respectively.
Spot the problem? In most cases, Betfair simply misses the apostrophe from horses’ names as a matter of policy. Occasionally there are also capitalization problems, as with the Betfair rendition of Mioche d’Estruval above.
Let’s imagine that these four horses came from an automated selection list produced by Smartform (which lists all the horse names correctly, ie. as they were registered by their owners). We now want our betting robot to use the Betfair API to retrieve prices for each horse, and if those prices meet a certain minimum, we want to bet on each horse.
Unfortunately, if we simply present the correct horse names to our betting program we will be in trouble – the Betfair API won’t recognize them. We’ll get neither the prices we asked for, nor will we be able to bet on these horses – or do anything else with the Betfair API for these runners unless we take some action first.
Fortunately there are a number of simple approaches to resolving this, the easiest of which can be done within Smartform without resorting to using a programming language at all – more on this tomorrow.
Finding winners automatically
Thursday, April 29th, 2010Automating the betting process was possible for some time before the emergence of the Betfair API and writing Automatic Exchange Betting, but making the process reliable was a challenge. Betfair’s API created a robust way to programmatically access market data and place bets via the exchange (as opposed to a web scraping approach), but there was still no good way to automate the selection of bets themselves. This required unreliable and/or manual processes to either export data from one of the traditional interactive racing databases, such as Raceform Interactive, or to write robots to scrape the web from online form sources (which was unsatisfactory for various reasons – grey area of site usage, changing page formats, incomplete data, to name a few).
So, to make the selections part of automating the betting process more robust, Betwise created the Smartform database before publication of the book by licensing copious racing data for Members’ personal use back in 2007, designing it for automated updates from original sources, and making it as easy as possible to create and run programs to do just about any aspect of form analysis and output selections for automated betting; no manual ‘data exports’ necessary.
Along with the Betfair API, the service completed the DIY betting automation picture. For sure, programming is not everyone’s cup of tea, but if a bettor has a manual betting process that can be well described, it is a good candidate for automation since any good betting strategy, automated or otherwise, begins with data.
An example I used in a magazine article just before the book was published illustrated just how simple the principles of automated betting can be. We looked at a straightforward case that can be considered at one particular racecourse to show how even analysis of a single variable could be turned into a useful automated strategy for certain types of races. For a more general approach to all races, of course, it makes sense to look at more sophisticated models for predicting performance which use multiple factors.