Betwise Blog
Betwise news, analysis and automatic betting info

Grand National contenders ranked by prize money

By colin on Saturday, April 14th, 2012

Prize money won to date is often touted as a better measure of class than any other attribute in horseracing, including the class of races won.

To be sure, it’s not a bad marker, and it’s one of the many attributes available in our programmatic database, Smartform.

But how to use this attribute?   Let’s start with total prize money won by each horse.

We can test this for the favourite in the Grand National – here, we want to take the sum of all historic prize_money, limited to the record over the race type in question, chases, as follows:

mysql> select SUM(prize_money) AS ‘total prizes’ from historic_races JOIN historic_runners USING (race_id) where name=”Synchronised” and race_type=”Chase” and (unfinished IS NULL OR unfinished != “Non-Runner”);

Total prizes
475425.26

1 row in set (2.15 sec)

Note the inclusion in the query statement of a subclause to exclude races where the horse in question has been a non-runner.  So far so good, but whilst this may tell us something about class over the horse’s whole career, it does not tell us much about its recent performances.  So let’s constrain the time period to the last year and a bit.

select SUM(prize_money) AS ‘total prizes’ from historic_races JOIN historic_runners USING (race_id) where name=”Synchronised” and meeting_date>”2011-02-02″ and race_type=”Chase” and (unfinished IS NULL OR unfinished != “Non-Runner”) ORDER BY historic_races.meeting_date DESC;

Total prizes
372633.61

1 row in set (0.43 sec)

So we’re happy with the time period – and also that we can obtain total prize money for each contender.  But how to compare all the runners – is ranking them by their total a fair representation of ability?  What if some runners raced 10 times and other raced once?  Their average prize should enable a fair comparison, as follows:


>select AVG(prize_money) from historic_races JOIN historic_runners USING (race_id) where name=”Synchronised” and meeting_date>”2011-02-02″ and race_type=”Chase” and (unfinished IS NULL OR unfinished != “Non-Runner”);

AVG(prize_money)
124211.202148

1 row in set (0.43 sec)

Let’s check back over the runs of Synchronised to sanity check this average:

> select finish_position, unfinished, prize_money from historic_races JOIN historic_runners USING (race_id) where name=”Synchronised” and meeting_date>”2011-02-02″ and race_type=”Chase” and (unfinished IS NULL OR unfinished != “Non-Runner”) ORDER BY historic_races.meeting_date DESC;

finish_position unfinished prize_money
1 NULL 284750.00
1 NULL 80172.41
NULL Pulled Up NULL
3 NULL 7711.20

4 rows in set (0.41 sec)

There’s a mistake here.  MySQL assumes because the result of prize money is NULL for one of the races, when calculating the average, that the average is only calculated over 3 races and not 4.

We can get around this with a trick to treat NULL values in prize money as zeros, which is actually what we want here, so that the average is calculated correctly, as follows:

select AVG(COALESCE(prize_money,0)) from historic_races JOIN historic_runners USING (race_id) where name=”Synchronised” and meeting_date>”2011-02-02″ and race_type=”Chase” and (unfinished IS NULL OR unfinished != “Non-Runner”);

AVG(COALESCE(prize_money,0))
93158.401611

1 row in set (0.42 sec)

If we do this for every runner, we can start to rank them. Typically, this type of operation is much easier using a programming language interfacing with Smartform – we show examples with Perl and R using Smartform elsewhere on the site – running the above query for every runner and saving results. An example output from such a program which calculates average prize money won, run over the Grand National contenders today, is as follows:

Key: Race time, course, form figures, name, average prize money, forecast price.

16:15, Aintree , 1/1121-4 , Ballabriggs ,    179611.33 , 13.00
16:15, Aintree , 3-P7311 , Synchronised , 93158.40 , 8.00
16:15, Aintree , 144P3/4- , State of Play , 50445.00 , 34.00
16:15, Aintree , 2-133F5 , Organisedconfusion, 32098.06, 21.00
16:15, Aintree , 6741UP , Alfa Beat , 21655.24 , 34.00
16:15, Aintree , 01/35-23 , Planet Of Sound , 21377.50 , 26.00
16:15, Aintree , 18P-13P , Weird Al , 19542.50 , 34.00
16:15, Aintree , 1/321-82 , Junior , 19298.00 , 11.00
16:15, Aintree , 11PB-P1 , West End Rocker , 14067.50 , 11.00
16:15, Aintree , 2F-8511 , Calgary Bay , 13634.50 , 26.00

