Saturday, 14 March 2009

Automated betting with BetFair, Business Intelligence and Eclipse BIRT

When you place a single bet on a tennis match (market), you need to decide, which tennis player (runner) to bet on. Usually it’s based on your intelligence. By your intelligence I mean experience, knowledge, common sense, etc. When you use automated betting, then you place a lot of bets every day and the decision process becomes much more complicated. I this case you need something more than your intelligence, what you need is a Business Intelligence (BI).

Regarding to Wikipedia, Business Intelligence (BI) refers to skills, technologies, applications and practices used to help a business acquire a better understanding of its commercial context. In my betting application I use Business Intelligence for:
  • Historical data analysis – e.g. create reports/charts to show profit for sports/regions over the time.
  • Data mining – e.g. to recognize some particular situations when I win or lose.
  • Automated decision making system - based on evolutionary algorithms, e.g. eliminate wrong betting strategies during evolution process.
In this post I describe how I analyse historical data using Eclipse Business Intelligence and Reports Tools (BIRT) technology. Eclipse BIRT is an open source Java project from IBM and it’s a powerful tool, especially to create custom multi dimensional reports and charts. It provides easy to use GUI designer to create and run reports. The GUI designer can be used as a stand alone application or a plugin in Eclipse IDE. Also a web based reports viewer is provided, which in my opinion isn’t very good. Finally there is a very well documented API, that allows to integrate BIRT charts and reports into a thirt-party applications.

The examples below present BIRT chart and table report integrated into web console of my betting application.

Figure 1 Profit per week over the time.

Figure 2 Profit per sport/region over the time.

How I use Eclipse BIRT?

In my betting application BIRT reports and charts are integrated into a web console, which is based on a Wicket framework. The figure 3 presents all components involved in designing, generating and presenting reports to the user.

Figure 3 Design of Birt reports.

Diagram details:
  • ReportsViewer - Allows to choose report and values for report parameters and displays report to the user as html page. List of available reports is obtained from reports directory on a file system.
  • Reports files - BIRT reports created by reports designer.
  • Reports Designer - GUI reports designer provided by Eclipse BIRT (see Figure 4). It's a powerful tool and allows to create almost all types of reports and charts you can ever think about. The best is that it can be used by a non technical person, e.g. business intelligence specialist. Also it is possible to parametrize reports, e.g. create report to show profit per sport/report with two input parameters: sport and region.
  • BirtEngine - Generates report in a html/pdf format based on a report file and reports data from data source, e.g. from database.
  • Database - Repository of betting history, e.g. account statement, markets, bets, prices.

Figure 4 BIRT Designer.


Business Intelligence is a crucial element of every automated betting application. Correctly used can significantly improve performance of betting. Moreover, it discovers new horizons and ways of betting hidden behind a huge amount of historical data.