Jump to content

Introduction and my code based odds predictor


montekaleb

Recommended Posts

Hi all, My first post here. I'm not 100% sure that this shouldn't be in the 'Punters Tools' forum, but as its a system I'm building rather than a tool I'm making available, I'm going with here. I'm builidng a program that takes historical data and attempts to estimate odds from it. It's far from finished, but there's enough there to be able to make early tests. It currently goes by the uninspiring name of 'FootyCalculator'. I'm writing my code in C#, because it makes GUIs fun and the LINQ processing is kind of handy for all that data-trawling. And with the object model, I can use interfaces for my odds and rating components and make them pluggable for easy experimentation. Forgive me my terminology; I've been doing this by myself without a background in betting so I don't know the technical terms for the betting side of what I'm talking about. So, to details - I'm getting my data on odds and performance from the CSV files freely availabe at http://www.football-data.co.uk/data.php For each team In a division I generate a rating for each date. This is straight-foward; it's an average of the previous X games ( usualy 4 each home and away, but it's not hardcoded ) where the stats have been summed with a weight table. Over the last 3-5 seasons, I use the weight differences for each game to place it in a table of results ( win, lose, draw ), and then use a smoothing calclulation to create a mapping from rating-differences to the historical probabilities of different outcomes for that rating difference. I'm using a genetic alogrithm to select a weight set that gives me good gains on the historical data, where I simulate a bet whenever my calculated odds are better than the bookie odds. This lead to poorer live performance than I expected, and I realised that despite the large dataset, the GA was overtraining so that the rating system used created a very spiky graph where the spikes encoded data about past anomalies. So I adjusted the GA to select not only on performance, but also on the relative 'smoothness' of the graph. I've been building this in the odd hour here or there since June, and have started betting at the start of this season. The first couple of weeks I didn't have the GA running and had to hand-select the weights by a process of trial and error. Currently I bet a full stake if I have and edge of 7%+, and a half stake if the edge is 5-6% OR the team is new to the division and so my data is suspect. I'm working on small stakes, at least until I can gain some confidence that it is working and that I have some bankroll-management system in place. So far variance is wild; on a days betting I can be between -40% and +80% on my stake. Unfortunately the -40% was on the day I got cocky and bet my entire bankroll. There's a lesson worth learning :p Whats next ? 1) At the moment, there is no bet-recording. The program doesn't even know I'm making bets, it just gives me its estimated odds. So I need to get it to store all the bets that I make in a session. This has got three main advantages;

  • I get to keep a record, that I can analyse later
  • I can get it to calculate relative bet-sizes, and give me an estimate of variance
  • It can output a form that I can use to post my picks here.
2) I have to load each division seperately with a restart of the program. I want to get it to load them all at once. Uses -
  • Easier to use !
  • I can calculate the average ratiing-difference between divisions, which will help for relegated/promoted team predictions

3) Odds-loading - currently, I'm hand-entering the odds of the matches that I want to play. Given how many betting sites provide XML files of their current odds, this is just stupid. So, plenty to work on ... And are any of you working on something similar ?

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Hi, montekaleb, :welcome to the forum! :)

So, plenty to work on ... And are any of you working on something similar ?
Indeed, from you decription, it seems very ambitious work! I'm not aware of many so sofisticated systems on this forum; most of the systems found here rely on research and match selection rather than complete automatization. One of rare systems that relied on machine (literally... ;) ) rather than human research was Machine's system based on artificial intelligence; unfortunatelly, it seems he abandoned the system due to lack of interest, althogh previous season showed its potential; anyway, if you want to see the idea, here are the links: http://forum.punterslounge.com/threads/119849-A-I-Football-27-yield http://forum.punterslounge.com/threads/133484-A-I-D-E-s-Back
My first post here. I'm not 100% sure that this shouldn't be in the 'Punters Tools' forum, but as its a system I'm building rather than a tool I'm making available, I'm going with here.
Well, that's not crucial issue, and there are pretty simple rules; if you intend to post here bets generated by your FootyCalculator, and to record its profit/loss, you're in the right place; if you don't want to post any bets, but just want to discuss about your software and share ideas, then "Punters Tools" forum is sutiable place; as I said, it's not crucial issue, and we can move the thread between forums, if needed. Enjoy the forum, and good luck with FootyCalculator's development! :ok
Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Thanks for the notes, Froment :) I've been and had a look as those other threads, but as the poster is using Neural Networks, I can't see a great deal of crossover. I might add a NN later as a 'gap-plugger' - my gut feeling is that a NN is better at simulating 'hunches' than calculating odds, and I'm more interested in creating a system that estimates 'true odds'. I've modified my genetic algorithm so that it is a.) 4x as fast as it was, and b.) now has additional selection criteria, specificaly, that it selects in favour of solutions where buckets of games where I pick the same odds have the right preportion of outcomes. I'll leave it in machine-learning mode overnight and see if I can make some picks on the Bundisleague tomorrow :)

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor My system's picks for tonight - note I don't have a proper staking model in place yet, so I'm staking a full bet on 7%+ edge and a half bet on matches with a 6% stake or few previous games in the same division. Borussia M'gladbach v Hamburg : Hamburg @ 4.00 – 1 Stuttgart v Hoffenheim : Draw @ 3.80 – .5 Augsburg v Bayer Leverkusen : Augsburg @ 3.10 – 1 Ingolstadt v 1860 Munich : Ingolstadt @ 2.45 – 1 Braunschweig v Duisburg : Duisburg @ 7.50 – .5 Pescara v Palermo : Pescara @ 2.45 – .5 Catania v Atalanta : Atalanta @ 3.80 – .5 Torino v Udinese : Torino @ 2.20 – 1 Roma v Sampdoria : Draw @ 4.33 – 1 Chievo v Inter Milan : Chievo @ 2.90 – 1

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor

