Personal product
EVCore.
A sports data analysis platform. It ingests heterogeneous feeds, derives probabilities from them, then honestly measures what the model adds against the market price.
- State
- Deployed, evolving
- Updated
Product vision
EVCore reads sports fixture data, derives probabilities from it and sets them against what the market says. I gave it a limit from the start: the system analyses and proposes, but it never acts on behalf of the person using it.
I think of it first as a place to measure things. Every analysis is recorded with its timestamp, the price observed at that moment and its outcome, and it is evaluated afterwards. That is the only way to know whether a model carries information or is just telling itself a story.
The problem
The data comes from several sources, at different rhythms, and it is never complete: fixtures, results, match statistics, line-ups, market prices sampled continuously. It has to be normalised without inventing anything. When a batch arrives incomplete, I reject it rather than fill the gaps by guesswork.
The hard part is not producing a probability but knowing whether it is any better than the price on display. A market price aggregates a great deal of information, and nothing guarantees you can do better. So my job is to measure that gap instead of assuming it, and to judge each new idea on the residual (what the price does not already say) rather than on how good it looks in absolute terms.
My contribution
I defined the product and its limit, the architecture in separate processes and the data model. I also set the evaluation method, with point-in-time replay, deduplication and comparison against the price, along with the guardrails that say what may enter a decision, what stays an observation and what calls for a human decision.
The implementation was carried out with AI coding agents, under my direction. They follow engineering rules written into the repository, and nothing is merged without a systematic review.
Architecture & engineering
At the centre I put a pure analysis core with no input or output. The live engine and the historical replay call the same functions, so there are never two versions of the truth, and guard tests check that this boundary is not crossed.
Around that core the system runs as two separate processes, an HTTP API and a worker watched by a health probe, and a test checks that the separation holds. Ingestion is scheduled through queues, one per kind of data. The schema is validated at the boundary and a partial batch is rejected outright.
PostgreSQL holds the historical truth. The price table is partitioned by month. Once a month is closed it moves in columnar form to S3-compatible storage, and the row count is read back to validate the archive.
On the modelling side, goals follow a Poisson model, corrected for the dependence between low scores with a parameter for each competition. The margin is removed from prices to get back to comparable probabilities. Count markets rely on a negative binomial model, and international friendlies on an Elo-style strength model.
Twenty deterministic strategies are described in a single registry. There is a language model, but it lives in a separate worker and writes a readable opinion beside the decision, never inside it, so none of its output reaches the score. The interface is an installable web application whose service worker caches static assets only.
Technical challenges
The difficulties that cost me most were not mathematical; they came from how things are counted. The first need was a replay with no look-ahead: a point-in-time loader returns only what was known before kick-off. Without it, every evaluation would be flattered by data that did not exist yet.
A fixture is re-analysed several times before kick-off, and each pass writes its own row. Count them all and the standard errors shrink, until a false conclusion looks like a solid result. That is why every measurement goes through a deduplicated view.
Settlement raises a related problem, since it runs over the same rows again. So I count on the transition into the settled state, never on the state itself. A value that cannot be computed is excluded and counted apart; it is never turned into a zero.
Products of probabilities and prices go through a decimal library rather than floating point, and conversion happens only at the database boundary. In competitions where data is sparse, estimates are shrunk towards a reference instead of being taken at face value.
That left the volume of prices. Monthly partitioning and columnar archival replaced the idea of a dedicated time-series database, less for performance than for what such a database would have cost to run.
Design decisions
This project has no decision-record directory. Decisions live in the roadmap, in a dated experiment log and in audits, and most of them removed something. Each removal was driven by a measurement rather than a preference, which is what keeps the system readable.
A machine-learning layer left the decision path after failing to do better than the market; I redefined it as an input to the engine, judged out of sample. External monitoring tooling and a time-series database were dropped in favour of partitioning and an internal console. The language model stays outside the score, by construction and by test.
Other choices are a matter of discipline. The rule is that data access goes through repositories only, and thresholds live in configuration, never hard-coded inside a rule. When a market degrades over a trailing window it is suspended automatically, but bringing it back takes a human decision.
Technology stack
Everything lives in one monorepo, in two languages, with a clear boundary between computation and the rest.
- Backend: NestJS in two processes, Prisma, PostgreSQL, Redis and BullMQ, schema validation at the boundaries, a decimal library for arithmetic.
- Analysis: pure TypeScript packages for the engine and the replay, plus a Python worker for exploratory statistical work.
- Web: Next.js, React, Tailwind CSS, an installable application and web notifications.
- Operations: Docker Compose, GitHub Actions, image vulnerability scanning, S3-compatible object storage.
Lessons learned
Sharing one pure analysis core between the engine and the replay is what keeps what I measure from drifting away from what I run.
Comparing myself to the market price rather than to my own estimate changed what I build. I no longer ask whether my model is good, but whether it adds anything the price does not already say.
I also learnt that counting discipline, meaning deduplication, idempotency and dates, matters more than how sophisticated the model is. My worst mistakes all came from there.
What’s next
The current roadmap tightens the scope around what can be measured. It plans to use the market price grid as an input to the engine rather than only as its judge, and to keep machine learning for the residual, for what the price does not say, provided it holds out of sample. Measurements will be reread with their date attached, so that an old conclusion does not outlive its data.
There is also technical debt I acknowledge: finishing the move of every data access behind repositories, and moving the strength model into the analysis core. Multi-tenancy and other sports are still research, and nothing has started there.