• Home
  • Twitter
  • SmarterSig
  • Betfair
  • About Me
  • Post Cats
    • Betfair API-NG
    • Horse Stride Length
    • Web Scraping Race Data
  • Books
    • Precision CX Wong
    • Hands on ML

Make Your Betting Pay

~ Improve Your Horse Betting

Make Your Betting Pay

Category Archives: Uncategorized

How Many Bets Before Bookie Bans You

28 Saturday Jan 2023

Posted by smartersig in Uncategorized

≈ Leave a comment

Tags

tweet

I ran a Twitter poll today, curious to see what people thought was a realistic number of bets a bookie might allow, given that he is monitoring whether you beat SP with there early prices and using this to judge if or when to ban you. Here are the results

What I was curious about was how many of these beating SP bets could a new punter consequtively have and yet still be a losing punter. I stared off looking at a punter betting randomly into Betfred’s 10am prices with a restriction that he only takes prices under 20/1. To keep things simple I also considered races with no non runners at off time across all racing codes in 2019.

We can easily calculate how much a punter will typically lose doing this but what I wanted to know first of all was how many bets he would have to have before we could be sure he is a losing punter by only examining results. I ran a 1,000 run simulation with each run containing 1,000 bets. This produced 20 profitable simulations so clearly 1,000 bets is not enough to be sure. After a few trials it turned out that 2,500 bets produced no profitable iterations and so 2,500 bets was taken as a measure that a punter is truly a losing one given the above. However what if a bookie was watching how well they beat SP during these opening bets. It has been suggested that even though you may not have struck a winning bet the fact that you can get banned, according to many punters, after 3 or 4 bets, is due to the fact that bookies are monitoring your ability to beat SP.

I ran the same simulation but this time checking how often a run of X initial bets were ‘value’ bets according to price taken and SP. Looking for a run of 3 initial value bets occurred 58 times in the 1,000 sample runs. This means 58 times losing punters would have been discarded by a bookmaker if 3 was their tolerance level.

Testing for 5 opening ‘value’ bets we have 7 occurances so 7 losing punters wrongly banished.

Not until we got to 8 initial value bets did we find zero occurances and hence no losing punters were discarded. In the pre poll run it was 7 but obviously due to the random generation of selections this number can vary slightly.

The twitter feedback stated that some bookmakers may be banning one or two bet people because the cross bookmaker intelligence service has already flagged them as people who take too much interest in the sport. This may be true but I am not convinced this accounts for all the 3 bets and out people.

Every one knows my opinion on this topic, if you are a losing punter you will lose less or more slowly on Betfair and if you are a winning punter then you will end up on Betfair eventually so go figure Betfair

Advertisement

Simple XGoals Model 2

05 Monday Dec 2022

Posted by smartersig in Uncategorized

≈ Leave a comment

Following on from the previous post where I looked at a simple model using expected goals as an underpinning value for a simple rating system I will continue the exploration by

  1. Extending the premiership analysis to 2018/19 through to 2021/22 data ( 4 seasons of data)
  2. Look at an alternative baseline model of simply using goals scored difference

First the results for the XG model using a walkforward train and test. Let me explain, the software will train the model on 18/19 and test the model on 19/20. It will then train the model on 18/19 and 19/20 and then test the model on 20/21. Finally is will train the model on 18/19, 19/20 and 20/21 and then test on 21/22. While it is doing this it accumulates the results from each test period before reporting the results.

Using a train test split only rather than walkforward so it will train on the first 80% and test on the last 20% we have

Both set of results show a good return on value bets and the calibration plot looks reasonable down in the bulk of where the ratings will reside

Next I trained a model but this time using the goals scored difference for a teams last 3 matches as a measure of their worth. So team A with results of 1-0, 2-0 and 1-5 if there score comes first would have gross difference of -1 with an average of -0.33

In the above ignore the fact that the input feature is named as xgdiff, I did not change the feature name but did populate it with actual goals scored difference. The results using a train test split were as follows

The value bet profit has evaporated here adding extra weight to the idea that XGoals is a superior input to goal difference when it comes to profit generation. There is enough evidence here to prompt further investigation using more data and exploring other leagues.

Many thanks to football-data.co.uk and fbref.com for data supply

