The data layer decides whether every downstream result is trustworthy. This toolkit gives you an incremental, resumable historical pipeline with a coverage ledger that records exactly which ranges are already stored, so a restart fetches the gap and nothing else.
Why the ledger matters
A common failure pattern: the downloader has no incremental logic, so every startup re-fetches the full history, and a mismatch between the backfill window and the retention window trims sessions immediately after writing them. Startups take minutes, brokers throttle, and the data is silently short. A coverage ledger removes the whole class of problem — the first run after the fix typically makes one broker call per symbol.
Quality checks
Gap detection against the exchange calendar, duplicate bars, zero-volume rows, impossible ranges, and stale sequences where a price repeats beyond plausibility. Failures raise an alert rather than quietly entering your backtest.