Reconcile Front Office and Back Office Trade Bookings With Break Reasons
Last updated: November 29, 2026
Quick Overview
Given trade records from the front-office booking system and from the back-office settlement system, write Python that matches them by trade id and classifies every unmatched or mismatched trade with a break reason (missing on one side, quantity, price outside tolerance, or instrument mismatch).
Deutsche Bank
November 29, 20260
0
0 solved
Given trade records from the front-office booking system and from the back-office settlement system, write Python that matches them by trade id and classifies every unmatched or mismatched trade with a break reason (missing on one side, quantity, price outside tolerance, or instrument mismatch).
Trade reconciliation between front-office and operations systems is a daily control at Deutsche Bank and feeds regulatory data quality requirements. A take-home or practical round uses this to see clean, testable data code, sensible tolerance handling and output that an operations analyst could act on.
What the Interviewer Expects
- Index one side by key for O(1) lookups
- Report breaks in both directions, not only front to back
- Use a relative price tolerance and exact quantity matching
- List every mismatching field, not only the first
- Write output a human can triage, with a reason code
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- The back office sometimes splits one trade into two allocations: how do you match those?
- How would you match trades that have no shared id, using economic fields?
- How would you run this daily on 50 million trades?
- How would you track break ageing over days?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
Each record has trade_id, isin, qty (integer) and price (float). Assume trade ids are unique within a system and shared between systems. Ask: is the price tolerance absolute or relative? (assu...
Approach
Build a dict of back-office trades keyed by trade id. Walk front-office trades: missing key gives MISSING_IN_BACK; otherwise compare fields and collect all reasons. Then walk the back office for ids n...