The XTX Markets Onsite Coding interview is stage 4 of 6 in the XTX Markets interview process, after the Take-Home / Technical Data Round. Format: 60 min · live coding (Python / C++). Graded on correctness, edge cases, time/space complexity and, distinctively for XTX, numerical stability.
Preparing for this round? Open the XTX Markets Onsite Coding in the interview funnel. A free account saves your progress.
Also see the full XTX Markets interview process and the XTX Markets interview questions.
What the Onsite Coding tests
Research-adjacent roles get numerical or data tasks (an estimator, a stable softmax / log-sum-exp, a clustering step, a streaming statistic) testing whether code survives floating point and large inputs. Confirm constraints, state complexity, narrate edge cases: clean, correct, explainable code beats a terse 'optimal' solution you cannot defend.
How to prepare for the Onsite Coding
- Numerical stability counts. Log-sum-exp, avoiding catastrophic cancellation, divide-by-n-vs-n−1 — XTX-flavored coding rewards getting the math right, not just the algorithm.
- State complexity up front and confirm constraints before you code. Then handle edge cases out loud.
- Clean over clever. Readable, correct, well-named code beats a terse optimal solution you can't explain.
Further reading: How quant superdays work · C++ and low-latency interview questions · Behavioral questions at trading firms · Market-making game interview guide.
Illustrative worked example
An original example of the most common question type in this round, written by QuantVault. It shows the reasoning the round rewards; it is not a question XTX Markets asked.
Illustrative example (not an actual interview question)
One-pass stable log-sum-exp
Write a function that consumes a stream of floats $x_1, \dots, x_n$ once and returns $\log \sum_i e^{x_i}$ without overflow or underflow. Sample: inputs 1000, 1001, 999 should give about $1001.4076$, while the naive formula overflows to infinity.
Approach
- Use $\log \sum_i e^{x_i} = m + \log \sum_i e^{x_i - m}$ for any shift $m$; choosing $m$ as the maximum keeps every term at most 1.
- In one pass keep the running maximum $m$ and $s = \sum e^{x_i - m}$ over the values seen so far.
- For a new $x$: if $x \le m$ add $e^{x - m}$ to $s$; otherwise rescale $s \leftarrow s\, e^{m - x} + 1$ and set $m \leftarrow x$.
- Return $m + \log s$; on the sample $m = 1001$ and $s = 1 + e^{-1} + e^{-2} \approx 1.5032$, giving $1001.4076$.
- Linear time and constant memory; handle the empty stream and a stream of $-\infty$ values explicitly, and use log1p when $s$ is close to 1 if precision matters.
Complexity: About $1001.4076$; $O(n)$ time, $O(1)$ space
What the interviewer is looking for: Knowing why the naive formula fails in floating point, a correct rescaling step in the streaming update, and attention to edge cases such as empty input and infinities.
Practice the real questions: round practice · XTX Markets question set
Prepare with QuantVault
The same round at similar firms
Compare with similar firms
Frequently asked questions
What is the XTX Markets Onsite Coding interview?
It is stage 4 of 6 in the XTX Markets interview process, after the Take-Home / Technical Data Round. Format: 60 min · live coding (Python / C++). Graded on correctness, edge cases, time/space complexity and, distinctively for XTX, numerical stability. Research-adjacent roles get numerical or data tasks (an estimator, a stable softmax / log-sum-exp, a clustering step, a streaming statistic) testing whether code survives floating point and large inputs.
How long is the XTX Markets Onsite Coding interview?
Candidates report: 60 min · live coding (Python / C++).
How should I prepare for the XTX Markets Onsite Coding interview?
Numerical stability counts. Log-sum-exp, avoiding catastrophic cancellation, divide-by-n-vs-n−1 — XTX-flavored coding rewards getting the math right, not just the algorithm. State complexity up front and confirm constraints before you code. Then handle edge cases out loud.
What comes after the Onsite Coding?
The Onsite Machine Learning / Research Deep-Dive (stage 5 of 6). Format: 60 min · whiteboard / discussion · QR & ML roles.
Practice the XTX Markets Onsite Coding round
Open the round in the XTX Markets funnel: the round notes, prep, and every other stage of the process.