All done with a Smartform and Perl script.

On the strength of class (remembering that prize money is the best indication of that), we would therefore expect the top few contenders above to be involved at the finish.

No Comments (add your own) »

Most valuable Flat races today

By colin on Saturday, April 7th, 2012

As the Flat season is yet to get into full swing, the racing fare is still jumps dominated.  The Irish National followed by the Aintree meeting next week will keep it that way for a couple of Saturdays to come.   However, we’re mainly concerned with Flat racing analysis here at the blog (though there will be an exception for the National next Saturday), and we can use Smartform (which carries full data for both codes in UK and Ireland) to tell us what the breakdown is.

Prize money is usually a good indicator of where the quality racing lies, so let’s use the Smartform daily updates to rank all races by prize money under both codes today, with the following query:

>select penalty_value,  race_title, scheduled_time, course from daily_races where meeting_date=CURDATE() order by penalty_value DESC;

The ‘order by penalty_value DESC’ part of the query simply means ranking the query results from highest prize to lowest.  If you’re using MySQL via one of the many MySQL interfaces (such as Sequel Pro for the Mac), you can manipulate your query results by point and click to re-order and rank for small queries such as this.

Anyway, here’s the result of listing all races by prize money on offer for today using the query above:

penalty_value race_title scheduled_time course
32490.00 Read Nicholls And McCain On Betfair Handicap Chase (Betfair Chase Series Final) 2012-04-07 14:25:00 Haydock
32490.00 Betfair. Don’t Settle For Less Handicap Hurdle (Betfair Hurdle Series Final) 2012-04-07 14:55:00 Haydock
32490.00 Betfair. For Better Odds Levy Board Handicap Chase 2012-04-07 15:30:00 Haydock
31125.00 Betfred Royal Mile Handicap 2012-04-07 15:50:00 Musselburgh
26000.00 Cork Stakes (Listed) 2012-04-07 14:50:00 Cork
18714.00 Betfred Mobile Sports Snowdrop Fillies’ Stakes (Listed) 2012-04-07 14:40:00 Kempton
13000.00 Friday Evening Racing Handicap 2012-04-07 16:00:00 Cork
13000.00 Mallow Town Summer BBQ Evening July 13th Handicap 2012-04-07 14:20:00 Cork
12938.00 Betfred The Bonus King Whistlejacket Conditions Stakes 2012-04-07 14:45:00 Musselburgh
12938.00 Betfred Goals Galore Handicap (London Mile Qualifier) 2012-04-07 14:05:00 Kempton
12660.00 SIS Handicap Chase 2012-04-07 15:40:00 Newton_Abbot
12450.00 Betfred ‘Double Delight’ Conditions Stakes 2012-04-07 16:20:00 Kempton
12450.00 Betfred ‘When Both Teams Score’ Fillies’ Conditions Stakes 2012-04-07 15:45:00 Kempton
12450.00 Betfred Bonus King Queen’s Prize Handicap 2012-04-07 15:15:00 Kempton
10006.00 Irish Stallion Farms E.B.F. Fillies Maiden 2012-04-07 15:25:00 Cork
9747.00 Find Live totescoop6 Information At totepool.com Handicap Chase 2012-04-07 15:55:00 Carlisle
9314.00 Irish Stallion Farms E.B.F. Fillies Maiden 2012-04-07 16:30:00 Cork
8410.00 Betfred ‘Goals Galore’ Handicap 2012-04-07 15:20:00 Musselburgh
8092.00 Betfred ‘Hat Trick Heaven’ Handicap 2012-04-07 16:55:00 Kempton
7148.00 Betfair Brings You Better Value Novices’ Chase 2012-04-07 13:50:00 Haydock
7148.00 Betfair Remembers Tim Molony Handicap Chase 2012-04-07 16:40:00 Haydock
6900.00 Best Dressed Lady & Gent (C & G) Maiden 2012-04-07 17:30:00 Cork
6498.00 Better Prices On Betfair Mobile ‘Fixed Brush’ Novices’ Handicap Hurdle 2012-04-07 16:05:00 Haydock
6210.00 Mallow.ie Apprentice Handicap (50-70) 2012-04-07 17:00:00 Cork
5175.00 Betfred ‘Double Delight’ E.B.F. Maiden Stakes 2012-04-07 17:00:00 Musselburgh
4874.00 Bet totequadpot Text tote To 89660 Novices’ Chase 2012-04-07 14:50:00 Carlisle
3946.00 Betfred Bonus King Bingo/British Stallion Studs E.B.F. Maiden Stakes 2012-04-07 13:35:00 Kempton
3899.00 St Austell Brewery Handicap Chase 2012-04-07 14:30:00 Newton_Abbot
3881.00 Betfred ‘When Both Teams Score’ E.B.F. Maiden Stakes 2012-04-07 14:10:00 Musselburgh
3422.00 South West Racing Club Handicap Hurdle 2012-04-07 17:20:00 Newton_Abbot
3422.00 Mike Wilding Birthday Celebration ‘National Hunt’ Novices’ Hurdle 2012-04-07 15:05:00 Newton_Abbot
3249.00 Free Racing Post Form At totepool.com Handicap Chase 2012-04-07 17:05:00 Carlisle
3249.00 Bet totescoop6 Text tote To 89660 Novices’ Handicap Hurdle (Div 1) 2012-04-07 13:45:00 Carlisle
3249.00 Bet totescoop6 Text tote To 89660 Novices’ Handicap Hurdle (Div 2) 2012-04-07 14:15:00 Carlisle
3249.00 Bet totepool Text tote To 89660 Handicap Hurdle 2012-04-07 16:30:00 Carlisle
2738.00 Newton Abbot Races Handicap Chase 2012-04-07 16:45:00 Newton_Abbot
2599.00 totepool Mobile Text tote To 89660 Claiming Hurdle 2012-04-07 15:25:00 Carlisle
2395.00 Keith And Ginny Bell Ruby Wedding Novices’ Handicap Hurdle 2012-04-07 16:10:00 Newton_Abbot
2395.00 RNIB Mares’ Maiden Hurdle 2012-04-07 13:55:00 Newton_Abbot
2264.00 Betfred Bonus King Bingo Handicap 2012-04-07 17:35:00 Musselburgh
2264.00 Betfred Still Treble Odds On Lucky 15’s Handicap 2012-04-07 16:25:00 Musselburgh
1848.00 Check Betfair Before You Bet Standard Open NH Flat Race 2012-04-07 17:15:00 Haydock
1754.00 Follow totepool On Facebook And Twitter Standard Open NH Flat Race 2012-04-07 17:40:00 Carlisle

