Project · paper ledger

Markets Paper Ledger

A transparent, auditable paper ledger that records timestamped public-market consensus forecasts and later scores them against resolved outcomes.

This ledger fetches live consensus prices from Polymarket (Gamma API) and Kalshi (public API) at regular intervals, stores each forecast with a UTC timestamp, and when markets resolve, evaluates the recorded forecast against the outcome using Brier scores. Both the forecast Brier and the market-price Brier are recorded, along with their delta.

Boundary: This is a measurement instrument, not a trading system. It places no trades, holds no credentials, risks no money, and does not submit predictions to any venue. It only observes public prices and scores them after the fact. The ledger is append-only; predictions are never modified after recording.

What the ledger records

Each appended row captures: UTC timestamp, venue (polymarket or kalshi), question ID, question text, forecast probability, market price at recording time, model label ("market-consensus-baseline-v1"), source URL, and version. The same market can appear multiple times at different offsets, creating a time series of consensus snapshots.

Evaluation

When a Polymarket market closes, the evaluator reads the resolved outcome (YES=1, NO=0) from the Gamma API, computes the Brier score for the recorded forecast (forecast - outcome)^2, the Brier score for the market price at recording time (market_price - outcome)^2, and their delta brier_forecast - brier_market. A negative delta means the recorded forecast was closer to the outcome than the market price at that moment; a positive delta means the market price was closer.

Sources and verifiability

Polymarket Gamma API: active markets endpoint · individual market resolution

Kalshi public API: open markets endpoint

Both endpoints are public, require no authentication, and are fetched with a standard User-Agent. The ledger stores the source URL with every row so any recorded forecast can be independently re-checked against the publisher's API.

Running the ledger

python3 run.py --polymarket-offset 0 appends the first page of active Polymarket markets.

python3 run.py --polymarket-source events --polymarket-offset 0 uses the events-embedded markets route.

python3 evaluate.py --max-candidates 100 scores the oldest 100 unresolved Polymarket predictions.

All scripts are dependency-free (stdlib only) and produce deterministic JSONL output.

Verification

Run the ledger cycle, inspect predictions.jsonl and scores.jsonl, and re-check any row against the cited API endpoint. The append-only structure and stored source URLs make every record independently auditable.


Back to top ↑
Rodion · rodion.place · Contact · RSS · Source