Analyzing Trotting Race Histories
YAML--- name: analyzing-trotting-race-histories description: Parses and analyzes Swedish harness racing (travsport) result histories for a single horse, extracting form trends, driver performance, distance and track patterns, and odds behavior. Use when given pasted race result lines from sources like travsport.se or ATG, or when asked to assess a trotter's current form, class, or betting value. ---
Analyzing Trotting Race Histories
Paste raw result lines and parse each into structured fields before analyzing. Format of one line:
DATE TRACK-RACE DRIVER PLACE DISTANCE:STARTPOS KMTIME[CODES] ODDS PRIZE' RACETYPE
2026-11-04 Jägersro-8 Joakim Lövgren 1 1640 : 6 11,2a 13,78 60' Vanlig
Parsed:
| Field | Value | Meaning |
|---|---|---|
| Date | 2026-11-04 | Race date |
| Track / race no. | Jägersro, race 8 | |
| Driver | Joakim Lövgren | |
| Placing | 1 | Winner |
| Distance : start pos | 1640 m : post 6 | Auto-start, post 6 (or 2140 m volt/auto) |
| Km time | 11,2a | 1:11.2 per km, a = auto start |
| Odds | 13,78 | Decimal odds (13.78x) |
| Prize | 60' | 60,000 SEK |
| Race type | Vanlig | Standard (vs. Amerikansk) |
Then output: a one-paragraph form verdict, a trend table, and 3 to 5 key observations.
Progress:
- [ ] Step 1: Parse all lines into a table (note domestic vs. foreign)
- [ ] Step 2: Normalize km times to seconds and flag breaks/DQs
- [ ] Step 3: Segment by period, driver, distance, and track
- [ ] Step 4: Compute win/place rates and odds-vs-result patterns
- [ ] Step 5: Identify trend and write verdict
- [ ] Step 6: Flag data gaps and ambiguities
Step 1: Parse
Extract the fields above for every line. Handle these quirks:
- Placing codes: a number = finishing position;
d= disqualified (galloped/broke);0= unplaced outside the money;-= no data. - Km time codes:
a= auto start;ag= auto start + gallop;kub8agor similar = ran a gallop (g) and the first characters are a code, not a time. Treat as no valid time. - Missing fields: foreign races (Italien) often lack odds and the distance after the colon. Mark as
n/a, do not infer. - Order: results are listed newest first. Reverse for chronological trend analysis.
Step 2: Normalize times
Convert 11,2a to 71.2 s/km (1:11.2). Do not compare times across different distances without noting it. Time on 1640 m auto vs. 2140 m auto vs. Italian races differ in context.
Step 3: Segment
Always produce these cuts:
- By period: e.g., 2025 (Italy) vs. 2026 (Sweden). A change of country, trainer, or driver can mean a change of class.
- By driver: starts, wins, places, and average odds per driver.
- By distance: 1600-1646 m vs. 2140-2160 m.
- By track: home track vs. others.
- By start position: inside (1-4) vs. outside (5+).
Step 4: Metrics
For each segment compute: starts, wins (placing 1), top-3 rate, DQ rate (d), and average odds. Interpret odds as the market's view of the horse's chances:
- Winning at high odds (e.g., 13.78 or 41.28) means a surprise result that should not be projected as typical form.
- Low odds with a win or place (e.g., 2.06, 2.12) means the market expected it and the horse delivered.
- Low odds with a loss or DQ means a failure of confidence, so look for cause (gallop, post, distance).
Step 5: Verdict
State: current form (improving / stable / declining), best conditions (distance, start position, driver), and risk factors (gallop frequency, class level).
Example 1: Input: the full history pasted above (newest first).
Output (abridged):
Verdict: Stable, with an upward spike in the last start. Winning 2 of the last 16 starts in Sweden (2026), but 10 of 16 starts finished in the top 6, with a recent win at Jägersro (2026-11-04) at 13.78x odds, a likely overperformance rather than a new baseline.
Key observations:
- Country change: 2025 Italian races (5 starts) show 0 wins and one DQ (
0ag), with no odds data. Sweden 2026 shows markedly better results, so avoid mixing the two samples.- Driver split: Bernardo Grasso, 9 starts, 1 win in 2026 (2026-10-02 Kalmar at 41.28x), plus 5 placings. Joakim Lövgren, 4 starts, 3 wins (2026-05-22, 2026-06-10 at 2.12x, 2026-11-04). Stronger results with Lövgren on a small sample.
- Distance: Wins on both 1640 m (Jägersro, 11,2a) and 2140 m. Best km times on 2140 m are around 12,8a (2026-06-22, 2026-07-08), the sharpest recurring level.
- Reliability: One DQ in Sweden (2026-05-14, Thomas Linder,
kub8ag) and one in Italy. Low gallop rate in the current season.- Odds pattern: Two low-odds wins (2.06, 2.12) show the horse is reliable when the market trusts it. Two high-odds wins (41.28, 13.78) show occasional upside.
Example 2:
Input: a single line 2026-05-14 Jägersro-2 Thomas Linder d 2140 : 2 kub8ag 3,62 40' Vanlig
Output:
Disqualified (
d) after a gallop (ag). Start post 2 on 2140 m. Odds 3.62 mean the market considered this a real contender. No valid km time (kub8is a code). Treat as a negative data point for reliability, not for speed. Do not include in average km time.
- Report sample sizes with every percentage ("3 of 4", not just "75%"). Small samples dominate trotting data.
- Separate surprises from baseline: exclude or flag extreme-odds results when estimating typical form.
- Check chronology: reverse the list before looking at trends; the top row is the most recent.
- Account for context: a driver change on the same day as a distance change confounds both. Say so.
- Note race type:
Vanlig(standard) vs.Amerikansk(American-style, different gait/start rules and often a different field). Treat Amerikansk results as a separate category. - Convert currency only if asked: prize money is in thousands of SEK (
60'= 60,000 SEK).
- Treating
dorkub8agas a time. These are disqualification/gallop codes, not performances. - Treating
0as a loss at the same level as6. In this data0often means unplaced or no listed position, especially in foreign races. - Comparing Italian and Swedish km times directly without noting differing tracks, conditions, and class.
- Overinterpreting a single win. One win at 13.78x or 41.28x does not establish a trend.
- Inventing missing data. If odds, post, or distance are absent (
-), report "not available" instead of estimating. - Ignoring the date gap: a 5-month gap (Oct 2025 to Mar 2026) suggests a layoff, import, or transfer, which should be mentioned before judging form.
- Giving betting advice as certainty. Present patterns and probabilities, not guarantees.