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

Coding preview

Kelly Criterion Bet Sizing

What this preview is

About this preview

Kelly Criterion Bet Sizing is a cooked quant coding problem on finance in Python, asked at Quant.

Unlock full access to getcracked

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

Implementing the Kelly Criterion for position sizing

This medium-difficulty Python coding problem tests whether you can translate a fundamental risk-management formula into clean, correct code. Quant traders and prop shops use Kelly sizing to balance growth and ruin avoidance; getting the implementation right—including edge cases—is a basic professional skill.

The core task is straightforward arithmetic, but the problem rewards attention to two details: the handling of negative results (where the mathematical formula suggests not betting at all) and correct rounding. Both matter in live trading, where a sloppy implementation can either leave money on the table or risk more than intended.

  • Formula translation and parameter interpretation
  • Conditional logic for boundary cases
  • Floating-point rounding and precision