Polymarket bot
A trading bot against Polymarket, started as an MVP to check the markets were beatable at all — and they were.

The MVP came first
Before building anything substantial, the only question worth asking was whether there was an edge at all. So: a small algorithmic trading system against the Polymarket APIs, sized to answer that and nothing more.
The answer was that the markets were not too efficient. So it kept going.
What it turned into
- **A scraper** for automated collection of market data, because there was no clean feed for what it needed
- **A backtest simulator**, which is where most of the time went — strategy optimisation means running many strategies many times over the same history
- **An API wrapper** so the test environment and production behave identically, which is the difference between a backtest that means something and one that does not
Where it landed
- **Calibration.** Market price against realised probability. The points sit off the diagonal — systematically, not noisily — which is the reason there was anything to trade at all.
- **VaR.** 821 simulated runs: mean drawdown 12.88%, median 11.54%, standard deviation 4.44%, 95th percentile 20.73%, 99th 26.63%.
- **XGBoost classifier.** 21,150 predictions at 0.80 accuracy — and a much flatter macro average, f1 0.54 against a weighted 0.74. The gap is class imbalance, 16,880 of one class to 4,270 of the other. Accuracy was the flattering number.
Features were market shape rather than sentiment: price, spread, distance from 50, log-odds, depth, depth-to-price ratio, time to expiry, hour of day, weekend.