500+ quant interview questions for Jane Street, Citadel, Two Sigma, DE Shaw, and other top quantitative finance firms.
Statistical analysis and quantitative modeling problems
Trading MCQs, probability brainteasers, and market scenarios
Practice quant interview questions on MyntBit - the all-in-one quant learning platform. Free questions available for C++ coding, Python problems, probability brainteasers, and trading MCQs.
Difficulty: Medium
Category: low_latency
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: branchless, arithmetic-shift, abs, low_latency, bit-manipulation, pnl
In high-frequency trading, P&L calculations must be extremely fast, as they are performed billions of times per session. Conditional branches in tight loops, such as those in a naive abs(pnl) implementation, can cause costly CPU branch mispredictions. This problem explores a branchless technique using bitwise arithmetic to compute the absolute value of an integer, a critical optimization in low-latency systems. Task Implement the function branchless_abs(int64_t x) to compute the absolute value
Practice this medium developer interview question on Myntbit - the all-in-one quant learning platform with 1000+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.