Published on Feb. 3, 2020, 10:40 a.m. - Sports: Horse Racing
After observing a couple of UK / IRE horse racing markets on Betfair, we noticed that shortly after the creation of the market lay bets were placed in the range between 1.01 and 1.07.
We basically opened a horse racing market on Betfair shortly after it was published on the exchange website. The horse race would only start on the next day obviously there is not much of liquidity in such a market yet, no bets were matched.
What we could observe though was a very regular pattern in bets that were placed on the lay side with low odds, in the range between 1.01 and 1.05 as shown in the following screenshot:
A closer look on the market ladder would show that orders were placed in the range between 1.01 and 1.05:
It was pretty obvious to us that these bets were not manually placed (who would have the time to do this?) - a betting bot is placing these orders. We were then keen to learn more about the motivation behind these orders and we conducted a backtest on historical data to see if this approach is profitable.
Historical data for Betfair is available on https://promo.betfair.com/betfairsp/prices. The data also includes the minimum odds that were traded inplay, however only payouts with more than 100 GBP are reflected in the data. We use a Python script to download the csv data and store it in a PostgreSQL master database. With SQL statements strategies can then be tested on historical data.
The backtest was conducted on UK and IRE horse racing win markets that were available on Betfair between 1 Jan 2014 to 10 Jan 2020. For the odds limit we used 1.01, a lay bet would be placed at this price. Constant staking of 1 point per selection is used, Betfair commission is omitted for a first backtest. The following SQL statement was used to conduct the backtest:
SELECT *, CASE WHEN win_lose THEN -(1.01 - 1) ELSE 1 END as profit FROM data WHERE ipmin <= 1.01 and (market='pricesukwin' or market='pricesirewin')
The result of the backtest is:
Our first attempt with deploying this strategy in production was rather simple: We used a cron job that would run every minute and check for new horse racing markets. As soon as a new market was detected, lay bets were placed with a limit of 1.01.
After running this bot for one month the results were very disappointing: In cases where selections were traded at 1.01 and still lost, our lay bets were often not matched. This left us behind with a significant loss although the backtest that we applied for the month shows a profit. Although our bets were not placed in these instances, others had more success and their 1.01 bets got matched.
We then asked ourselves: How can this happen? Unfortunately we was not able to find any details on how bets are matched: We would assume it happens on a "first come first served" basis (if you know anything about this, please comment below!). Based on this assumption, the conclusion is that we are too slow in placing orders and that it is all about speed of execution to make this strategy profitable.
If you have any suggestion on how to improve, we would be curious to learn - please comment below. At the moment a virtual private server based in London is used to deploy the strategy and to reduce network latency. We are also looking into using the Exchange Streaming API for low latency access to the exchange market. Stay tuned, we'll keep you posted on this betting strategy!
No comments published yet.
Please log in to leave a comment.
If you would like to learn more about this strategy, please do not hesitate to contact us.Contact Us!