43 rows in set (0.09 sec)

What does this tell us?  Well, 3 jumps races are still the most valuable as we thought.  Looking at the race titles, you also can’t help but notice that Betfair and BetFred are pumping a lot of cash into sponsorship at the moment (!) and Betfred have sponsored the two most valuable Flat races at different courses.

We can easily alter the original query to see Flat racing only (as opposed to all racing) as follows:

>select penalty_value,  race_title, scheduled_time, course from daily_races where meeting_date=CURDATE() and race_type = “Flat” order by penalty_value DESC;

And if we want to exclude Irish racing, add a further qualifier as follows:

>select penalty_value,  race_title, scheduled_time, course from daily_races where meeting_date=CURDATE() and race_type = “Flat” and country != “IRE” order by penalty_value DESC;

This will leave us with racing at Musselburgh and Kempton, only, and the most valuable race at each course at the top of the query.  So, if betting on quality Flat races is part of the betting plan, then the 3.50 Royal Mile Handicap at Musselburgh (worth over 30k in prize money) and the Listed race for fillies at Kempton (the 2.40, worth c. 20k) are the races to focus on.

Of those, the non-handicap looks of interest.  No detailed race analysis today, but Night Lily catches the eye at a double figure price, having finished a close second in this last year.

No Comments (add your own) »

Welcome to the Flat 2012!

By colin on Saturday, March 31st, 2012

There’s been a break from the blog this winter, but it’s now time to get back into it with the start of the Flat.

Given a race as rich as the Dubai World Cup today it seems a bit traditionalist to herald the start of the Flat with an analysis of the Lincoln Handicap, but that’s just what we’re going to do.