Modeling Heritage Handicaps

27 Thursday Oct 2022

Posted by smartersig in Machine Learning, Uncategorized

≈ Leave a comment

Tags

tweet

Back at the beginning of the 2022 flat season a tipping competition popped up on Twitter. Entries had to make two selections in all the flat seasons heritage handicaps. I felt this was a nice opportunity to test a machine learning model designed to run specifically on heritage handicaps so I set about creating such a model. Drilling down into the data for just heritage handicaps might produce too little data to work with so I decided to go for training the model on all races of class 4 and below. I also ended up splitting the task into two models, one for races up to a mile and another for races beyond a mile. Selections would be made simply by posting up on Twitter the top two rated.

Things got off to a pretty surprising start when the model found Johan, a 28/1 sp winner of the Lincoln and generally got better as the year progressed. Here are the results with EW bets settled at whatever place terms were on offer by at least two big bookmakers.

Firstly let me say that the above returns are not likely sustainable but the profit generated does add weight to the historical results and suggests that the model can be profitable going forward especially at these place terms. I will consider posting these up to the MySportsAI email forum next year

It’s Not The Years It’s The Mileage

18 Tuesday Oct 2022

Posted by smartersig in Uncategorized

≈ Leave a comment

Tags

tweet

As a horse ages we can expect some deterioration in performance but is age more taxing or as Dr Jones once said is it the mileage ?. We can take a look at this using MySportsAI, software that allows people with no Machine Learning grounding to create ML models to predict horse racing.

The first thing I am going to do with the software is slice the data down to only handicap races by clicking alongside raceType in the slice column and then clicking the slice data button at the top of the page.

Via the following screen we can now slice the data down to just handicaps for 2011 to 2015

I am now going to select age as a sole input feature to my model and click Run Model

This presents the following screen where I have selected 5 fold cross validation. This simply means that when I test my one feature model it will train the model on 4/5th of the model and then see how it performs on the remaining 5th. It will do this 5 times with different partitions or 4/5 to 1/5 splits.

Running the model gives me the following results, we will come back to these when I have carried out a similar run for number of previous races instead of age

I now return to the previous screen and select prevRaces instead of age

The results we get using prevRaces are as follows

We can see that prevRaces has thinned the horses out into rankings within each race better than age. this is to be expected as there are more individual values of prevRaces than age, age will only have values between 3 and 13 whereas prevRaces has values between 0 and 229. There are therefore more joint top rated horses with age as an input than there would be with prevRaces. We have to compare therefore roughly equal number of qualifiers, we cannot just say does the top ranked horse using age work better than prevRaces because there are far more top rated horse with age as the input.

Taking the top 3 rated for prevRaces would be roughly equivalent to the top rated for age. We can see that the return to win £1 on each horse would have yielded a loss of 2.41% for age whereas for the top 3 rated using prevRaces we have a loss of only 1.4%, better than backing all horses and losing 1.84%. The Brier skill score is also better for PrevRaces

My next step would be to take a look when we train 2011 to 2015 and then test for results on 2016/17. For the time being though Dr Jones would seem to have a valid point.

Informed and Uninformed Money

03 Monday Oct 2022

Posted by smartersig in Uncategorized

≈ 6 Comments

Tags

tweet

Informed, uninformed, smart, mug call it what you will many researchers have referred to these two different kinds of money forcing a price down. What would be uninformed money, perhaps that last winner for Frankies Ascot 7 or maybe just simply when a horse won last time out and has a top jockey up today against a bunch who are not quite sparkling form wise. It does not have to be rank stupid it only has to be a case of what does the public know that most of the public do not and in many cases its not a a lot. You should always ask yourself this question with a bet. What do I know that the public does not?. Do not take the last part as meaning, its a complete secret. They only have to be taking little notice of something that is available to them but they just do not have the time or inclination to find it out or perhaps confidence to act on.

