Skip to main content

Lab · Trading

Where being wrong is measurable

An automated trading system on racing exchange markets: it watches live prices, decides, places small orders, and records every one. It runs now. We keep it because it is the one place where a model's claim is settled by the market within minutes, and the record is not open to interpretation.

What is built

The live system

TypeScript on Node, in a container on a cloud machine, reading a streaming market feed. Nineteen services, 96 test files, and metrics on everything it does.

82,556 lines · 19 services

The record

Every order, signal and settlement is written to a log as it happens. One sampled record shows 6 milliseconds from signal to order placed.

114,005 orders · 29 days

The data

Recorded market data from February 2024 to August 2026, replayed to test an idea before it is allowed anywhere near a live order. The data is licensed, not ours.

275 GB · 31 monthly archives

What the record shows

It includes machine learning — direction models, win-probability models, exit-timing models — but the strategies that place live orders are rule-based, so this is a system that contains machine learning rather than one driven by it.

The returns stay in the repository rather than on this page, and the reason is in the numbers themselves. One test looked like a 14.2% profit and came out at a 17.2% loss once realistic fills were modelled. One live configuration ran at a 63% loss over 629 bets. Finding that out is the point: a strategy that cannot survive honest accounting fails here, cheaply, instead of somewhere that matters.

Stakes are kept small on purpose. This is a laboratory for measurement, and the page is here as a record of method.

Why it is on this site at all

Everything else aXai builds makes claims that are slow to check — whether a plan was followed, whether a document is accessible, whether an answer was right. Here the market checks the claim in minutes and keeps the receipt. The habits that came out of it, of estimating cost before running a query and of never modifying a live system without a recorded reason, are now rules in the way we build everything else.