Polymarket BTC 5-minute backtesting: data, timing and bias
Updated 2026-11-09
A Polymarket BTC five-minute backtest needs the correct settlement stream, exact round boundaries, and a record of when each input became available. Chainlink BTC/USD and TWAP60 history can support signals and outcome labels. Estimating trading returns also requires prediction-market prices, execution assumptions and costs: a correct Up/Down label alone does not establish a profitable trade.
What are you trying to backtest?
Choose the question before choosing the data. These are different experiments, and their results should be reported separately.
| Question | Necessary inputs | What the result tells you |
|---|---|---|
| Can I reproduce a round’s direction? | Published TWAP60 at the exact opening and closing seconds, plus the applicable market rules | An archive-derived outcome label |
| Could a signal predict that direction? | Labels, historical features and their availability times | Predictive performance on the evaluated sample |
| Could the signal make money? | The above, plus market quotes, position sizes, fees and a defensible fill model | A return estimate conditional on execution assumptions |
Poly Tick Tape’s archive contains recorded Chainlink prices and TWAP60, not Polymarket YES/NO token prices or order-book depth. An 80,000-dollar BTC reference price cannot tell you whether an Up share was available at 0.45 or 0.70 dollars when a signal fired. Settlement stream vs order-book data explains which data each question needs.
Choose the settlement data for the historical rule
Our settlement guide documents the 60-second TWAP rule introduced on 2026-08-14 and the preceding changes, with market examples and primary references. Under that documented rule, a round resolves Up when closing TWAP60 is greater than or equal to opening TWAP60, and Down otherwise. Recheck the rules of the markets in your test, particularly when extending the date range.
Use the twap60 stream for those labels. Use the separate price stream when a feature needs Chainlink’s plain BTC/USD value. We record Chainlink’s published TWAP60 directly; averaging the archived price rows does not reproduce it exactly. The TWAP60 analysis explains the distinction and provides a reproduction script and historical statistics with a stated sample range.
The archive starts on 2026-08-14. Its start date is not a claim that every later second is present. Inspect the public catalog for published days and the authenticated listing for each file’s row count, coverage and checksum. The Python download guide walks through obtaining and checking the files.
Construct labels at exact UTC boundaries
A five-minute round lasts 300 seconds. Use the market’s start timestamp and UTC, rather than parsing a title in US Eastern time. In a complete 24-hour schedule there are 288 candidate rounds: 24 × 60 ÷ 5. That is a schedule count, not a promise that 288 usable labels exist in a file.
For each candidate start, read twap60 at start and start + 300. If either exact row is missing, mark the label unavailable. Do not fill a settlement boundary with the nearest quote, an exchange price or an interpolated average. Such substitutions change the question being measured.
The 23:55 UTC round ends at 00:00 UTC on the next day. Download that following day’s file even if your report groups rounds by their starting day. Keep the full-precision p strings as Decimal; the floating-point v column is convenient for plotting but should not determine a tie.
This shared example constructs outcome labels only. It does not simulate entries, fills or profits:
import gzip
import json
from datetime import datetime, timezone
from decimal import Decimal
def twap60(path):
with gzip.open(path, "rt") as f:
return {row["ts"]: Decimal(row["p"]) for row in map(json.loads, f)}
# The last round of a day ends at 00:00 the next day, so load both files.
twap = {**twap60("data/btc-twap60-2026-08-14.jsonl.gz"), **twap60("data/btc-twap60-2026-08-15.jsonl.gz")}
day = int(datetime(2026, 8, 14, tzinfo=timezone.utc).timestamp())
for start in range(day, day + 86_400, 300):
open_, close = twap.get(start), twap.get(start + 300)
if open_ is None or close is None:
print(start, "no TWAP60 row at a boundary second")
continue
print(start, "Up" if close >= open_ else "Down", open_, close) Check one example before running the entire archive
The free sample contains two consecutive rounds on 2026-09-20. Under the documented rule, comparing the stored p values gives:
| Round, UTC | Opening TWAP60 | Closing TWAP60 | Archive-derived label |
|---|---|---|---|
| 04:35–04:40 | 80413.342489811802390528 | 80442.402395503634415616 | Up |
| 04:40–04:45 | 80442.402395503634415616 | 80365.696673592601739264 | Down |
The first close is the second open. This is useful for checking parsing and shared boundaries; two outcomes cannot establish a strategy’s accuracy. The settlement guide links the corresponding market records for comparison.
For a longer run, report candidate rounds, usable labels and exclusions separately. If you compare two streams, require the needed boundary rows in both and report the intersection. A high daily coverage percentage does not prove that a particular boundary is present, and good boundaries do not prove that the feature window before them is complete.
Prevent look-ahead bias with receipt timestamps
A quote’s timestamp is not the time your strategy knew it. The archive retains both the feed timestamp and the collector’s receipt timestamp:
| Field | What it measures | Backtesting use |
|---|---|---|
ts / feed_ts_ms |
The quote’s event second / timestamp | Align the observation to a market interval |
recv_ms |
When our collector received the quote | Model when that collector could first use it |
lag |
recv_ms - feed_ts_ms, in milliseconds |
Inspect receipt delays and their distribution |
If a simulated decision occurs at time T, exclude feature rows with recv_ms later than T. Also allow for any processing delay your model assumes. Sorting observations only by ts can let a late quote influence a decision made before it arrived.
Our collector’s receipt time is not the time your own live system would have received a message. It also does not measure order placement or exchange execution latency. State that limitation instead of treating the recorded lag as a universal trading delay.
Future closing values are valid when building labels after a round ends. They must remain separate from the feature set used to decide during the round. A daily archive published the next morning supports retrospective research; the archive API is not a live signal feed.
Separate prediction accuracy from trading returns
Even a correctly predicted round may lose money under a trading strategy. A direction prediction does not specify the share price paid, whether an order filled, position size or trading costs.
If you do not have historical market quotes or an execution model, report direction metrics and label coverage. If you do estimate returns, disclose at least the entry and exit rules, quote source, spread and slippage assumptions, fill treatment and fee calculation. Polymarket’s fee documentation describes market-dependent charges; do not apply a single assumed rate to every period without checking it.
Do not turn missing quotes into free fills, assume unlimited liquidity or treat the BTC/USD oracle value as the price of an outcome share. Describe which inputs were observed and which were modeled.
Evaluate on time periods you did not tune on
Split by time before selecting thresholds. Randomly shuffling adjacent observations can put heavily overlapping TWAP windows in both training and evaluation sets. Decide how to handle features and label horizons that cross a split boundary, and keep those decisions fixed.
Keep a research record containing:
- The market rule, source and date range used for the labels.
- File names and checksums, requested days, missing days and excluded rounds.
- The feature window, receipt-time filter and decision schedule.
- Training and evaluation periods, parameters and outcome metrics.
- Any quote, fill and cost assumptions used to estimate returns.
This makes another researcher able to inspect your experiment. It does not make a historical edge persist in a future market. Contact the data team if a file or boundary needs investigation; use the API docs for downloads and pricing for archive access.
Sources and scope
- Poly Tick Tape: collection method, file format and API, historical settlement rules and sample markets, and the public ten-minute sample used above.
- Chainlink: BTC/USD stream and BTC/USD TWAP 60s stream.
- Polymarket: real-time data and TWAP documentation and fees. The TWAP documentation describes the data stream; market rules determine settlement.
Written on 2026-11-09. The numerical example is the recorded 2026-09-20 sample, not a new strategy test or a claim about current market outcomes. No win rate or return estimate is claimed here.
More guides
- How Polymarket's 5-minute Bitcoin markets settle
- Chainlink TWAP60: the BTC price Polymarket settles on
- Download Chainlink BTC/USD price and TWAP60 history with Python
- Settlement stream vs order-book data for Polymarket BTC 5-minute backtests
- Polymarket BTC 5-minute data coverage: 288 rounds a day?
- Polymarket 5-minute settlement: what if you're one second off?
- When Chainlink BTC TWAP60 quotes actually reached our collector
- Can a 60-second BTC rolling average replace Chainlink TWAP60?
Not affiliated with Polymarket or Chainlink. Not investment advice.