We wrote about Lincoln trends this time last year and not much has changed in that there is only one more year to add.

However, we can do a lot more to validate trends in terms of Smartform research.  So, here’s the full query in Smartform this time around for the benefit of all subscribers to the database:

>select race_name, course, meeting_date, name, age, weight_pounds AS ‘weight’, historic_races.official_rating AS ‘OR’, trainer_name AS ‘trainer’, jockey_name AS ‘jockey’ from historic_races join historic_runners using (race_id) where race_name LIKE “%Lincoln%” and prize_money > 50000 and finish_position=1;

Notice that specifying race_name LIKE “%Lincoln%” alone (in other words retrieving all races that meet the condition of containing the word “Lincoln”) throws up many false positives, including lots of Lincoln trial races.  A little lateral thinking goes a long way when working with horseracing data – here we’ve simply added the qualifying criteria that prize money must be over 75k and hey presto we get the Lincoln winners’ summary details for every year in the database, including 2006 and 2007, the years when the Lincoln was run at Redcar and Newcastle respectively.

A little trial and error is required with the prize money element in the query, but knowing the approximate value of the Lincoln helps (and if you don’t, you can find out easily enough by adding that field name to the query and seeing exactly how much added_money has gone in to Lincoln prizes in the past).  Basically it’s always useful when working with racing data to get to know the ins and outs of racing as well as how to run queries on the data.  Anyway, here are the results of the above query (excluding race_name):

What trends can we see?

Well, many similar to the ones we found last year, of course.  Except that one of the stronger trends we identified just by looking at the winners was that  4 year olds had dominated the winners podium – and last year a six year old won it.

Let’s examine this trend a little more closely, since it’s rightly pointed out that winner trends can be misleading without considering the whole data.  In other words, the statistic that 4 year olds have won the last 6 out of 9 runnings (ie. two thirds of recent renewals) would be meaningless if the number of 4 year olds running as a proportion of the whole field had also been approximately two thirds over the past 9 years.

Let’s turn to Smartform again to analyse this.  What we’re looking for is the distribution of runner ages for all runners in the Lincoln over the past 5 years – how many were 4 year olds, 5 year olds and so on, and what proportion did these represent of the total.

First off, let’s see how many runners were entered over the time we are looking at:

mysql> select count(name) AS ‘runners’ from historic_races join historic_runners using (race_id) where race_name LIKE “%Lincoln%” and added_money > 75000;
+———+
| runners |
+———+
|     208    |
+———+
1 row in set (0.17 sec)

Now, how were those runners distributed by age?

mysql> select age, count(name) AS ‘runners’ from historic_races join historic_runners using (race_id) where race_name LIKE “%Lincoln%” and added_money > 75000 group by age;

+------+---------+
| age  | runners |
+------+---------+
|    4 |      65 |
|    5 |      61 |
|    6 |      49 |
|    7 |      22 |
|    8 |       8 |
|    9 |       1 |
|   10 |       2 | 
+------+---------+

(Nb. The ‘group by’ function is a useful trick for interrogating data distribution by any given category.)

What conclusions can we draw from this?  Does the data support the theory that 4 year olds are showing a high win ratio over the past 9 years?

Very much so – despite representing only 65 of the 208 Lincoln runners (so just under one third), they have produced two thirds of the winners.

What other trends look worth investigating further from our original query?  Plenty, but let’s focus on one other – trainer.  In the last 9 runnings, two trainers have won the race more than once – Mark Tompkins and William Haggas.

So let’s interrogate this “trend” to see how significant it is.  (We’ll avoid the purely academic exercise in the case of Mark Tompkins, since he has no runner today.)  For William Haggas, let’s see how many runners he has sent to compete in the Lincoln over the past 9 years, when they ran and where they have finished, so that we can understand his runners to winners ratio:

> select name, finish_position, scheduled_time from historic_races join historic_runners using (race_id) where race_name LIKE “%Lincoln%” and added_money > 75000 and trainer_name LIKE “%Haggas%”;

+--------------+-----------+-----------------+
| meeting_date | name      | finish_position |

+--------------+-----------+-----------------+
| 2007-03-31   | Very Wise |               1 | 
| 2008-03-22   | Very Wise |              14 | 
| 2010-03-27   | Penitent  |               1 | 
+--------------+-----------+-----------------+

