How we verify every number - checking 2.7 million data points against the publisher

16 Oct 2026 · 4 min read · data-quality, methodology, provenance

A data product is only as good as its worst number. In October 2026 we stopped asking "does this value look odd?" and started asking "what does the publisher print?", for every point we hold. This post explains how, what we found, and what we changed.

Flags are not answers

Detectors are cheap. Ours look for spikes, sign flips, values out of range, long flat runs and two series that should agree but don't. On our catalog they flagged about 24,000 points. If we had "fixed" them, we would have damaged the data. Almost all of them are real:

The reverse also holds. Two of the worst errors we found were invisible to the detectors: a yield curve read from the wrong column, about 0.3 percentage points off for months, and one fund's NAV history stored under another fund's id. A spike detector can't see either.

So we settle every question at the source.

How a check works

For each publisher we re-read the original, through the same parser that loaded it, and compare every point, not just the flagged ones.

Source What was re-read Result
SBP EasyData Each series' full history, re-pulled on a rolling cycle 1,204,571 points match so far; 64 differ and are written back with SBP's current figure
PBS CPI, CPI by group, LSM, every weekly SPI annexure PBS still hosts CPI, CPI groups and LSM match exactly; 9 missing SPI weeks added
MUFAP PKRV and PKISRV daily files (1,067 days); every fund's NAV history Curves now match MUFAP exactly; about 1.29 million NAVs match
PTA, SBP reviews Telecom indicators; Payment Systems and SME Finance reviews Match
AMIS A sample of 100,257 mandi prices Match

Each difference gets one of four verdicts:

  1. Confirmed as published. The publisher prints exactly this. We keep it.
  2. Our error. A parsing, scaling, date or mapping bug. We fix the parser, add a regression test with the real file, correct the data, and delete the fake "revision" the correction would otherwise leave in the revision history.
  3. Publisher revision. The source now shows a different figure. We reload it, and the old value is kept as a dated revision.
  4. Can't be checked. The source no longer hosts it. We report it rather than guess.

What we fixed

When the official number looks wrong

Sometimes the publisher's figure is almost certainly a slip, for example a value exactly 1,000 times its neighbours. We still don't overwrite it: the promise of an official-data API is that you get the official figure. Instead the point carries a note, on the series page and in the API as meta.notes:

As published by SBP (EasyData …) … about 210,000 times above the neighbouring values.

We say "suggests a unit slip" only when an exact power of 1,000 puts the value between its neighbours, and we skip series that are naturally lumpy. Funds get the same treatment: three Alfalah Pension Fund II sub-funds whose published NAV fell towards zero carry a note on their fund page and in /v1/funds/{id}.

Keeping it fixed

The checks don't stop. SBP series are re-pulled in full on a rolling cycle. Cheap consistency checks run every night and alert us: CPI growth recomputed from the index, reserves adding up, bid below offer, SPI cities against the national figure, and no NAVs dated before a fund existed. Every change lands in the changelog (RSS).

How data flows and how to trace any value to its source: sources & provenance.

Related

Also as Markdown: how-we-verify-every-number.md · All posts