Prepping for the 2027 recruiting cycle? Use code 2027RC for 10% off, valid until July 31st! Oh, and check out our members-only recruitment services.

Logo

Many Expected Returns?

What this preview is

Many Expected Returns? is a cooked quant coding problem on language knowledge in Cpp / Python.

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

Calculating expected profit across multiple trading instruments

This coding problem tests your ability to translate a market-making scenario into a clean expected-value calculation. You are given fill probabilities for bid and ask orders on multiple instruments, along with the profit per fill, and must compute the total expected profit across the trading session.

The core challenge is understanding how to combine probabilities and payoffs correctly. Each instrument's bid and ask are filled independently; you need to determine which fill outcomes contribute to profit and weight them by their joint probability. The solution requires careful handling of floating-point arithmetic to meet a tight tolerance threshold (within 10-6). Interviewers at market-making firms use this type of problem to verify that you can move fluently between financial intuition and precise code, and that you respect numerical accuracy in production systems.

  • Independence of fill events across and within instruments
  • Expected value as a sum of weighted outcomes
  • Floating-point precision and tolerance in numerical comparisons

Unlock full access to getcracked

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