Personal project · paper trading

Thermal Edge

Trading temperature on Polymarket

Every fifteen minutes a forecaster prices the daily high and low temperature for about fifty cities against Polymarket's live order books, and paper-trades the gaps it expects to pay after the spread and the fee.

CatBoost + N-HiTS 12 weather models + 2 ensembles ~50 cities Paper only
See performance
Last scoring cycle
·
markets scored

How it works

Seven stages, every fifteen minutes. A market whose data fails a check sits the cycle out.

01
Collect the data

Airport observations every fifteen minutes; every hour, the newest runs of twelve weather models, global and high-resolution regional, plus the ECMWF and GEFS ensembles.

02
Forecast the temperature

Station-history models (gradient-boosted trees and an N-HiTS network) give a first view; a CatBoost classifier combines them with the weather models into a probability for every whole degree of the day's high or low. On the day itself, readings already observed rule brackets out.

03
Price against the market

Each city's daily high and low trades as a set of temperature brackets. The forecast becomes a probability per bracket, blended with the market price by a model refitted weekly on settled events: the market is often right, and the blend learns how far to trust each.

04
Estimate the real edge

A disagreement is not yet an edge. Each bet is scaled by how much of their claimed edge similar bets have actually earned, and is traded only if what remains beats the spread and the fee.

05
Size and place trades

Paper money, filled like real orders: each bet walks the order book and stops where the edge runs out. Stakes follow the edge and are sized on book value: up to 90% committed, at most 2% on one position, 6% on one event and 10% on one city's day.

06
Track and settle

A trade counts when it is sold or Polymarket settles it, at what it paid. The books run side by side on the same markets and differ only in their rules. Every fill is logged.

07
The website

Realised profit and loss per book, positions and trades, each market's forecast against its price, model calibration and the state of every data feed. Static pages, rebuilt after every cycle.

Sources

Four feeds, each with a job in the loop.

FeedRole
Airport observationsLive readings from ~60 stations; the running high and low on the day; the settlement truth
12 weather models + 2 ensembles
ECMWF IFS and AIFS, GFS, ICON, GEM, UKMO, CMA, HRRR, NBM, AROME, KNMI, JMA MSM; ECMWF and GEFS ensembles
Forecasts of each target day at every lead, and their recent errors at each site
Historical archive26 years of station readings and two years of model runs: the training set
Polymarket order booksLive bid, ask and depth for every temperature bracket

Coverage

Every combination below is scored on every cycle.

Cities~50, on 6 continents
TargetsDaily high and low
Lead timesToday to 3 days ahead
Brackets~2 700 live markets
CadenceEvery 15 minutes

The books

$500 each, 5 cents minimum edge. hold05_all (any day) and hold05_t1 (tomorrow on) are the controls: original pricing, held to settlement. hold05_fix and hold05_t0 (today only) use v2 pricing, which drops the cheap daily-low bets that have not paid. edge05 trades only where the edge has held at real prices, and recycles its cash by selling a position once the market pays a fair price for it.

Quality guards

The loop is allowed to do nothing. A city sits out until its last 24 hours of reports are complete; a late weather model holds out the cities it covers; a market missing any model input is not traded; a reading that jumps 4°C to a new high or low waits for the next report.

Waiting for a cycle

Stack

Small, boring and self-hosted.

ModelsCatBoost (station history, P(extreme already set), direct bracket probabilities), N-HiTS served through ONNX, a logistic market blend
PipelinePython on systemd timers: observations every 15 minutes, weather models hourly, model refits weekly
StorageDuckDB: observations, model runs, scores, and every book's trades, positions and equity
Front endStatic HTML with no backend: the page you are reading
Live paper books
Profit and loss, open positions and every trade the loop has taken

Rebuilt at the end of each cycle. No capital is at risk; fills are simulated against the real order book.

See performance