With all this in mind I was pondering whether it would be possible to use Machine Learning to analyse the performance of smart money vs not so smart. I set about the task using MySportsAI, software by the way that allows you to carry out this kind of analysis provided you have the mental capacity and dexterity to click a mouse. I first looked through all the features that were strongly correlated with the price dropping on a horse. OK how did I do this and what the hell are features. There are around 90 features in MySportsAI and growing, it also allows you to engineer your own features. A feature is simply a characteristic of a horse running in a race, for example the trainer strike rate of that horse going into each race. Now we have cleared that up what do I mean by correlated and price drop. For price drop I used the feature PriceDrift, so yes I am going to predict horse that drift in price which is kind of the flip side to dropping in price, more or less. What does this mean, well PriceDrift is the pre race average Betfair price divided by the Betfair SP. In MysportsAI you can see which features influence (that means correlation) the PriceDrift target feature. To do this we first make PriceDrift the target feature and then use the correlation matrix in MySportsAI, you have seen this before in previous blog posts. I have purposely left out the names of the input features I used, hey its all there try it yourself.

Once we have chosen some features that have some sort of punch in predicting PriceDrift (in the above I have selected 5 that have a correlation between -0.08 to +0.07), we can use them to create a model to predict PriceDrift. I first created a model using data from 2011 to 2015 for Handicap races, training on the first 0.8 of the data and then testing on the last 0.2. Once I had done this I saved the results of the 0.2 test data to a csv file so that I could load it up into Excel. I repeated the exercise this time training on all 2011 to 2015 data but testing on 2016/17.

Once I had loaded the two csv result files into Excel I could now take a look at how horses faired if they were top rated within a race to be a drifter BUT actually dropped in price. You hopefully see where I am going with this. Conventional form features are indicating a drift but the market is saying no. I confined my selections to those under 10.0 Betfair SP simply because I felt that drop and drifts over longer prices can be less meaningful unless they are perhaps huge drops.

The test data from 2011 to 2015 ( about a seasons worth) produced 389 bets and an after commission profit of +34.22 points ROI +8.79%

The test data for 2016/17 produced 411 bets and a profit of +66.45 ROI% +16.16%

From the above it is quite possible that not all droppers are equal, perhaps some are more informed and the market does not quite drop them enough. I think this is quite possible. There are of course other possibilities with this avenue of research, trading being the most obvious.

If you liked this article click the ratings and drop me a comment (no pun intended)

Going Distance Jockey What’s Important

12 Monday Sep 2022

Posted by smartersig in Uncategorized

≈ Leave a comment

Tags

tweet

Imagine we had 3 top gamblers available to conduct an experiment, lets say Pittsburgh Phil, Alan Potts and Dave Nevison. OK perhaps not Dave Nevison but 3 top punters of your choice. Now lets imagine we want to drill down and figure out how important the key ingredients are that they use to pick bets. Let us imagine that amongst other things Phil looks at the suitability of the going for the horse, the previous experience at the race distance of the horse and the ability of the jockey. Trouble is we do not know how these factors rank. Is one more important than the other. One way of figuring this out is to sit Phil down in a locked room for 5 years and get him to punt for 2 of them with all the information/data he needs along with food and water of course and perhaps an exercise yard and small bird in a cage. Seeing as we are dealing with dead punters here I will sling Telly Savalas in the next room. Now having logged his excellent performance over the first 2 years we now randomly alter some of the data he is receiving on the horses going suitability. We do this for a year and see how much his betting performance has suffered. We then do the same for the data on distance suitability and finally for jockey worthiness. After these 3 data alterations we will see that his punting has suffered by varying degrees depending on the three sets of altered data. By comparing these 3 values we are now in a position to order the importance of the three inputs.

This in essence is the process behind a Machine Learning feature importance approach known as permutation feature importance. It does not quite work in the same way as outlined above. It does not randomly alter a features content on subsequent years as above but it will train a model on say 4 years of data and then test it on the 5th year and then to gauge feature importance it will carry out the predictions on the 5th year with various randomly altered features to see which has the greatest negative impact.

The other useful thing you can do with feature importance calculations is check the importance on the training data and then on the test data. If the ordering is wildly out of line across the two then it may well be a sign that the model has over fitted on the training data, that is to say its tending to memorize the data and will therefore not predict very well on new data.

I have been running some checks on this method to see how it performs when compared to the bog standard feature Importance that comes with the Python SKlearn package and it as you shall see it can disagree.