3 rows in set (0.17 sec)

2 winners out of 3 runners.  Not bad… William Haggas also trained High Low to win the Lincoln in 1992, before Smartform records begin.  So he certainly knows how to train the winner of this race.

What 4 year olds are running in this year’s renewal, and who are their trainers? For this we turn to the automatically updated daily_race and daily_runner tables.

mysql> select forecast_price AS ‘betting’, course, meeting_date, name, weight_pounds, daily_runners.official_rating, trainer_name, jockey_name from daily_races join daily_runners using (race_id) where meeting_date = CURDATE() and race_title LIKE “%Lincoln%” and age = 4;
+———+———–+————–+———+—————+—————–+——————+
| betting | course       | meeting_date | name | weight | OR  | trainer_name | jockey_name      |
+———+———–+————–+———+——–+——+—————-+——————-+
| 13/2    | Doncaster | 2012-03-31   | Fury        |      130|    98| W J Haggas   | Adam Beschizza |
| 20/1    | Doncaster | 2012-03-31   | Askaud  |      129 |   97 | S Dixon           | I Mongan             |
| 8/1      | Doncaster | 2012-03-31   | Cocozza |      131 |    99 | M Botti            | J Fanning            |
+———+———–+————–+———+———+—–+—————-+——————-+



We get a Haggas runner thrown in for free…  Fury, Haggas’ runner this year, is at the time of writing vying for favourtism in this year’s renewal.

The trends show us why Fury is near favourite. By the way, another trend worthy of note is that horses at the top of the market have started performing very well in recent years (as you can see in the decimal SP column of the original query table). Personally, I find it hard to back 6 /1 shots in competitive cavalry charge handicaps, and would sooner be backing something available in double figures, but historic trends suggest this one has every chance.

2 Comments »

Epsom Downs Bank Holiday Monday

By colin on Monday, August 29th, 2011

Betting on bank holidays poses the problem of too many races to analyse.  In the hope that it eases the task a little, below a snapshot of those shortlisted for betting opportunities in all Epsom races today:

2.05 Epsom
Ashbina
Blank Czech
Regal Gold (should be in contention at half way, back to lay at a big price)
Gunner Will

2.30 Epsom
Sugar Beet (NB)
Mon Visage
Welsh Inlet (front runner, reasonable draw – back to lay)

3.05 Epsom (not clear where the draw advantage will be)
Stone of Folca (interesting long shot dropped in class)
Judge and Jury (solid recent form, likely to run a good race)

3.40 Epsom
Spanish Duke (NAP)
Measuring Time

4.15 Epsom (not a strong pick, Amateur jockeys’ race)
If I were a Boy

4.50 Epsom
Tenby Lady (good looking chance, but short in betting for such a competitive race)
Tiger Webb
Celestial Girl

5.25 Epsom
Danehill Dante

Orientalist

No Comments (add your own) »

Ebor Handicap – choose a stayer by sire

By colin on Saturday, August 20th, 2011

1 mile 6 furlongs is an unusual trip as a percentage of the grand total of flat racing handicap distances.  Race analysis can often underestimate the additional stamina requirements which are needed to win at it.  There is not complete ignorance, but it’s typical to see analysis that supposes that horses that perform well over the more common trip of a mile and a half may be suited by the way in which they have run their races to perform well at the 2 furlong longer distance.

Of course they should also go a decent pace in the Ebor, which, with a big field, makes it a true test over the distance.

Using Smartform we’ve rated all the contenders according the winning distance strike rate of their sires, and have the following shortlist of 4 for the race (in order of sire strike):

1. Harlestone Times

2. Tactician

3. Vulcanite

3. Fox Hunt

Food for thought, since all are priced at 12/1 +…

No Comments (add your own) »

Jockey rides today

By colin on Saturday, August 6th, 2011

For those who like analysing jockeys by meeting or playing spreads on jockey rides, Smartform is a great place to start your analysis.

The following query gives us all declared rides ordered by jockey with the number of mounts from highest to lowest:

>select distinct jockey_name, count(jockey_name) AS ‘rides’ from daily_runners join daily_races using (race_id) where meeting_date=CURDATE() group by jockey_name order by count(jockey_name) DESC;

For today’s racing that gives us:

+——————–+————-+
| jockey_name       | rides           |
+——————–+————-+
| T P Queally           |                 10 |
| Jim Crowley         |                 10 |
| S Sanders              |                  8 |
| K Fallon                 |                  7 |
| J P Spencer           |                  7 |
| B McHugh             |                  7 |
| D Nolan                  |                  7 |
| G Baker                  |                  7 |

Now we can drill on in on the mounts of any jockey we are interested in with an individual, one-line jockey query, using any combination of over 100 variables to analyse.

No Comments (add your own) »

Stewards Cup by speed, pace and sire

By colin on Saturday, July 30th, 2011

Dandy Nicholls has no fewer than 6 runners declared in today’s cavalry charge, with 5 of them occupying the top 5 places for the strongest likely pacesetters in the race.  Even odder is that the top 4 are drawn 17, 15, 13 and 14 respectively.   So expect strong pace in the middle of the track.

High Standing is the standout pick on sire statistics, drawn 28, so with the stands rail draw, the champion jockey to assist, and a nice win last time out.

Ancient Cross’ last time out win came out well in terms of speed figures, but was with cut in the ground over 5 furlongs.  Of those that have performed well on the clock at Goodwood over 6 furlongs, Crown Choice is the clear pick with a nice win in May over course and distance.

So, 3 at huge prices to take against the field:

Happily Crown Choice is drawn on the other side of the track in 6, so provides some hedge against High Standing, with Tajneed taken to do better than should be expected in the middle of the course.

No Comments (add your own) »

Shamardal at Ascot day 2

By colin on Sunday, July 24th, 2011

So not much luck for Shamardal’s progeny yesterday – neither of his runners were placed.

Let’s see if the overall impressive strike rate of this sire shows through today, running the same query as previously in Smartform in order to find any qualifying runners.  This time we’ll add in Smartform’s forecast price field.

mysql> select forecast_price, name, course, scheduled_time from daily_races join daily_runners using (race_id) where meeting_date=CURDATE() and sire_name = “Shamardal”;
+—————–+————–+——–+————————–+
| forecast_price | name           | course | scheduled_time           |
+—————–+————–+——–+————————–+
| 5/2                    | Burj Nahar  | Ascot  | 2011-07-24 15:25:00   |
+—————–+————–+——–+————————–+
1 row in set (0.88 sec)

So it’s just Burj Nahar in the 3.25 – apparently fancied a bit more by the market than yesterday’s contenders.

No Comments (add your own) »

Shamardal at Ascot

By colin on Saturday, July 23rd, 2011

Shamardal is of course at stud, but his progeny have a decent strike rate, as such some decently priced winners can be thrown up when they are racing under the right conditions.

How to find progeny of Shamardal racing at Ascot today, where their sire won the St James Palace stakes (well, it was run at York that year, to be exact)…?

It’s a simple query in Smartform, as follows:

>select name, course, scheduled_time from daily_races join daily_runners using (race_id) where meeting_date=CURDATE() and sire_name = “Shamardal”;

The results, returned in less than a second, are:

Alnashmy | Ascot     | 2011-07-23 15:15:00
Below Zero | Ascot     | 2011-07-23 15:50:00

Both are decent prices, both racing over 1 mile and 7 furlongs respectively (good trips for their sire), so good luck to them.

No Comments (add your own) »

Newbury angles Saturday

By colin on Saturday, July 16th, 2011

Some favourite angles for gaining an edge over the odds seem less potent at Newbury.  Front running pace is one of those.  Whereas front runners can gain a significant advantage on tight, turning courses they are more likely than not to set the race up for something coming off the pace at Newbury.   Most races on the wide, galloping course at Newbury are usually run at a good pace with plenty of room for manoevre, meaning genuinely fast, long striding types tend to do well.  By the same token, horses racing over whatever distance need to get every yard of the trip.

The angle we’re going to use is therefore the distance strike rate of each of the sires for all races over a mile at Newbury today, combined with the age and going strike rates for those sires, to see if we can spot any interesting contenders. Below are the top 2 for each of the qualifying races:

2.55 (1 mile) Watneya, Al Mayasah

16.05 (1 m 2f) Anmar, Distant Memories

17.10 (2 miles)  Morar, Dynamic Drive

No Comments (add your own) »