Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board

Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board > Thoroughbred Horse Racing Discussion > Handicapping Software


Reply
 
Thread Tools Rate Thread
Old 05-22-2016, 12:17 AM   #31
classhandicapper
Registered User
 
classhandicapper's Avatar
 
Join Date: Mar 2005
Location: Queens, NY
Posts: 20,528
I'm bumping this because I'm looking for a solution this problem right now.

I'm looking for a way to get all the scratches for a race card in a text or Excel file. Then I could easily import them into a scratch table in my database and exclude any horses I want from the handicapping reports I generate for that day's card before the races start.

It's too much work to do manually for multiple tracks but I need it because some of the reports are pace sensitive.
__________________
"Unlearning is the highest form of learning"
classhandicapper is online now   Reply With Quote Reply
Old 05-22-2016, 04:58 AM   #32
sjk
Registered User
 
Join Date: Feb 2003
Posts: 2,105
I am still doing it manually after all these years and don't find it takes much time. I make a table in the database with all the runners and a factor of 1.0001. I look at the scratches and delete the leading 1 (making a factor of .0001) for those listed. Only takes a few minutes for all the tracks.
sjk is offline   Reply With Quote Reply
Old 05-22-2016, 09:28 AM   #33
headhawg
crusty old guy
 
headhawg's Avatar
 
Join Date: Aug 2003
Location: Snarkytown USA
Posts: 3,909
When I was working on HHXv3 I wrote an scratch routine for it. There was both an auto and manual scratch component to it. The autoscratch would check with the Equibase site for scratches, write the scratched horses for all tracks loaded to a text file, and then put the 'S' flag in field 5 so HHX would know not to run any calculations on that horse. The user could also manually scratch if he/she had no Internet connection. Attached is a text file sample.

It's been three years since I wrote that code so I have know idea if it works 100% anymore. Track names may have changed; the Equibase XML file may have also changed. Writing the parser in Liberty Basic sucked, but it seemed to work ok at the time. Took me a lot of hours.
Attached Files
File Type: txt scratches.txt (2.5 KB, 60 views)
headhawg is offline   Reply With Quote Reply
Old 05-22-2016, 09:30 AM   #34
vegasone
Registered User
 
Join Date: Aug 2007
Posts: 526
It is really very simple to extract the scratches from the equibase site at the end of the day or during the day. Mostly though I would compare the results file with the initial group of runners and get a scratch list that way.

I pull the scratches in the morning before handicapping. This is done automatically and it is updated later when testing by comparing runner lists.
vegasone is offline   Reply With Quote Reply
Old 05-22-2016, 10:21 AM   #35
classhandicapper
Registered User
 
classhandicapper's Avatar
 
Join Date: Mar 2005
Location: Queens, NY
Posts: 20,528
Quote:
Originally Posted by sjk
I am still doing it manually after all these years and don't find it takes much time. I make a table in the database with all the runners and a factor of 1.0001. I look at the scratches and delete the leading 1 (making a factor of .0001) for those listed. Only takes a few minutes for all the tracks.
That's approach I was contemplating. Naturally, I already have a table with all the horses running. I could easily extract Track, Date, Race, Horse, and have 1 field empty (scratch filed). Then I could manually alter the scratch field before I run my daily reports and exclude the marked ones.

I was hoping to automate that somehow. In fact, I'm kind of shocked it's not an existing service somewhere already. The number of database handicappers isn't large, but if you are already creating PP files the service would be quick to develop and might attract people if priced low enough.
__________________
"Unlearning is the highest form of learning"
classhandicapper is online now   Reply With Quote Reply
Old 05-22-2016, 11:00 AM   #36
classhandicapper
Registered User
 
classhandicapper's Avatar
 
Join Date: Mar 2005
Location: Queens, NY
Posts: 20,528
Quote:
Originally Posted by headhawg
When I was working on HHXv3 I wrote an scratch routine for it. There was both an auto and manual scratch component to it. The autoscratch would check with the Equibase site for scratches, write the scratched horses for all tracks loaded to a text file, and then put the 'S' flag in field 5 so HHX would know not to run any calculations on that horse. The user could also manually scratch if he/she had no Internet connection. Attached is a text file sample.

It's been three years since I wrote that code so I have know idea if it works 100% anymore. Track names may have changed; the Equibase XML file may have also changed. Writing the parser in Liberty Basic sucked, but it seemed to work ok at the time. Took me a lot of hours.
That's exactly what I am looking for.
__________________
"Unlearning is the highest form of learning"
classhandicapper is online now   Reply With Quote Reply
Old 05-25-2016, 05:35 PM   #37
QuickHorse
Registered User
 
