How To: Run TensorFlow in Exasol Community Edition

There is one big reason, why I have chosen Exasol as a database for my football analytics and predictions: Exasol is capable of executing Python and R code inside the database. Your are able to put your statistical calculations and predictive models to your data. The feature User Defined Functions (UDFs) provides the possibility to implement every logic which you normally code in Python or R. This is a really efficient way to extent plain SQL with some predictive functionality like the execution of TensorFlow models.

In this blog post I will explain, how you extend the Exasol community edition with all needed Python3 packages to execute Tensorflow models. Additionally with the latest update I also added the packages and description needed for all my web scrapping scripts.

Continue reading “How To: Run TensorFlow in Exasol Community Edition”

HowTo: Losing streaks & stake size

I regular listen the Business of Betting Podcast, when driving to work. There I stumbled over a episode, where a experiment with a 60/40 coin was discussed. People were provided a modified coin, which shows head with a probability of 60%. Knowing this fact they should choose a stake, which they think maximizes their profit, and flip the coin 100 times. The result of this experiment was really surprising: Despite a positive edge many people gone busted. But why did this happen?

Continue reading “HowTo: Losing streaks & stake size”

Connecting to Exasol via Python

As mentioned in the last post, I am now going to use TensorFlow to build my first own predictive model. But before, there are several small steps, which need to be taken. At first I want to explain, how your able to read and write data via a Python script into Exasol. This is needed to read the different predictive variables and write back results of a prediction into the database when developing models.

Continue reading “Connecting to Exasol via Python”

Calculate odds for lay markets based on back markets

Some days ago I read an interesting article about how bookies arrange their margin to the possible outcomes. All bookies keep this of course secret as this offers them a specific range, where they can shorten or lengthen the odds depended on the amounts of placed bets. But I need this information, because I simulate my prediction models for back and lay markets, with just the odds of the back markets. This post will explain, how you should calculate the bookie margin, and how you should not do it.  I handled this topic a little bit naively during the development of my Poisson model, which causes some problems.

Continue reading “Calculate odds for lay markets based on back markets”

Weighted predictor variables and performance trend analysis

The first 10 matchdays of the current season in the Bundesliga revealed some clear disadvantages of my Poisson model. The predictor variables attack and defence strength respond too slowly to performance changes of single teams. This was clearly shown by the loss produced by the poorly performing FC Cologne. A normal SMA (simple moving average) does not use a weight. So latest results, which represent the current form, have not a higher priority over older results. As I looked for solution for this problem I stumbled over the EMA (exponential moving average). This post will explain the use of the EMA and how you can implement it inside the Exasol, so that it is usable as an analytical function for the predictor variables. On top I will show you, how you can analyse the team performance with help of MACD (Moving Average Convergence/Divergence oscillator ).

Continue reading “Weighted predictor variables and performance trend analysis”

How To: Kicktipp strategy simulation

I don’t know, how many of you know Kicktipp. Kicktipp is a very popular betting game in Germany, where everybody can start an own small betting community and can invite people to this community. This is very popular with friends and in companies especially during the big tournaments like the world cup. My company has also a yearly betting game for the German Bundesliga. The rules are very simple: You have to tip every match and you get 4 points for the correct result, 3 points for the correct goal difference and 2 points for the correct trend. In this post I will show you different betting strategies for Kicktipp and test, whether they are useful to win your personal Kicktipp betting game.

Continue reading “How To: Kicktipp strategy simulation”

How To: Install TensorFlow for Windows

I currently started to test machine learning algorithms to predict the results of football matches. I especially tried to use neural networks. But I soon realized, that the possibilities of R regarding neural networks are a little bit limited. So I want to take a look at TensorFlow. TensorFlow is a machine learning library provided by Google, which was already used for many different use-cases and proved its suitability.

As the installation process for TensorFlow was not self-explanatory, I thought, it would be a good idea to provide a small installation guide. I want to explain, how I installed TensorFlow and the Python GUI PyCharm.

Continue reading “How To: Install TensorFlow for Windows”

How to beat the bookie: Value Betting

There are many ways to beat a bookie. One of the well known methods is arbitrage betting, where you try to find price differences between different bookies. Some years ago this was a really good method, but today, as every single information about sports is available throw the internet, it is hard to find difference between bookies.

I will mainly focus on the so-called Value Betting. But what is Value Betting and how does it work?

Continue reading “How to beat the bookie: Value Betting”