| # Source Two: PMData Archive |
|
|
| Prepared: 2026-07-03 UTC |
|
|
| ## Purpose |
|
|
| PMData is the preferred source for the new execution-quality backtesting path because it provides daily ZIP archives of Polymarket market data with sub-second L2 event rows and trade-related events. It is the right primary input for the planned YES/NO ladder adapter and fill simulator. |
|
|
| Current local root: |
|
|
| ```text |
| /home/Data_Collection_v2/data/pmdata |
| ``` |
|
|
| Current downloaded series: |
|
|
| ```text |
| data/pmdata/btc-5m/YYYY-MM-DD/ |
| ``` |
|
|
| Current downloaded ranges: |
|
|
| ```text |
| 2026-03-16 through 2026-03-30 |
| 2026-06-01 through 2026-06-30 |
| ``` |
|
|
| ## Data Types Downloaded |
|
|
| ### `poly_l2` |
| |
| This is the main backtesting source. |
| |
| Observed properties: |
| |
| - Daily ZIP archive by series/date. |
| - One parquet file per five-minute market when present. |
| - Event-level rows with book updates and trade-price events. |
| - Millisecond timestamps and local receive timestamps. |
| - Columns observed in the sample include market slug, event type, timestamps, book levels, best bid/ask, trade price/size/side, mirror fields, and winning outcome fields. |
| |
| Use `poly_l2` for: |
|
|
| - Sub-second book replay. |
| - YES/NO ladder reconstruction. |
| - Maker queue and adverse-selection simulation. |
| - Strict taker VWAP walks against displayed depth. |
| - Markout and latency tests. |
| - Strategy backtests where fill quality matters. |
|
|
| ### `polygon_trades` |
| |
| This is an audit/reconciliation source, not the primary L2 replay source. |
| |
| Use `polygon_trades` for: |
|
|
| - On-chain or wallet-level reconciliation. |
| - Activity sanity checks. |
| - Cross-checking market participation and realized trade activity. |
| - Investigating settlement and account behavior. |
|
|
| Do not use `polygon_trades` alone to simulate queue-aware maker fills. It does not replace the L2 book event stream. |
|
|
| ## Current Downloads |
|
|
| The March test block downloaded: |
|
|
| - Series: `btc-5m` |
| - Dates: `2026-03-16` through `2026-03-30` |
| - Data types: `poly_l2`, `polygon_trades` |
| - Local disk usage: about `6.3G` |
| - `poly_l2` rows: `479,568,786` |
| - `polygon_trades` rows: `60,718,994` |
| - All 30 expected ZIPs exist. |
| - All ZIP integrity checks pass. |
|
|
| Detailed reports: |
|
|
| ```text |
| reports/pmdata_btc_5m_20260316_20260330.md |
| reports/pmdata_btc_5m_20260316_20260330_audit.json |
| reports/pmdata_btc_5m_20260316_20260330_download_manifest.json |
| ``` |
|
|
| The June full-month block downloaded: |
|
|
| - Series: `btc-5m` |
| - Dates: `2026-06-01` through `2026-06-30` |
| - Data types: `poly_l2`, `polygon_trades` |
| - Local disk usage for `data/pmdata/btc-5m`: about `22G` including March and June |
| - ZIP bytes: `16,828,236,641` |
| - `poly_l2` rows: `1,534,252,982` |
| - `polygon_trades` rows: `70,121,307` |
| - All 60 expected ZIPs exist. |
| - All ZIP integrity checks pass. |
|
|
| Detailed reports: |
|
|
| ```text |
| reports/pmdata_btc_5m_20260601_20260630.md |
| reports/pmdata_btc_5m_20260601_20260630_audit.json |
| reports/pmdata_btc_5m_20260601_20260615_download_manifest.json |
| reports/pmdata_btc_5m_20260616_20260630_download_manifest.json |
| ``` |
|
|
| ## Known Data Quality Caveats |
|
|
| The March block has two short archives after retry: |
|
|
| - `2026-03-20 polygon_trades`: missing 3 five-minute files from `01:45-02:00 UTC`. |
| - `2026-03-23 poly_l2`: missing 98 five-minute files across `02:20-11:50 UTC` blocks. |
|
|
| The March 23 L2 gap matters for execution backtesting. Those windows must be excluded, patched from DOME, or explicitly labeled as fallback windows. Do not forward-fill through these gaps for fill-quality tests. |
|
|
| The June block has 12 short archives after retry: |
|
|
| - `poly_l2`: `2026-06-06`, `2026-06-17`, `2026-06-20` |
| - `polygon_trades`: `2026-06-03`, `2026-06-06`, `2026-06-10`, `2026-06-11`, `2026-06-12`, `2026-06-17`, `2026-06-19`, `2026-06-20`, `2026-06-22` |
|
|
| Use the generated missing-window catalog for exact five-minute gaps before running PMData-only execution tests. |
|
|
| The generated missing-window list is maintained in: |
|
|
| ```text |
| catalog/pmdata_missing_windows.csv |
| ``` |
|
|
| ## Strengths |
|
|
| PMData is strong for execution simulation: |
|
|
| - Sub-second event density. |
| - Daily archive structure. |
| - Parquet format suitable for fast selective reads. |
| - Includes book and last-trade-price events in one clock. |
| - Local receive timestamps allow latency assumptions to be tested. |
| - Better fit for queue-aware maker/taker simulation than 1 Hz reconstructed frames. |
|
|
| ## Limitations |
|
|
| PMData still needs an adapter before it becomes the backtester input: |
|
|
| - The strategy wants explicit YES and NO ladders; PMData needs normalization into that internal representation. |
| - Full-depth behavior must be validated across complete days, not only one sample window. |
| - Missing archive windows must be part of the run mask. |
| - It does not directly replace DOME labels, Chainlink/Binance joins, and older reconstructed-frame tooling. |
| - Redistribution should remain private/internal unless the data provider terms explicitly permit public release. |
|
|
| ## Strategy Role |
|
|
| Use PMData as the primary source for: |
|
|
| - `data/subsecond.py` |
| - fill simulation |
| - latency and markout analysis |
| - queue/hazard calibration |
| - production-grade backtest campaigns |
|
|
| Keep DOME as: |
|
|
| - baseline |
| - independent audit |
| - fallback for known gaps |
| - compatibility source for old loaders and labels |
|
|
| Final rule: PMData is the best execution source, but it is not a blind drop-in until the YES/NO ladder adapter and daily full-depth validation pass. |
|
|