QuickHorse's Avatar
 
Join Date: Dec 2014
Posts: 47
How about if the software would update the scratches in real-time using its built in Live Tote Board? That would be kind of neat.

Mike
QuickHorse is offline   Reply With Quote Reply
Old 08-08-2017, 03:22 PM   #38
classhandicapper
Registered User
 
classhandicapper's Avatar
 
Join Date: Mar 2005
Location: Queens, NY
Posts: 20,528
I'm bumping this again because I'm getting tired of marking scratches manually or having to recalculate some things manually because of scratches.

Does anyone have a good automated way to get "today's scratches" into a text file, Excel file, database etc..?
__________________
"Unlearning is the highest form of learning"
classhandicapper is online now   Reply With Quote Reply
Old 08-09-2017, 02:13 AM   #39
mikesal57
Veteran
 
mikesal57's Avatar
 
Join Date: Sep 2003
Location: NEW YORK CITY
Posts: 3,670
Quote:
Originally Posted by classhandicapper View Post
I'm bumping this again because I'm getting tired of marking scratches manually or having to recalculate some things manually because of scratches.

Does anyone have a good automated way to get "today's scratches" into a text file, Excel file, database etc..?
Class...

See if this can help you...

Click XML file and open in NOTEPAD...

I'm sure someone here can write you a program to incorporate this info...

http://www.equibase.com/static/latec....jp77oS0W.dpbs

mike
mikesal57 is offline   Reply With Quote Reply
Old 08-09-2017, 09:17 PM   #40
headhawg
crusty old guy
 
headhawg's Avatar
 
Join Date: Aug 2003
Location: Snarkytown USA
Posts: 3,909
Quote:
Originally Posted by classhandicapper View Post
I'm bumping this again because I'm getting tired of marking scratches manually or having to recalculate some things manually because of scratches.

Does anyone have a good automated way to get "today's scratches" into a text file, Excel file, database etc..?
This would be child's play for a real programmer. For someone like me it would be a lot of hours that I just don't have. The code that I wrote for HHXv3 may still work, but it only does scratches for the data files that are loaded; it doesn't parse the XML files for all of the tracks.

But just out of curiousity -- what would the txt/csv file look like to you (or are you looking to have the data file modified)?
headhawg is offline   Reply With Quote Reply
Old 08-10-2017, 12:13 AM   #41
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,258
I've been doing this for scratches, surface changes, and race distance changes in JCapper for years.

Last year, after closing day for Saratoga, I bit the bullet and spent the better part of three weeks adding changes in track condition and rider changes.

That said, getting it done turned out to be a lot more work than I imagined going in.

Mistakes, corrections, and corrections of corrections for all of the above mentioned changes types can and do show up in the xml.

It's not terribly difficult to handle the more common cases once you've seen them.

But there are a number of hurdles you'll have to overcome - mainly for the things you don't expect.

For instance, sometimes a track somewhere will ask Equibase to change the name of their track -- with the result being that one day out of the blue the new track name shows up in the xml and breaks your parse routine.

After reprogramming the app several times for those I ended up creating a table with a user interface that gave the user the ability to make those kinds of changes on the fly.

When I enabled parsing of rider changes I discovered there are differences between the rider names in the xml and the rider names in the data file and/or chart file for the same rider.

To handle those I ended up creating a table that (among other things) contains fields for rider name as read from the xml and rider name for the same rider as read from the data and/or chart file -- plus a parse routine that runs automatically to populate the data file or chart file side of the table -- plus a button the user can click to clear the table -- plus a second button the user can click to manually initiate the populate table with rider names routine...

Plus an aglorithm that matches rider name as parsed from the xml with the data file name for that same rider -- with a high degree of accuracy.

I found it really helpful to auto-strip any and all punctuation characters from names on all sides (data file, chart file, and the xml) before doing any name matching.

In something like 997 out of 1000 cases the name matching happens automatically behind the scenes - and rider changes process seamlessly. (To make this work you need to have clean data sitting in the table.)

But for the rare case where the algorithm fails to match a name:

I ended up creating a formal user interface enabling the user to perform manual rider changes. Sometimes the rider name in the data file is something like "no rider" -- or the rider name in the xml is an obvious data entry error -- or something incomplete like "tbd" or "tba", etc. And every once in a blue moon you have a new rider name in the xml for somebody who happens to be picking up his or her very first mount.

Obviously, under those circumstances auto-name matching isn't going to happen.

Having a manual rider changes interface also comes in handy for late rider changes announced as the field faces up to the gate.

