$npx -y skills add agiprolabs/claude-trading-skills --skill kalshi-weather-marketsDaily temperature high/low bracket and threshold contracts on Kalshi — contract structure, forecast→P(YES) map, settlement rules, cross-venue divergences, and weather-specific pitfalls
| 1 | # Kalshi Weather Markets — Daily Temperature High/Low |
| 2 | |
| 3 | Kalshi lists daily high and low temperature options for ~20 US cities as binary contracts that settle YES ($1.00) or NO ($0.00). This skill covers the market structure, the forecast-to-probability map, exact settlement mechanics, and hard-won pitfalls. It builds on the exchange layer — for Kalshi API mechanics (host, auth, orders, order book, candlesticks) see the `kalshi-api` skill; for strategy, sizing, and backtesting see `prediction-market-strategy`. |
| 4 | |
| 5 | ## Contract Types |
| 6 | |
| 7 | ### Brackets — `B<center>` |
| 8 | |
| 9 | A bracket ticker `B<center>` is a **2°F-wide, both-ends-inclusive** window. |
| 10 | |
| 11 | - `B74.5` covers the **two integers {74, 75}°F**. |
| 12 | - YES iff the settled temperature is exactly 74 **or** 75. |
| 13 | - Brackets in one event are mutually exclusive and (with two open tail markets) collectively exhaustive. |
| 14 | - Their YES prices sum to the **overround** (fair = 1.0; > 1.0 = aggregate overpricing). |
| 15 | |
| 16 | ### Thresholds — `T<strike>` |
| 17 | |
| 18 | A threshold ticker `T<strike>` is a one-sided binary. |
| 19 | |
| 20 | - `greater` → YES iff `cli >= strike + 1` |
| 21 | - `less` → YES iff `cli <= strike - 1` |
| 22 | - **Critical:** `strike_type` (`"greater"` / `"less"`) is **not inferable from the ticker**. Read it from the API `strike_type` field every time. |
| 23 | |
| 24 | ### Ticker Format |
| 25 | |
| 26 | ``` |
| 27 | KXHIGH<CITY>-<YYMONDD>-B<center> # bracket high |
| 28 | KXLOW<CITY>-<YYMONDD>-T<strike> # threshold low |
| 29 | ``` |
| 30 | |
| 31 | **The date is encoded in the ticker, not derivable from `close_time`.** |
| 32 | `KXHIGHNY-26JUN21` settles 2026-06-21 LST. `close_time` is next-day UTC (~00:59 ET). Joining on `close_time` off-by-ones every label — use the ticker date. |
| 33 | |
| 34 | --- |
| 35 | |
| 36 | ## Forecast → P(YES) |
| 37 | |
| 38 | Given a forecast distribution `N(μ, σ)` for the day's extreme, apply the **half-integer continuity correction** (mandatory — settlement is on integers, not a continuous scale): |
| 39 | |
| 40 | ``` |
| 41 | # Bracket B<center>, covering integers {floor, cap} |
| 42 | P(YES) = Φ((cap + 0.5 − μ) / σ) − Φ((floor − 0.5 − μ) / σ) |
| 43 | |
| 44 | # Threshold "greater": |
| 45 | P(YES) = 1 − Φ((T + 0.5 − μ) / σ) |
| 46 | |
| 47 | # Threshold "less": |
| 48 | P(YES) = Φ((T − 0.5 − μ) / σ) |
| 49 | |
| 50 | Φ(x) = 0.5 · (1 + erf(x / √2)) # stdlib only, no scipy needed |
| 51 | ``` |
| 52 | |
| 53 | The `±0.5` shift is **not optional**. Dropping it biases every bracket. Treating 2°F brackets as 1°F half-open windows produced a **+1640% phantom backtest** in one project. |
| 54 | |
| 55 | See `scripts/weather_brackets.py` for runnable implementations of all four functions. |
| 56 | |
| 57 | --- |
| 58 | |
| 59 | ## Deriving (μ, σ) from Ensemble Quantiles |
| 60 | |
| 61 | ``` |
| 62 | sigma_raw = max((p90 − p10) / 2.56, 0.5) · sigma_scale · sigma_mult |
| 63 | mu = p50 # or nowcast-blended (see forecasting.md) |
| 64 | sigma = max(sigma_raw, 0.1) # hard floor against degeneracy |
| 65 | ``` |
| 66 | |
| 67 | The **2.56 divisor** is the 10th–90th percentile span of a standard normal (2 × 1.28σ). |
| 68 | |
| 69 | --- |
| 70 | |
| 71 | ## CLI-Space Bias Correction |
| 72 | |
| 73 | The settlement value (NWS CLI integer °F, LST day) is **not** the same as raw ASOS/METAR hourly max/min — CLI applies QC, backup-station fallback, and LST aggregation. Shift μ before computing P(YES): |
| 74 | |
| 75 | ``` |
| 76 | mu_cli = mu_metar + bias_city_season # bias = oracle_extreme − asos_extreme, fit per city + season |
| 77 | ``` |
| 78 | |
| 79 | Fit `bias_max` / `bias_min` as seasonal (circular) curves per city. Skipping this systematically misprices every bracket for cities with a structural CLI/METAR gap. |
| 80 | |
| 81 | --- |
| 82 | |
| 83 | ## Settlement Rules |
| 84 | |
| 85 | ### Kalshi |
| 86 | |
| 87 | - **Source:** NWS Climatological Report (CLI) — the official daily climate summary issued by each WFO. |
| 88 | - **Fallback:** IEM ASOS daily download matches CLI 100% and is available programmatically. |
| 89 | - **Window:** **LST (Local Standard Time), no DST adjustment.** The day runs midnight-to-midnight LST year-round. |
| 90 | - **Value:** Integer °F maximum (HIGH) or minimum (LOW) temperature for that LST day. |
| 91 | - **Bracket:** YES iff `cli ∈ {floor, cap}` (both ends inclusive). |
| 92 | - **Threshold greater:** YES iff `cli >= strike + 1`. |
| 93 | - **Threshold less:** YES iff `cli <= strike - 1`. |
| 94 | |
| 95 | ### Settlement-Source References |
| 96 | |
| 97 | > **Read each market's own rulebook before scoring or trading.** Settlement source, station, and day-window are per-market contract terms that can change. |
| 98 | |
| 99 | | Resource | URL | |
| 100 | |----------|-----| |
| 101 | | Kalshi market rules / Rulebook | <https://docs.kalshi.com> (per-market "Rulebook") | |
| 102 | | NWS Climatological Report (CLI) | <https://www.weather.gov/wrh/Climate> | |
| 103 | | IEM ASOS daily download | <https://mesonet.agron.iastate.edu/request/daily.phtml> | |
| 104 | | Polymarket resolution (WU) | <https://www.wunderground.com> | |
| 105 | | Polymarket disputes (UMA) | <https://docs.uma.xyz> | |
| 106 | |
| 107 | --- |
| 108 | |
| 109 | ## Cross-Venue Divergence |
| 110 | |
| 111 | The same metro on the same date can settle to **different values** across venues — both because of the **station** and the **DST window** in spring/fall. |
| 112 | |
| 113 | | Axis | Kalshi | Polymarket | |
| 114 | |------|--------|------------| |
| 115 | | Source | NWS CLI / IEM ASOS | Weather U |