Fair Price Engine
A home-built ML valuation engine for Swedish used cars, trained on about 130,000 listings and deliberately kept from cheating.
- Part no.
- A93-07
- Status
- working
- Platform
- Python · Data / ML
- Year
- 2026
- Stack
- PythonPlaywrightSQLiteXGBoostMLflowStreamlitDocker
Used-car market data costs a lot, and the valuation tools you can get are black boxes. You can't see why a car is "worth" what they say.
A local-first dataset of the Swedish market that I own, for pricing analysis, dealer benchmarking and EV-versus-ICE research. Models I can take apart, ablate and explain.
Research tool today. As a business it would sell valuations to dealers or lenders, but only on licensed data.
- Dealers who might pay for valuations (assumption)200
- ×Price€50/mo
- =Monthly recurring revenue€10k
- −Licensed market dataunknown
- =Real margindepends entirely on that
- Daily scrape and refresh on Railway
- ≈ €15/mo
- Training
- on a laptop, €0
- Storage
- SQLite, €0
Compute is trivial: XGBoost trains in minutes on 130k rows. What limits growth is the data rights and how fresh the data is, not the model.
A great learning project. A real product needs a data licence before anything else.
- 01CollectPolite scraping of public listings, by sitemap and HTTP plus Playwright.
- 02StoreNormalised SQLite, with a CLI for stats, queries and CSV export.
- 03FeaturesThe site’s own price estimate (the "answer key") is deliberately dropped.
- 04Model tournamentXGBoost per segment and regime, picked by a router, tracked in MLflow.
- 05ExplainConfidence score, comparable cars and a flag for mispriced listings in a Streamlit app.


Leakage hunted down
Dropping the obvious "answer key" feature cost points on paper but gave a model that actually generalises.
A blended objective
Models are scored on MedAPE, MAE and RMSE together, so no single metric gets gamed.
Explained in plain English
An ML overview written for non-ML readers explains what the model does and where it shouldn’t be trusted.