Polymarket Forecasting & Trading Bot
2025 – 2026 · Python, SciPy, scikit-learn, Polymarket CLOB API
A live trading bot that forecasts how many views a YouTube video will reach in
its first week, and prices seven mutually-exclusive outcome buckets on
Polymarket against that forecast.
The forecast is an ensemble of three models, weighted by how old the video is:
kernel-weighted historical analogues, velocity-decay extrapolation, and a
Gompertz growth curve fitted with bootstrapped uncertainty. Their
outputs combine into a Gaussian mixture, which is integrated over each bucket's
range to give a probability — so the output is a full distribution, not a point
estimate. Positions are sized with quarter-Kelly under a minimum
edge threshold and per-bucket exposure caps, and orders execute through
Polymarket's CLOB API from a VPS on a five-minute loop.
84%exact bucket, day 5
(14% by chance)
100%within one bucket
at 120h
37videos backtested
× 7 horizons
Where it breaks down. The model is flat at roughly 35% accuracy for
the first three days and only earns its edge from 96 hours onward, once enough of
the growth curve exists to identify the Gompertz ceiling. Early-life forecasting
is the open problem.
- Gompertz curve fitting
- Gaussian mixtures
- Kelly criterion
- Brier scoring
- Bootstrapping
- SciPy
- REST APIs
UK Car Mispricing Scanner
July 2026 – present · Python, scikit-learn, DVLA & DVSA APIs
A scanner that estimates what a used car should cost and ranks the whole
market by how far below that estimate it is listed. Each listing is priced by
gradient boosting on log(price) against comparable cars, using
age, mileage, engine size, fuel, transmission, body, trim and variant.
Two details do most of the work. Predictions are made out-of-fold,
so the model pricing any given car was trained on other cars and never on that one —
without it, a bargain partly determines its own "fair" price and the signal
disappears. And modelling log price means the model minimises proportional
rather than absolute error, so a £3k hatchback counts as much as a £90k SUV, and
the residual is itself the percentage discount.
4.7%median absolute
pricing error
76%priced within
10% of actual
31,163listings ranked
out-of-fold
Two independent signals run side by side — the residual against predicted price,
and a quantile regression giving each car a spread-normalised score comparable
across very different segments. Only cars flagged by both reach the shortlist.
A nightly pipeline keeps it current: a delta scrape for new listings, a rolling
refresh that catches price cuts and sold cars, a re-rank, and alerts on new
entrants. Vanished listings are logged so the shortlist can be tested on whether
flagged cars actually sell faster.
The obvious hole, and the fix. A car listed 40% below prediction is
usually cheap for a reason the advert does not mention. A separate check pulls the
DVLA and DVSA MOT records and cross-references the advertised mileage against the
official history — catching wound-back odometers and cloned plates before anyone
drives anywhere.
- Gradient boosting
- Quantile regression
- Cross-validation
- Feature engineering
- scikit-learn
- pandas
- Automated pipelines