In such cases the horse is returned to the paddock so it's not uncommon for several minutes to pass before the change is announced or appears on the track video. But somehow such changes have a way of not showing up in the xml so you can parse them (at least not before the race goes off.)

The formal interface for manual rider changes enables the user to pull up the current horse after selecting date-track-race from drop downs -- select the replacement rider name from a drop down pre-populated with rider names sitting in the table -- or alternately key the replacement rider name manually -- and then persist the change by clicking an Apply button.

To my way of thinking a rider change entails more than just a name change. It also entails stats changes. Sometimes the stats changes are significant enough to cause a change in probabilities not just for the horse with the rider change but for the other horses in the field as well.

To that end I created an algorithm to pull up stats for the replacement rider and overwrite the existing rider name and stats in the data file with the replacement rider name and replacement rider stats.

None of this required what I'd call true brilliance. But I wouldn't call it child's play either.

By posting this -- my hope is that someone who decides to take this on will end up avoiding some of the obstacles I encountered along the way.



-jp

.
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com

Last edited by Jeff P; 08-10-2017 at 12:22 AM.
Jeff P is offline   Reply With Quote Reply
Old 08-10-2017, 08:14 AM   #42
mikesal57
Veteran
 
mikesal57's Avatar
 
Join Date: Sep 2003
Location: NEW YORK CITY
Posts: 3,670
AWESOME write up Jeff , as usual..

Just hope you didn't scare away any takers...

Mike
mikesal57 is offline   Reply With Quote Reply
Old 08-10-2017, 07:50 PM   #43
headhawg
crusty old guy
 
headhawg's Avatar
 
Join Date: Aug 2003
Location: Snarkytown USA
Posts: 3,909
Quote:
Originally Posted by Jeff P View Post
None of this required what I'd call true brilliance. But I wouldn't call it child's play either.
classhandicapper just asked for scratches, which I have done already, so I know that anyone with real coding skills could do it easily hence the "child's play" comment. If the XML structure or track name changed that obviously the code would need to be updated. Doing all the things that were in your post is obviously much more challenging. And scraping a real time tote for data...well...that is waaay out of my league.
headhawg is offline   Reply With Quote Reply
Old 08-16-2017, 08:49 AM   #44
chuckster1968
Registered User
 
chuckster1968's Avatar
 
Join Date: Mar 2017
Posts: 65
I jumped ahead to the end of the thread because I would like to know if there is there a software out there that can import the DRF Files into a window of software whereby you can circulate through each horse as Post Time Daily does in Black Magic yet can create on top simple factors such as Bet Mix or Stat Lens whereby you the handicapper can take the figures and point out all the obvious you are looking for. I believe the most important thing Valuecapper does is point out the odds line. So I would love to make a software that can do this.. or is there a software that could do this??? I want to be able to see horses past performances the way you look at it on paper or online and to be able to have the factors at the top of the page..??

Anybody interested in doing this..
chuckster1968 is offline   Reply With Quote Reply
Old 08-18-2017, 11:12 AM   #45
classhandicapper
Registered User
 
classhandicapper's Avatar
 
Join Date: Mar 2005
Location: Queens, NY
Posts: 20,528
Thanks for all the input.

This is what I was doing before.

As part of my daily run I systematically create a table with all the tracks/horses for today. I have a field in that table called "scratch indicator" that I can manually mark for any horse(s) that were scratched. Then all subsequent reports exclude those horses.

Now I am:

1. Downloading the Equibase daily XML scratch file. I'm not familiar with how to work with XML files, but I found that it's easy to import that XML file into Excel where it gets reformatted into some very neat columns.

2. I import that Excel file into another predefined table in my database.

3. I run a scratch Query that matches the 2 tables and marks all the appropriate horses as scratched.

There are probably some things I can do to automate it further, but this is already a great start.

Jeff, that was some great stuff, but what you are doing is well beyond my needs at this point.

I generate a series of reports for the day that are would describe as "running style report", "pace projection report", "track/distance/surface profiles report", "class ratings report", "race flow upgrades/downgrades report", and "bias upgrades/downgrades report".

A quick glance at those reports allows me to quickly jump to the tracks, races, and horses that might present an opportunity. Manually marking scratches was a pain in the neck.
__________________
"Unlearning is the highest form of learning"

Last edited by classhandicapper; 08-18-2017 at 11:20 AM.
classhandicapper is online now   Reply With Quote Reply
Reply




Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

» Advertisement
Powered by vBadvanced CMPS v3.2.3

All times are GMT -4. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program
designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.