← Backtesting

SDK

prediction-market-backtesting: Polymarket Replay and Portfolio Experiments

prediction-market-backtesting is a developer-led Python/Rust research project built around NautilusTrader. It replays supported Polymarket vendor data and provides notebook runners, joint portfolios, optimization and detailed charts.

Screenshots and interface

What is prediction-market-backtesting?

Choose PMXT or Telonex loading paths and preserve the selected schema, local layout and time range. Cached and materialized staging avoids repeated acquisition. Book deltas and trade ticks feed the event-driven simulation, where fees, latency and passive queue position remain explicit assumptions.

Runnable public historical replay is focused on Polymarket. Kalshi code is research and fee-model plumbing; Limitless and Opinion remain planned. A separate BTC live-data sandbox is not the historical runner, and sandbox or live operations can require different accounts.

Who it is for

  • Reusable Python replay research.
  • Comparing parameters across markets.
  • Inspecting execution assumptions and reports.

Features and coverage

  • NautilusTrader

    Use the underlying event-driven simulation framework.

  • Book replay

    Combine supported book deltas and trade ticks.

  • Vendor loaders

    Documented PMXT and Telonex paths.

  • Cached staging

    Reuse local and materialized data.

  • Joint portfolios

    Model several markets with shared capital assumptions.

  • Optimization

    Explore parameters with supported samplers.

  • Reports

    Equity, drawdown, fills, allocation, returns and scoring charts.

  • BTC sandbox

    Separate live-data sandbox experimentation.

Workflows with prediction-market-backtesting

Reproduce an experiment

Fix vendor, time range, runner and parameters; retain execution assumptions with results.

Compare parameters

Warm the cache, run the sampler and inspect unusual fills and drawdowns alongside return.

Test a portfolio

Use the joint runner to model capital allocation across markets together.

Pricing and total cost

The public repository has component-specific license notes. Data vendors, compute and separately enabled live operations have their own costs.

Getting started

Before you start: Limitless and Opinion are planned integrations.

  1. Follow current setup and runner-contract documentation.
  2. Select a supported Polymarket vendor.
  3. Acquire or locate a small data window.
  4. Run an example and inspect its report.
  5. Specify fees, latency and passive-order assumptions.
  6. Expand after single-market replay works.

Kalshi research and fee-model components are not a public runnable backtest path.

Useful links

What to check

  • Limitless and Opinion are planned integrations.
  • Vendor schema and file layout must match the loader.
  • Queue position and latency are simulation assumptions.
  • Sandbox and live runners differ from historical replay and can need different accounts.

A closer look

Ratings & reviews

Editorial rating
3.5/ 5
0 user reviews

Our take on prediction-market-backtesting

Vendor loaders and explicit assumptions offer substantial research tools. Data dependencies, component licenses and unfinished venue paths require developer-led evaluation.

Based on documented features, setup and access terms. How we rate

User reviews 0

The main score switches to user ratings after 5 published reviews.

Be the first to share your experience

A specific example helps the next person choose the right tool.

Related tools

Browse category

Frequently asked questions about prediction-market-backtesting

Can I immediately run a Kalshi backtest?

No. The README separates its research plumbing from a runnable public path.

Are notebooks supported?

Yes. Notebook runners are documented.

Can markets share capital?

Yes. Joint multi-market runners are supported.

Why can vendor results differ?

Coverage, event ordering, depth and loader assumptions vary.