The above is using the standard feature importance algorithm and we can see that jockey strike rate is top in terms of feature importance. Now let us look at feature importance using the permutation method.

On the left side we can see that on the test data jockey strike rate is also the most important feature but after that there is disagreement with the first plot. The right hand box plot shows the importance when applied to the training data and we can see that jockey strike rate and class move have maintained their relative positions of 1st and 2nd which is a good sign that the model is generalizing well from the training data to the test data. The straight lines coming out of the box plots show the variation in the measurements derived from doing 20 different sets of predictions each with a different set of randomly changed values within the feature. The box is the average value of all 20 readings.

The benefit of this approach is twofold, firstly you get a more accurate evaluation of feature importance and secondly comparing train and test gives an insight into possible model over fitting. The permutation variety will be shown in the Autumn update of MySportsAI, software that allows you to create models at the click of a button with no prior ML knowledge

On Course SP v Betfair SP Part 2

19 Friday Aug 2022

Posted by smartersig in Uncategorized

≈ 5 Comments

Tags

tweet

I have previously written about Betfair SP versus grabbing the best in the ring on course price as the horses enter the stalls before, here is the link https://markatsmartersig.wordpress.com/2022/05/31/on-course-prices-v-betfair-sp/

One or two bookie defenders responded by saying ah but that was a weak meeting at Leicester, try it at a strong meeting and you will see that on course beats BFSP. Well two days ago I was up at York to witness the great Baheed slaughter some good horses and to gather prices as suggested from the back lines of the bookmakers. Here are the results of my price logging. All BFSP’s are with 2% comm deducted and all prices are to /1

In total Betfair SP beat or equaled the on course price 28 times whilst the on course books came out ahead 6 times. Take into consideration your travel, entrance and refreshment costs and I am sure we could shave that difference up a couple of notches. In addition to the above all on course books were going 4 places only on the first heritage handicap of the day whilst of course you could get 7 places with two bookies and 6 with pretty much all. I am told this is due to ring regulations which if true needs to be changed.

In conclusion I think it is pretty evident that the vast majoirty of punters would be better off at Betfair SP but you wont hear about that from the fool in the ring.

Whip Less Jockeys

14 Thursday Jul 2022

Posted by smartersig in Uncategorized

≈ 2 Comments

Tags

tweet

The realization that jockeys may soon be forced to limit the number of times they use the whip because if they break the rule they will lose the race got me thinking about who will be favoured by this rule amongst jockeys. I have my own favourite list of jockeys when it comes to a driving finish. Jamie Spencer frustrates a lot of punters but if he is in a set to at the end of the race I would rather have him on my side than Tom Queally or Joe Fanning for sure. This was brought home to me today at Leicester when Spencer showed his driving whipless worth getting home Fresh Hope at Leicester when for a moment it looked doubtful.

This topic also set me thinking about whether some jockeys finishing worth can be measured. Its difficult because clearly different jockeys manage to get different quality of mounts but i started off by simply looking at all horses that traded below 1.10 in running as a count of Jockey mounts that had winning chances. I then created a percentage of these for each jockey by dividing the number of beaten 1.01 in running by the their 1.10 runs. Taking only those jockeys who had at least 1,000 qualifiers from 2009 to 2022 produced the following.

As you can see Richard Hughes appeared to be difficult to get beat when he was involved in a finish whereas Ryan Moore seems surprising vulnerable. If we relax the criteria a little and go to 1.02 we get.

Again Moore fairs poorly and Hughes Probert and Tudhope ride high.

Kirby lies low but perhaps this is a cast off from the fact that he is a busy and successful AW jockey. Revising the above to just turf flat races may be a fairer picture.

Kirby and Moore are still low ranked generally the same names are high ranking.

There are still flaws with this list, firstly they do not all have the same strike rate and therefore even though we have mitigated to some extent by only taking those that went below 1.10 it is still a little unfair to compare De Sousa with Graham Lee. Putting the overall strike rate of the jockeys in and sorting on this will at least allow adjacent jocks to be compared.

Some notable good figures, Curtis is only getting turned over at less than 1.03 0.48% of the time which is far lower than his fellow 14% strike rate jockeys. Alan Kirby’s rate looks a bit high and Dettori, well maybe his Royal Ascot debacles have been on the wall for some time. Jim Cowley has solid numbers as I would expect from a Jockey I seem to rarely complain about.

