{"slug": "show-hn-openthomas-weather-trader-agent-for-prediction-markets", "title": "Show HN: OpenThomas – weather trader agent for prediction markets", "summary": "OpenThomas, an autonomous AI agent for trading weather prediction markets on Kalshi and Polymarket, has been released as open-source software. The agent uses a seven-model forecast consensus and learns station-specific biases from hindcasts to gain an edge, with paper trading as the default mode to avoid real-money risk. The release follows a benchmark showing that six frontier AI models lost money trading prediction markets autonomously.", "body_md": "**An autonomous AI agent that trades weather markets on Kalshi and Polymarket. It knows the exact NWS station each market settles on, builds a probability for every strike from a seven-model forecast consensus, learns each station's systematic bias from months of leak-free hindcasts, lets an LLM adjust — within hard bounds — for what the statistics can't see, and sizes every position with fractional Kelly under risk limits no model can override. It learns from every settled degree.**\n\n```\npip install openthomas\nopenthomas init --bankroll 1000 --risk conservative\nopenthomas hindcast   # teach the baseline each station's bias — before the first trade\nopenthomas run        # paper trading on live market prices — the default\n```\n\nNo wallet, no exchange API keys needed to start: paper mode simulates fills against real Polymarket + Kalshi order books. You only connect real money after you've watched it trade.\n\n⚠️ Prediction market trading can lose all the money you allocate.OpenThomas ships with paper trading as the default, hard position limits, and a drawdown kill-switch — but no software makes trading safe. Roughly 70% of Polymarket addresses have lost money. This is not financial advice.\n\nThe [Prediction Arena benchmark](https://arxiv.org/abs/2604.07355) gave six frontier AI models $10,000 each and let them trade real prediction markets autonomously for 57 days. **Every single one lost money** — between −16% and −30.8%. Research volume didn't matter. Token spend didn't matter. What separated the least-bad from the worst:\n\n**Initial prediction accuracy**— being right, early** Sizing up when correct, down when uncertain****Exit discipline**— early exits systematically underperformed holding to settlement** Not trading at all**when there's no edge\n\nThe only profitable run on record (+10.9%) was selective (112 trades), asymmetric (avg win $63.89 vs avg loss $3.23), and low-drawdown (4.1%). That profile is a *harness* property, not a model property. OpenThomas is that harness — pointed at the one market category where the harness can actually be measured.\n\n**Settlement is daily, objective, and public.** Every temperature market resolves against the NWS Climatological Report for one named station. No ambiguous resolution rules, no months of waiting: dozens of ground-truth data points per day. It's the fastest learning loop in prediction markets.**The edge is calibration, not news.** Markets settle on a*specific station*(NYC = Central Park, Chicago = Midway). Global forecast models have systematic, learnable biases at each one — our first 90-day hindcast found Miami consensus running**1.8–2.1°F cold**(σ 1.7), Philadelphia**+2.3°F**, LAX** 1°F warm**. That's a moat you train from public data, per station, on your machine.** The market lags the physics.**Forecast models update every 6–12 hours; order books take time to digest each run. A baseline that reprices on fresh guidance — truncated by what today's thermometer has already locked in — is structurally ahead of casual flow.\n\nAnd the receipts, because build-in-public means the losing numbers too: our replay backtest (21 days, real Kalshi order books, fees included) started at **−$0.038/contract** for a naked model-vs-market strategy. Adding learned station bias and the market-prior blend: −$0.018. Fixing a timing leak (never let the replayed market know the morning low before the model does): **−$0.000 — breakeven** — for a baseline deliberately stripped of every live advantage (same-day model runs, intraday observations, LLM adjustment, calibration). Each layer of discipline was worth ~2¢ a contract. The live agent trades with all four advantages switched on; whether they clear the bar is what the public paper run is for.\n\n| Layer | What it does | Who's in control |\n|---|---|---|\nEdge scanner |\nFilters markets down to plausible mispricings; flags cross-platform arbitrage (Polymarket vs Kalshi price gaps) | deterministic code |\nWeather baseline |\nSeven independent NWP models → per-strike probability at the exact settlement station, with per-(station, lead) bias/σ learned from leak-free hindcasts and hard truncation by today's observed extreme | deterministic code |\nForecast engine |\nLLM ensemble (median of N independent estimates), grounded in resolution rules and base rates — and clamped to baseline ± 0.15 on weather markets: the model adjusts the statistics, it never replaces them | your choice of model |\nCalibration layer |\nPlatt-scales raw forecasts against your own settled-trade history; blends with the market price (\n|\ndeterministic code |\nRisk engine |\nFractional Kelly sizing, per-market / per-event / per-category caps, fee-aware EV threshold, longshot-zone filter, drawdown kill-switch | deterministic code — the model proposes, the risk engine disposes |\nMemory |\nEvery forecast and fill journaled to SQLite; post-settlement reflection distills lessons that feed back into future prompts | agent, human-auditable |\n\n``` bash\n$ openthomas run --once\n──────────── cycle · account $99,962.22 · cash $99,711.90 ────────────\nmarkets 414 → candidates 64 → forecasts 8 → trades 1\n  TRADE BUY 610 YES @ 0.41 [kalshi] Will the high temp in NYC be >83° on Jul 8?\n  skip: Will the high temp in Philadelphia be 87-88°?: edge +0.049 below threshold 0.080\n  skip: Will the high temp in Chicago be 88-89°?: confidence 0.45 too low\nbash\n$ openthomas hindcast --days 90\n✓ KMIA: +900 guidance, +178 settlements\n✓ KNYC: +900 guidance, +178 settlements\n...\nKMIA  high L1  bias +1.8 σ 1.7   ← Miami models run 2°F cold; the baseline prices it in\nKPHL  high L1  bias +2.3 σ 2.1\n```\n\n`openthomas report`\n\nscores every settled forecast against the market price it traded at, bucketed by station × lead — Brier skill > 0 in a bucket is the only license to size up there. `openthomas replay`\n\nbacktests the decision rule against real historical order books, with bias learned strictly out-of-window — no peeking. (The example trade above is illustrative; the hindcast and replay numbers in this README are real runs from 2026-07-08.)\n\n`openthomas vital`\n\nrenders a shareable performance card (equity curve, win rate, Brier score, max drawdown) — post your track record, good or bad.\n\n`openthomas publish`\n\nrenders `feed.json`\n\n: open positions, every live thesis with the market price it was formed against and the observation that would falsify it, the evolution loop's generation lineage, and token spend by node. It is what [openthomas.com](https://openthomas.com) is built from — the reference agent, trading in public. See [docs/SITE.md](/PredictionMarketTrader/openthomas/blob/main/docs/SITE.md) to host your own.\n\n```\npip install openthomas\n\n# 1. Configure: bankroll, risk appetite, goal, forecasting model\nopenthomas init --bankroll 1000 --risk conservative \\\n  --goal \"Grow steadily; protecting capital beats chasing returns\"\nexport ANTHROPIC_API_KEY=sk-ant-...   # or any OpenAI-compatible endpoint\n\n# 2. Teach the baseline: 90 days of leak-free per-station history in one command\nopenthomas hindcast\n\n# 3. See what it sees, then backtest the decision rule on real order books\nopenthomas scan\nopenthomas replay --days 21\n\n# 4. Let it trade (paper mode: real prices, simulated fills)\nopenthomas run\n\n# 5. Check in\nopenthomas report\nopenthomas vital\n\n# 6. Trade in public: render the feed openthomas.com is built from\nopenthomas publish --out site\n```\n\nOpenThomas is weather-first, not weather-only: set `focus: all`\n\nin `~/.openthomas/config.yaml`\n\nto scan every market like a generalist.\n\n**Local / self-hosted models** (no API bill, full privacy):\n\n```\nopenthomas init --provider openai --base-url http://localhost:11434/v1 --model gemma3:12b\n```\n\nAny OpenAI-compatible server works — Ollama, vLLM, llama.cpp. If you have GPUs, [docs/TRAINING.md](/PredictionMarketTrader/openthomas/blob/main/docs/TRAINING.md) covers fine-tuning a local model on your own trade journal (calibration LoRA) so the agent's forecaster improves on *your* markets.\n\n**Subscriptions instead of API credits**: set `provider: claude-cli`\n\n(Claude Code) or `provider: codex-cli`\n\n(OpenAI Codex) in `config.yaml`\n\nand OpenThomas bills your existing Claude/ChatGPT subscription. Every LLM node is configured independently — run the high-token reflection pass on a local server and route only the hardest forecasts to a frontier model:\n\n```\nforecaster: { provider: openai, model: glm-5.2, base_url: \"http://localhost:8000/v1\" }\nreflector:  { provider: claude-cli, model: sonnet }\n```\n\nYour agent brings the market view; OpenThomas enforces the discipline:\n\n```\npip install 'openthomas[mcp]'\nclaude mcp add openthomas -- openthomas-mcp\n```\n\nNow Claude (or OpenClaw, Hermes, any MCP client) can scan markets, pull news,\nand `propose_trade`\n\n— every proposal is blended with the market price, sized\nwith fractional Kelly, and checked against hard exposure caps before a paper\nfill. Rejections name the binding constraint. See [docs/MCP.md](/PredictionMarketTrader/openthomas/blob/main/docs/MCP.md).\n\nYou hand OpenThomas a mandate, not a suggestion — these are enforced in deterministic code, outside the LLM:\n\n| conservative | moderate | aggressive | |\n|---|---|---|---|\n| Kelly fraction | 0.15× | 0.25× | 0.33× |\n| Max per market | 5% | 8% | 12% |\n| Min edge after fees | 8¢ | 6¢ | 5¢ |\n| Drawdown kill-switch | 15% | 20% | 30% |\n| Max trades/cycle | 3 | 5 | 8 |\n\nPlus, in every profile: per-event correlation caps (correlated settlements caused the largest single-session losses in Prediction Arena), longshot-zone filter (contracts under 10¢ lose >60% of stake on average — [Whelan et al. 2026](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5502658)), solvency checks including fees, and mark-to-market at bid prices (liquidation value, not hope).\n\n**Journal**— every forecast (with the market price it disagreed with), fill, and settlement in SQLite (`~/.openthomas/journal.db`\n\n). Your data, on your machine.**Verification store**— every cycle records the model consensus per station and lead; official settlements are backfilled from the NWS report. Station bias and spread are re-estimated continuously;`openthomas hindcast`\n\nseeds it with 90 days on day one.**Calibration**— once ≥30 markets settle, OpenThomas fits Platt scaling per category to correct your model's systematic bias.** Playbook**— after settlements, a reflection pass proposes add/revise/deprecate*operations*on structured rules, each carrying scope, evidence, and a post-adoption track record. Code enforces the caps (8 active rules max); rules that go negative get flagged and retired with the reason kept on file. No wholesale rewrites, no silently vanishing lessons.**Skills**— strategies and domain playbooks are markdown files (`skills/`\n\n), the same pattern as OpenClaw / Hermes / Claude skills. Add your own, or let the agent draft one from its post-mortems for you to approve.\n\nEverything the agent learns — journal, verification history, calibration, playbook, any LoRA you train — lives in `~/.openthomas/`\n\n, not in this repo. The code is open source; **your trained strategy and its track record are yours.**\n\n**Can an AI bot actually make money on Polymarket or Kalshi?**\nUnproven for pure LLM forecasting — every frontier model tested in live benchmarks lost money. Our own replay backtest says the same thing in miniature: a naked model-vs-market strategy lost $0.038/contract; only after station-bias learning, market-prior blending, and timing hygiene did it reach breakeven — *before* the live-only advantages (fresh model runs, intraday observations, calibration) are counted. The honest claim: the edges are structural and small, discipline is what keeps them, and weather is where they're most measurable. Paper-trade first. Expect losses.\n\n**Which markets does it trade by default?**\nDaily station-temperature markets on Kalshi (NYC, LA, Miami, Chicago, Philadelphia, Denver, Austin, Dallas, Atlanta, San Antonio — highs and lows) plus weather-tagged Polymarket markets. `focus: all`\n\nrestores generalist scanning.\n\n**Do I need API keys to try it?**\nNo exchange keys. Paper mode uses public market data from both venues. You need an LLM (API key or a local model via Ollama) for forecasting.\n\n**Which venues?**\nPolymarket (global, crypto-settled in pUSD) and Kalshi (US, CFTC-regulated). Kalshi's demo exchange is supported (`KALSHI_DEMO=1`\n\n). Live Polymarket trading from the US is geoblocked to close-only on the offshore CLOB; Polymarket US is a separate venue (integration planned).\n\n**Can it withdraw or move my funds?**\nNo. The agent only trades within the bankroll you allocate. It has no withdrawal, transfer, or deposit capability — and live mode requires two independent explicit switches.\n\n**What models work best?**\nOn weather markets the statistical baseline does the heavy lifting, so the LLM matters less than you'd think — its job is bounded adjustment for discontinuities (blown fronts, stale consensus), which mid-size local reasoning models handle. Any Anthropic / OpenAI-compatible endpoint or a Claude/ChatGPT subscription CLI works; see [docs/TRAINING.md](/PredictionMarketTrader/openthomas/blob/main/docs/TRAINING.md) for fine-tuning on your own journal.\n\n[Architecture & design rationale](/PredictionMarketTrader/openthomas/blob/main/docs/DESIGN.md)[The edge playbook — documented inefficiencies with sources](/PredictionMarketTrader/openthomas/blob/main/docs/EDGE.md)[Trading against agents — the adversarial playbook](/PredictionMarketTrader/openthomas/blob/main/docs/ADVERSARIAL.md)[Live trading setup (Kalshi, Polymarket)](/PredictionMarketTrader/openthomas/blob/main/docs/LIVE_TRADING.md)[Training a local forecaster on your journal](/PredictionMarketTrader/openthomas/blob/main/docs/TRAINING.md)\n\n- Paper trading loop on live Polymarket + Kalshi data\n- LLM ensemble forecasting, calibration, market-prior blending\n- Deterministic risk engine (Kelly, caps, kill-switch)\n- Weather focus: settlement-station registry, NWS report parsing, 7-model baseline\n- Leak-free hindcast — 90 days of per-station bias/σ in one command\n- Replay backtests against real historical order books\n- Structured playbook (curated rule operations with track records)\n- Bucketed Brier skill reporting (station × lead, model vs market)\n- Model backends: Anthropic / OpenAI-compatible / Claude & ChatGPT subscription CLIs\n- Cross-platform arbitrage scanner\n- News retrieval pipeline for forecasts (GDELT + Google News, keyless)\n- MCP server — Claude/any agent brings the view, OpenThomas enforces risk (\n[docs](/PredictionMarketTrader/openthomas/blob/main/docs/MCP.md)) - AI-NWP ensemble inference on local GPUs (GraphCast / Aurora / AIFS open weights)\n- Station post-processing models trained on hindcast data\n- Live Kalshi execution hardening (order amend/cancel, WebSocket fills)\n- Polymarket live execution via official SDK (pUSD)\n- Market-making on temperature ladders (maker rebates, no taker fees)\n- Journal → LoRA fine-tuning recipes for local models\n- Web dashboard, trade-in-public feed —\n[openthomas.com](https://openthomas.com),`openthomas publish`\n\n- Public community leaderboard of (opt-in) vitals\n\nThe interesting problems are open: retrieval quality, resolution-rule matching for cross-venue arbitrage, calibration under small samples, market-making without adverse selection. PRs welcome — see [CONTRIBUTING.md](/PredictionMarketTrader/openthomas/blob/main/CONTRIBUTING.md). If you run OpenThomas, share your `vital`\n\ncard in [Discussions](https://github.com/PredictionMarketTrader/openthomas/discussions) — including the losses; honest track records are how this gets better.\n\nMIT. Trade at your own risk; comply with your local laws and each venue's terms.", "url": "https://wpnews.pro/news/show-hn-openthomas-weather-trader-agent-for-prediction-markets", "canonical_source": "https://github.com/PredictionMarketTrader/openthomas", "published_at": "2026-07-11 22:13:23+00:00", "updated_at": "2026-07-11 22:35:15.775871+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-tools"], "entities": ["OpenThomas", "Kalshi", "Polymarket", "NWS"], "alternates": {"html": "https://wpnews.pro/news/show-hn-openthomas-weather-trader-agent-for-prediction-markets", "markdown": "https://wpnews.pro/news/show-hn-openthomas-weather-trader-agent-for-prediction-markets.md", "text": "https://wpnews.pro/news/show-hn-openthomas-weather-trader-agent-for-prediction-markets.txt", "jsonld": "https://wpnews.pro/news/show-hn-openthomas-weather-trader-agent-for-prediction-markets.jsonld"}}