KatInterview

Design a Governed Catalog and Access Layer for Vendor Price Data

System DesignModel answer
MediumModel answerSystem Designsystem-designdata-catalogbitemporal

Last updated

Design a metadata-driven service that lets quants and PMs find, trust and query licensed vendor market data, with lineage, entitlements, freshness alerts and point-in-time reads.

Scenario

An investment firm buys market data from several external vendors. Each vendor delivers many daily feeds covering thousands of securities. Researchers and portfolio managers currently reach into raw vendor drops in inconsistent ways. You are asked to design a governed data access layer that sits between the vendor feeds and the people who consume them.

Requirements

  1. Discovery. Users can search for securities, financial fields (for example, prices or earnings estimates) and the vendor that supplies them.
  2. Provenance. For every value, the system can say which vendor supplied it, when it arrived, and what transformations touched it. Backtests must be exactly reproducible.
  3. Licensing and access control. Some datasets are restricted by vendor contract. Access must depend on the user's role and on the terms of the relevant license.
  4. Reliability monitoring. Users are warned when a feed is late, missing, or when a value deviates sharply from its recent moving average.

Scale and interfaces

  • Thousands of symbols and hundreds of feeds per day.
  • The layer acts as middleware. A Python-based quant and an Excel-based portfolio manager must both be able to use it, and SQL access should also be supported.

What to cover in your answer

  • The metadata schema: what do you record about a dataset?
  • A high-level architecture: services, storage and APIs.
  • The path of data from vendor delivery to the end user.
  • How you prevent look-ahead bias when someone requests data as it was known at a past date.
  • Briefly, how you would handle identifier changes, multiple vendors for the same field, and diagnosing a backtest whose results suddenly change.

Hints

Hint 1

Treat the catalog as the single front door: users never touch raw vendor storage, and every access path (Python, SQL, Excel) goes through one query service that applies the same rules.

Hint 2

One time axis is not enough for point-in-time correctness. Separate the period a fact describes from the moment your firm learned it, and make corrections append new rows instead of overwriting old ones.

Hint 3

Tag every stored value with the ingestion run that produced it. That single key links the value to the raw vendor file, lineage edges, quality results and license, which makes both audits and 'why did my backtest change?' investigations tractable.