Bertie: the basics

Bertie has been written in Python and uses a PostgreSQL database. He sits on Betfair’s exchange and offers prices for which punters can bet. Let’s break each of these down.

Python is a programming language. I chose Python due to a combination of its clear syntax, huge selection of libraries built for data analysis and transformation, and the fact that it is open source.

PostgreSQL is a relational database management system which is possibly the most advanced open-source system around. I chose PostgreSQL due to Bertie’s design having multiple simultaneous read-write operations.

The Betfair Exhange operates as a marketplace. This means that Betfair does not get involved in setting a price, and allows users to determine the appropriate price. This may best be explained using the upcoming Ice Hockey match, Boston Bruins vs Ottawa Senators. On Betfair, if you wish to bet on a team to win, you will see something like the below:

Boston Bruins vs Ottawa Senators

The prices in blue are the best prices available to bet on each team. If you believe that Ottawa Senators are going to win this match, you could place a bet on them at a price of 2.22. This means that when you bet £1 you would receive £2.22 back if Ottawa were to win (including your £1) for a net win of £1.22.

Conversely, see the red 2.28 next to Ottawa? This is the price someone else wants to get to bet on Ottawa Senators. If you thought that Ottawa were going to lose, you could accept that person’s bet at 2.28. This means that for every £1 you have accepted, you would have to pay £2.28 (including the £1 the bettor has given you), for a net loss of £1.28.

The numbers you see below the bolded (£310 in blue , £51 in red on Ottawa) shows you the market depth – that is, the amount of money available to bet at those prices. If you wish to bet more money than that, you will have to accept worse odds in order to bet.

 

What if I want a better price? Let’s say that I want to bet on Ottawa but I do not like the 2.28 price. I can choose to post any price I wish onto the marketplace:

Ottawa Bet

This will place me directly into the exchange, and my bet will appear alongside the others, forming the market as you saw above.

Bertie only operates on the lay side, that is, provides the price for punters to bet on their favourite team winning. Bertie attempts to provide a slightly worse than fair price to the exchange, in the hopes that an equivalent amount is bet on both sides for a guaranteed profit. Bringing it back to the example: what prices did Bertie choose for this market? Turns out he chose to straddle the market lines..

Boston Ottawa Bets

Is this profitable? Well, if I were to have £100 matched at the above prices, I would make 90 pennies. Not exactly an earth shattering amount, but it should be noted that Bertie makes approximately 100 markets a day, so the potential adds up (note, my average return per market is currently approx £0.13).

 

Leave a comment

Website Powered by WordPress.com.

Up ↑