Thanks for the notes, Froment :) I've been and had a look as those other threads, but as the poster is using Neural Networks, I can't see a great deal of crossover. I might add a NN later as a 'gap-plugger' - my gut feeling is that a NN is better at simulating 'hunches' than calculating odds, and I'm more interested in creating a system that estimates 'true odds'. I've modified my genetic algorithm so that it is a.) 4x as fast as it was, and b.) now has additional selection criteria, specificaly, that it selects in favour of solutions where buckets of games where I pick the same odds have the right preportion of outcomes. I'll leave it in machine-learning mode overnight and see if I can make some picks on the Bundisleague tomorrow :)
Theres no difference whatsoever NN was using GA's in the early nineties (old school), virtually same as the new named ACO or swarm (same coat ,different colour) I dont think youll get to much input from members on here but good luck with your 'true odds calculator' Im away to see what 'hunches' my NN has thrown up ;) :ok
Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Hi Monte Its not my place to tell you how to bake your own cake so to speak,but a little outside input can sometimes save hours of trials.;) The obsession people have with trying to create 'true odds' astounds me when everything you need is there for you. You can not create 'true odds' which are comparable to the bookmakers odds as you do not use the same variables as they do,hence you end up with correlated data (good for politicians to make thing look rosey..bad in betting terms). Basically its like trying to compare an apple to an orange. :unsure What is the first thing taught in data analysis...Crap in > Crap out (my version) to quote Sun Tzu:- "the opportunity of defeating the enemy is provided by the enemy himself." The bookmakers weak point is they have to show their hand first by pricing up the games. By analysing their past odds you are in effect using their own exact methods of pricing up a game to use against them. A little reading on Quarbs may not go amiss ( Efficiency in spread betting,but can be mutated to 1x2 betting). :ok

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Your feedback is appreciated ... and now I have more ideas than I can hope to code up in a month of sundays ! I'm going to stop talking about 'true odds', it just seems to make people wince ... not that I'm claiming to get true odds, just an estimation of them. But I do need a way of identifying 'Value bets' - and as far as I can tell, Quarbing ( is that the right verb ) does this too, by effectively using the bookie's ranges as a kind of crowdsourcing. Well, I came here to avoid reinventing the wheel, and also to make my mistakes in public ... so far I'm ahead on both counts. If only I was making money too :p I'll carry on with the GA for a while, though, cos there's more things I haven't tried with it, and it's a learning experience.

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Read with interest. I also create ratings for teams on any given day. My difference is that I look for a minimum rating and/or best rated in their league for that particular round of games, then include a cut off of what are the minimum acceptable odds for me. If it's rated strongly enough & the odds are in the correct range, then it's value. This might not be other people's idea of value, but it works for me enough.

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Rats. I had a complete computer failure over the weekend, and although I've now been able to retrieve my code I wasn't able run any predictions on saturday, when I really wanted to. Still, there's a raft of english games tomorrow to take a look at.

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Bets for this saturday - placed 5 Oct at Wilhil. Unit bets. Man City v Sunderland – Sunderland @ 11.00 Chelsea v Norwich – Norwich @ 15.00 Crystal Palace v Burnley – Burnley @ 3.20 Birmingham v Huddersfield – Huddersfield @ 3.20 Leicester v Bristol City – Bristol City @ 5.50 Sheff Wed v Hull – Hull @ 2.80 Millwall v Bolton – Millwall @ 2.60 Derby v Brighton – Derby @ 2.70 Leeds v Barnsley – Barnsley @ 4.00 Blackburn v Wolves – Wolves @ 3.25 Oldham v Preston – Oldham @ 2.87 Coventry v Bournemouth – Bournemouth @ 3.20 MK Dons v Portsmouth – Portsmouth @ 6.00 Stevenage v Scunthorpe – Scunthorpe @ 4.20 Bury v Swindon – Bury @ 3.60 Dag & Red v Bradford – Dag & Red @ 2.80 Accrington v Rochdale – Rochdale @ 2.80 Cheltenham v Fleetwood Town – Fleetwood Town @ 2.75 Southend v Barnet – Barnet @ 6.00 Bayern Munich v Hoffenheim – Hoffenheim @ 15.00 I got my system up and running again :) But it's not picking any draws, which has me a little worried ...

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor ... but on the bright side, investigating my missing draws showed up a schoolboy error - A '' in a vital subroutine made my optimiser blind to the difference between draws and loses. Given which, a loss of -8% may be considered a best case scenario :p Onwards and upwards !

Link to comment
Share on other sites

Re: Introduction and my code based odds predictor Next ! For this weekend ... bets taken last night with Betfred, at almost midnight; Portsmouth v Crewe - Crewe 9/4 Swindon v Coventry - Coventry 4/1 AFC Wimbledon v Cheltenham - AFC Wimbledon 11/5 Fleetwood v Wycombe - Wycombe 9/2 Gillingham v Aldershot - Aldershot 9/2 Vicenza v Padova - Vicenza 13/8 Cesena v Crotone - Cesena 13/10

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...