Detect Stale Bond Prices From Vendor Price Feeds

Last updated: November 29, 2026

Quick Overview

Given a table of daily vendor prices per security, find every security and vendor whose price has been unchanged for at least five consecutive pricing days up to and including its most recent price.

BlackRock
Data Manipulation (SQL/Python)
Data Engineer
BlackRock
November 29, 2026
Data Engineer
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Given a table of daily vendor prices per security, find every security and vendor whose price has been unchanged for at least five consecutive pricing days up to and including its most recent price.

Stale pricing is a classic data quality problem for a fixed-income-heavy platform like Aladdin, where illiquid bonds can carry the same evaluated price for days. A Data Operations Engineering screen would use it to test gaps-and-islands SQL and the judgment to separate a genuinely quiet bond from a broken feed.

What the Interviewer Expects
  • Uses the gaps-and-islands pattern with two ROW_NUMBER sequences
  • Restricts to the run that ends on the latest available date
  • Partitions by both security and vendor
  • Counts pricing days rather than calendar days
  • Discusses why repeated prices after a change form a separate run
Key Topics to Cover
window functions
gaps and islands
data quality
pricing feeds
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you compare vendors to choose a primary price when one is stale?
  • How would you handle holidays that differ by market?
  • How would you turn this into an alert with a threshold that depends on asset class liquidity?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

Table vendor_prices(security_id, vendor, price_date, price), one row per security, vendor and pricing day (no weekend rows). I would ask whether missing days exist; I will treat 'consecutive' as con...

Approach

Gaps and islands: number rows per (security, vendor) by date, and separately per (security, vendor, price). Within an unbroken run of the same price both counters rise together, so their difference is...


Submit Your Answer
Markdown supported

Related Questions