The Derby 2022 And a Fair Price

01 Wednesday Jun 2022

Posted by smartersig in Uncategorized

≈ Leave a comment

Tags

tweet

Three days to the Derby and sadly no Lester Piggot even in the stands looking on. I was at Epsom the day Lester powered home The Minstrel, his power pact finish and the bravery of The Minstrel who shrugged off that hard race to go on and win the Irish Derby and and King George will forever be one of my favourite racing memories.

Another memorable Derby was the famous ‘time to bet like men’ of 1981. Richard Baerlin of the Guardian made the famous quote prior to the race when describing Shergar as a near certainty at even money or there abouts. As I said, no Piggot but Stoute is back with this years Derby favourite in Desert Crown and we may just have another near certainty here although the question remains does the price of 7/4 bring out the man in you ?.

The sectional times of Desert Crown can be realistically compared with last years Dante winner and Derby 3rd Hurricane Lane. Both ran on similar ground and if anything slightly favoured Hurricane with a wind of light half behind compared to fresh half across for Desert Crown.

Despite this Desert Crown ran the final 3f in 35.61 with earlier part of the race being covered in 93.85

Hurricane ran his final 3f in 36.17 with the earlier part in 93.89

Both sections were faster in the case of Desert Crown which suggests that at the time of the Dante he is the better horse. Couple this with only two runs under his belt along with a trainer declaration that he has a cool calm temperament and you can see why he is 7/4 favourite.

Now the question remains that all punters should ask themselves, is he over priced ?. You have to decide for yourself. I will not be playing simply because the race is not on the radar of my algorithmic approach to betting but if you are man enough there is good reason to like him.

On Course Prices V Betfair SP

31 Tuesday May 2022

Posted by smartersig in Uncategorized

≈ 4 Comments

Tags

tweet

I have written previously (https://markatsmartersig.wordpress.com/2019/09/19/betfair-its-a-no-brainer/) about how for the vast majority of people betting to Betfair SP is a no brainer but I have been berated by some on Twitter who believe that grabbing the best price in the ring on course will result in you beating Betfair SP. I decided to put this to the test today visiting my local track Leicester. As the final horses were entering the stalls I logged the best price I could see in the ring and yes on many occasions you could pinch a little extra with some bookie who might be 5/2 when all are 9/4 but the real question is how would one fair against blindly backing at Betfair SP. Given that the following are so close to the off I think its a fair comparison of line shopping on course V Betfair SP which I have shown after 2% commission.

Here are the results for todays winners

1.20 Bold Action On Course 5/2 Betfair SP 2.82/1

1.55 Sow respect On Course 5/2 Betfair SP 2.59/1

2.30 Sweet Glance On Course 5/1 Betfair SP 5.89/1

3.0 Tuscon Cloud On Course 5/4 Betfair SP 1.45/1

3.30 Letter of The Law On Course 5/2 Betfair SP 3.25/1

4.0 Golden Spice On Course 6/4 Betfair SP 1.58/1

4.30 Night of Luxury On Course 10/1 Betfair SP 10.71/1

I was going to tot up the difference but quite frankly I can’t be bothered such is the complete whitewash in favour of Betfair SP. I saw no evidence that on course prices beat Betfair SP in fact on course prices appear to be simply mirroring betting shop shows with on course bookies using Betfair prices to manage liabilities. I have no gripe with them doing this but do not try and tell me that paying £20 to get in, plus travel costs plus the above differences results in a win for punters on course over Betfair SP.

OK you may be a morning price bettor but see my previous article to see that you would have to be Patrick Veitch with his velcro line of phones to runners to beat Betfair SP.

Footnote – Betfair SP’s are now in on all horses so I have compiled a list of the first 3 in the betting of each race just to see if standing and betting in the ring is likely to improve the casual punters chance of winning more, here are the results after 2% commission deducted from Betfair SP prices.

← Older posts

Archives

Create a free website or blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Make Your Betting Pay
    • Join 50 other followers
    • Already have a WordPress.com account? Log in now.
    • Make Your Betting Pay
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...