01 · Forecasting · runs every race weekend
FormulaAnalytics: a race forecast that grades itself in public
A statistical model gives every Formula 1 driver a probability of winning, reaching the podium, scoring points and retiring. It then tests those numbers against prediction-market prices and publishes the result.
- commits
- 995
- test files
- 93
- automated workflows
- 13
What it looks like
7 screens. Swipe sideways, or tap one to see it full size.
One driver: projected finish, probabilities, and how the model got there.
Race projections for the next round.
The season ledger. Losing rounds are published with the winning ones.
Two models against one market, largest gaps first.
Driver ratings for the season.
Team ratings for the season.
The same pages on a phone.
How it works
- Race results and qualifying data come in after each session.
- GitHub Actions re-fits the model on every race from 2022 to 2026.
- A backtest scores the new fit on races it has not seen. A fit that scores worse does not ship.
- The forecast is compared to prediction-market prices.
- When the gap is larger than the fees, the system logs a simulated trade.
- Each trade is settled against the real result and added to the public ledger.
Research agents read upgrade and stewards news for the model. Claude Code writes most of the code, on branches, through pull requests that merge only when the automated checks pass.
The value
Most forecasts are never checked. This one keeps score on itself, so I know how far to trust it and where it is weak. The same setup would work for any forecast a business depends on: demand, risk, or churn.
It also runs without me. A race weekend needs no manual steps, which is what "in production" should mean.
What I learned
- Decide the test before you see the result. I write the hypothesis and the pass mark before a model change is tested. It stops me from talking myself into a change that only looks good.
- Check where a number came from. A stale local data file once shadowed a corrected one and sank a whole study without raising an error. Now any script that produces a number first checks the source of its code and its data.
- Agents need the same controls as people. Branches, reviews and a protected main line let me hand most of the coding to an agent without handing over the decisions.
- Publishing the misses builds trust. A track record with losing rounds in it is more convincing than a claim of accuracy.