Skip to content
Davit Mkhoyan
Work

04Running

Kalshi Weather Engine

A prediction-market engine for KXHIGH temperature contracts.

Year
2026
Stack
FastAPI · React

Why it's here

Quantitative depth. Dense and unglamorous on purpose: the page that shows a hard domain can be held end to end.

The Kalshi Weather Engine is a FastAPI service and React dashboard for KXHIGH daily-high-temperature prediction markets. It is deliberately dense and unglamorous: the job of this page is to show a technical reader that a hard quantitative domain can be held end to end.

01

Forecast modeling

Raw forecasts are not used as-is. The engine applies per-city bias calibration, correcting the systematic error each station's forecast carries, and models the residual error with a Student-t distribution so fat tails are priced rather than assumed away. EMOS-style calibration turns an ensemble into a usable probability distribution over the settlement value.

02

The traps in the data

Daily-high contracts settle against a specific observation window, and the NWS reports in local standard time year-round, so the local-standard-time vs. daylight-saving-time window is a live source of off-by-an-hour errors if it is not handled explicitly. The engine handles it explicitly. Settlement mechanics, which observation, at which station, over which window, are modeled directly rather than approximated.

03

Sizing and scoring

Position sizing uses the Kelly criterion against the modeled edge. Forecast quality is tracked with Brier score so calibration can be measured over time rather than eyeballed. Exchange fees are modeled into every expected-value calculation, because at prediction-market spreads the fee is often the difference between a positive and a negative bet.