Logo

Order Book Spread

What this preview is

Order Book Spread is a cooked quant coding problem on finance in Python, asked at Quant.

Difficulty
Cooked
Topic
Finance
Discipline
Quant trading
Language
Python

What this order-book coding problem tests

This is a straightforward Python coding problem that appears in finance and quant interviews. It tests whether you can quickly extract and compute basic market microstructure metrics from live order-book data—a foundational task in algo trading and market-making roles.

The problem is simple in principle but rewards clean, readable code and correct handling of floating-point rounding. Interviewers care about whether you identify the relevant data (best bid and best ask), compute the derived quantities accurately, and apply rounding consistently. The size field is a realistic red herring; filtering signal from noise is a practical skill.

  • Extracting extrema from unordered lists
  • Floating-point arithmetic and rounding conventions
  • Translating financial definitions into code

Unlock full access to getcracked

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