openthomas  by realworkagent

AI agent for prediction market forecasting

Created 8 months ago
361 stars

Top 77.5% on SourcePulse

GitHubView on GitHub
Project Summary

OpenThomas is an open-source Bayesian trading agent designed for prediction markets, specifically targeting the 2026 World Cup on Polymarket in its v0 scope. It addresses the need for transparent, auditable forecasting by treating beliefs as the primary artifact, stored on an immutable ledger, rather than focusing solely on profit and loss. This project is suited for researchers, developers, and power users interested in statistically-driven prediction market analysis and automated, yet transparent, forecasting.

How It Works

The agent employs a purely statistical Bayesian approach. It begins with Elo ratings to derive win expectancies, which are then translated into expected goals. These goals feed into an independent Poisson model to generate outcome probabilities. This model-derived forecast is blended with de-vigged market prices using a configurable weight (λ), allowing for a transparent combination of statistical priors and market sentiment. A core design principle is the belief ledger: every forecast is appended to forecasts.jsonl, creating an auditable trail of probabilities, priors, methods, and evidence, ensuring honest calibration.

Quick Start & Requirements

  • Installation: Clone the repository, then run npm install, npm run build, and optionally npm link to add openthomas to your PATH. Alternatively, run from source using npm run dev -- <command>.
  • Prerequisites: Node.js is required (implied by npm). No specific hardware, GPU, or CUDA versions are mentioned.
  • WorkPnP Integration: To participate in WorkPnP pools, set WORKPNP_URL and WORKPNP_API_KEY after registering with openthomas register --name <your_name> --wallet <your_wallet_address>.
  • Configuration: Key environment variables include MARKET_BLEND (default 0.3), BANKROLL_USD (default 100), KELLY_FRACTION (default 0.25), EDGE_THRESHOLD (default 0.03), and LEDGER_DIR (default ~/.openthomas).

Highlighted Details

  • Belief Ledger: All forecasts are stored as immutable JSON records in forecasts.jsonl, detailing probability, prior, method, and evidence chain for auditable backtesting and calibration.
  • Auditable Calibration: The openthomas calib command computes Brier scores and calibration curves directly from the ledger data, allowing for transparent performance evaluation.
  • WorkPnP Integration: The agent can poll open forecast work from WorkPnP, submit forecasts, and manage state, enabling users to earn wages and profit-linked bonuses.
  • Statistical Priors: Leverages Elo ratings and Poisson distributions for core forecasting, with a fallback mechanism if Elo data is unavailable.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord or Slack), or active sponsorships are provided in the README. The project appears to be maintained by the realworkagent entity.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license is permissive, generally allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Version 0 is explicitly designed with limitations: it does not utilize LLM calls, handle private keys, or execute real orders; all trade decisions are dry-run only, outputting trade intents. If a team lacks an Elo rating, the model component is skipped, and the forecast relies solely on market priors. The current scope is limited to specific prediction markets and event types.

Health Check
Last Commit

4 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.