File size: 5,264 Bytes
24b063d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | # 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.
|