We use optional cookies for analytics and affiliate attribution. Essential cookies and marketing measurement are always on. Read our privacy policy

We just launched our Black Friday sale. You can use code BF2026 to get 25% off all subscriptions, valid until Nov 30th. There is a limit of 100 redemptions.

Logo

Pre-market matching

What this preview is

Pre-market matching is a medium quant coding problem on language knowledge in Cpp / Python, asked at Quant.

Difficulty
Medium
Topic
Language Knowledge
Discipline
Quant development
Languages
Cpp / Python

Matching supply and demand at market open

This medium-difficulty coding problem asks you to compute the Indicative Opening Price for a stock before trading begins. It tests your ability to work with order-book data structures, apply multi-level ranking criteria, and handle tie-breaking logic—skills that quantitative trading firms value highly.

The problem requires you to find the price level that clears the most volume between buy and sell orders, then apply two successive tie-breakers: minimizing unexecuted orders at that price, and finally averaging any remaining candidates. The challenge lies in correctly interpreting what "executed" and "unexecuted" mean in the context of an order book, and in implementing an efficient algorithm that evaluates all candidate price levels.

  • Order-book representation and traversal
  • Volume matching logic (bids vs. asks)
  • Multi-criteria ranking and tie-breaking
  • Edge cases in floating-point averaging

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.