HRT Interview Prep: Hudson River Trading Quantitative Roles
How to prepare for Hudson River Trading's notoriously rigorous interview process — covering the math, probability, algorithms, and the HRT mindset they're screening for.
HRT Interview Prep: Hudson River Trading Quantitative Roles
Hudson River Trading (HRT) is one of the most technically demanding firms to interview at in quantitative finance. Founded in 2002, HRT is a high-frequency trading firm that trades billions of shares daily using algorithms developed by world-class mathematicians and engineers.
Their interviews reflect this standard. If Optiver tests mental arithmetic and Jane Street tests probability, HRT tests whether you can think like a computer scientist who also understands markets.
Who HRT Hires
HRT hires three main profiles:
Algorithm developers — write the trading algorithms in C++. Usually CS majors or engineers with exceptional coding ability and mathematical depth.
Quantitative researchers — build the statistical models and signals that feed into trading decisions. Usually graduate-level mathematicians, statisticians, or physicists.
Traders — manage risk and execution strategy. Less common as a new-grad path; usually algorithmic rather than discretionary.
The interview process is heavily weighted toward algorithmic thinking and coding, more so than most prop firms.
What HRT Values Most
HRT interviews are designed to find people who can:
- Decompose problems systematically — break complex questions into tractable subproblems
- Write correct code under pressure — implement cleanly, handle edge cases
- Reason about algorithms — time complexity, space complexity, correctness proofs
- Apply probability and statistics — especially in stochastic settings
- Think about markets mechanically — understand microstructure and execution
Notably, HRT cares less about financial knowledge than about raw mathematical and algorithmic ability. You don't need to know what a swap is; you need to be able to solve a recurrence relation.
Stage 1: Recruiter Screen and Coding Assessment
The Online Assessment
HRT uses a multi-stage coding assessment. Expect:
- 3–5 problems in 90–120 minutes
- C++ or Python (C++ is preferred for performance roles)
- Mix of pure algorithms and math-flavored problems
Common problem types:
Bit manipulation: Count the number of set bits in an integer (popcount). Implement XOR operations. These appear because HRT's codebase is heavily optimized.
int countBits(int n) {
int count = 0;
while (n) {
count += n & 1;
n >>= 1;
}
return count; // Or: return __builtin_popcount(n);
}
Number theory: Given N, find the largest prime factor. Implement modular exponentiation. Sieve of Eratosthenes.
def largest_prime_factor(n: int) -> int:
factor = 2
largest = 1
while factor * factor <= n:
while n % factor == 0:
largest = factor
n //= factor
factor += 1
return n if n > 1 else largest
Dynamic programming: Classic DP on subsequences, grid paths, knapsack. HRT tests whether you can identify the DP structure quickly.
Probability simulation: Implement a Monte Carlo simulation to estimate an expected value. Write clean code that handles randomness correctly.
What to Prepare
Before submitting the online assessment:
- Be comfortable with LeetCode Medium in under 15 minutes
- Know your CS fundamentals: hash maps, trees, heaps, graphs
- Practice competitive programming speed (Codeforces 1200-1600 rating range problems)
Stage 2: Phone/Video Technical Interviews
HRT typically does 2–3 technical phone screens before bringing candidates onsite.
Probability and Math Problems
These are lighter than the algorithms but still rigorous.
Q: A point is chosen uniformly at random inside a unit circle. What's the probability it's within distance 1/2 from the center?
Area of smaller circle = π(1/2)² = π/4. Area of unit circle = π(1)² = π. P = (π/4)/π = 1/4 = 25%
Q: You roll a fair die repeatedly until you've seen all 6 faces. What's the expected number of rolls? (The Coupon Collector Problem)
Expected rolls = 6 × (1/6 + 1/5 + 1/4 + 1/3 + 1/2 + 1/1) = 6 × (1 + 0.5 + 0.333 + 0.25 + 0.2 + 0.167) = 6 × 2.45 = 14.7 rolls
General formula: E[T] = n × H_n where H_n is the nth harmonic number. For n=6: 6 × (49/20) = 14.7.
Q: What's the expected number of coin flips to get 3 consecutive heads?
Recursive approach. Let E = expected flips from start, A = after 1 head, B = after 2 heads.
B = 1/2(1) + 1/2(1+E) = 1 + E/2 A = 1/2(1+B) + 1/2(1+E) = 1 + B/2 + E/2 = 1 + (1+E/2)/2 + E/2 = 1.5 + E/4 + E/2 = 1.5 + 3E/4 E = 1/2(1+A) + 1/2(1+E) E = 1 + A/2 + E/2 E/2 = 1 + A/2 = 1 + (1.5 + 3E/4)/2 = 1 + 0.75 + 3E/8 = 1.75 + 3E/8 E/2 - 3E/8 = 1.75 E/8 = 1.75 E = 14 flips
Q: In a random permutation of 1, 2, ..., n, what's the expected number of "records" (elements larger than all previous elements)?
By linearity of expectation: P(position k is a record) = 1/k (since position k is a record iff it's the maximum of the first k elements, which happens with probability 1/k).
E[records] = 1/1 + 1/2 + 1/3 + ... + 1/n = H_n (the nth harmonic number)
For n=10: H_10 ≈ 2.93 records. This is a classic interview question at quantitative firms.
Algorithm Questions in Phone Screens
Q: Implement binary search. What's its time complexity and when does it break down?
Binary search is O(log n). It breaks down when: (1) the array isn't sorted, (2) there are duplicates and you need a specific occurrence, (3) the comparison is expensive, (4) the array is too large to fit in cache (branch mispredictions dominate).
Q: What's the time complexity of building a heap? Why is it O(n) rather than O(n log n)?
Naive: insert each of n elements one-by-one → O(n log n).
Build-heap (heapify): the key insight is that heapifying takes O(h) for a node of height h. There are n/2 leaves (h=0), n/4 nodes at h=1, etc. Total work = Σ (n/2^k) × k for k=1 to log n. This sum converges to O(n).
Q: Describe the difference between BFS and DFS. When do you prefer each?
BFS uses a queue, explores level by level, finds shortest paths. Good for: shortest path on unweighted graphs, level-order traversal, when the answer is likely near the source.
DFS uses a stack (or recursion), explores deep first. Good for: cycle detection, topological sort, connected components, when you need to explore all paths.
Stage 3: Onsite Interviews
HRT's onsite is 4–6 hours of technical interviews. Expect:
Live Coding
At least 2 coding sessions with a whiteboard or IDE. Problems will be:
- Harder than LeetCode Medium (think Hard or competitive programming)
- Often have follow-ups that require optimization
- Sometimes domain-specific: implement a matching engine, order book, or simulation
Example: Order Book Implementation
"Implement a simplified limit order book. Support: add_order(side, price, quantity), cancel_order(order_id), get_best_bid(), get_best_ask(). Orders at the same price are executed FIFO."
Key design decisions:
- Use a sorted map (price level → queue of orders) for each side
- Bids sorted descending, asks ascending
- Order lookup by ID needs a hash map for O(1) cancel
This tests both data structure knowledge and domain understanding.
Example: Simulate a Market
"N agents each independently buy or sell 1 share at each time step with probability p_buy = 0.6 and p_sell = 0.4. Write a simulation that runs for T timesteps and returns the price path, assuming price moves +1 on net buys and -1 on net sells."
The problem tests whether you can write clean simulation code and think about the model's behavior (it's a biased random walk).
Probability and Statistics
HRT digs deeper into stochastic processes than most prop firms.
Q: What is a Markov chain? Give an example.
A Markov chain is a sequence of random variables where the future depends only on the present, not the past: P(X_ | X_0, ..., X_n) = P(X_ | X_n).
Example: a random walk on states 0, 1, ..., N where you move left or right with equal probability. The state is just your current position; the history of how you got there doesn't matter.
Q: What is the stationary distribution of a Markov chain?
A distribution π such that πP = π, where P is the transition matrix. Intuitively: if you run the chain for a long time, the fraction of time spent in state i converges to π_i (under mild conditions).
Example: for a fair random walk on with reflecting boundaries (at 0 and 2, you stay or bounce), the stationary distribution is [1/4, 1/2, 1/4].
Q: A stock price follows a symmetric random walk starting at $100. What's the probability it reaches $110 before $90?
By the optional stopping theorem (or by symmetry): since the walk is symmetric and the two barriers ($90 and $110) are equidistant from $100, the probability of hitting $110 first equals the probability of hitting $90 first = 50%.
If the barriers were asymmetric (e.g., $115 before $90 from $100), use the gambler's ruin formula: P(reach $115 from $100) = (100 - 90)/(115 - 90) = 10/25 = 40%.
Market Structure
Q: What is adverse selection and why does it matter for market makers?
Adverse selection occurs when the counterparty to a trade has better information. For a market maker quoting bid/ask:
- Uninformed traders buy and sell randomly — the market maker earns the spread on average
- Informed traders only trade when it's advantageous to them — the market maker loses
If 30% of order flow is informed, the market maker must widen the spread enough to cover losses to informed traders with profits from uninformed traders.
Q: What is VWAP and why is it used?
Volume-Weighted Average Price: VWAP = Σ(price × volume) / Σ(volume) over a period.
Used as:
- A benchmark for execution quality — did you buy below or above VWAP?
- An execution algorithm — buy proportionally to the market's volume throughout the day to minimize market impact
VWAP is preferred over time-weighted average because it weights prices when more shares are actually trading.
The HRT Interview Mindset
What distinguishes candidates who get HRT offers:
Think out loud, but think fast. HRT interviewers want to see your reasoning process, but they also value speed. The ideal is: fast, correct reasoning that you narrate as you go.
Precision. HRT is a firm that operates at microsecond timescales. Imprecise language ("around O(n²)") is a red flag. Be exact.
Handle edge cases automatically. In coding interviews, before you start implementing, enumerate the edge cases: empty input, single element, integer overflow, duplicate values. Interviewers are watching whether this is natural for you.
Ask clarifying questions early. It's better to confirm the problem statement than to solve the wrong problem. HRT values rigorous thinking.
Preparation Timeline
12 weeks out:
- Grind LeetCode systematically: arrays, trees, graphs, DP. Aim for 150+ problems.
- Start probability practice: coin flip problems, Markov chains, harmonic numbers.
6 weeks out:
- Move to harder problems: competitive programming, Codeforces 1400+ rated problems.
- Add probability depth: coupon collector, gambler's ruin, optional stopping theorem.
- Practice writing clean C++ or Python under time pressure.
3 weeks out:
- Mock interviews with a partner or on Pramp/interviewing.io.
- Review system design basics if targeting algorithm developer roles.
1 week out:
- Review your fundamentals, not new topics.
- Get sleep — HRT's interviews are cognitively demanding.
The daily estimation practice at Fermiq builds the probabilistic intuition that underpins HRT's math questions. Pair it with consistent LeetCode practice for the best preparation.
Explore the probability category specifically — the stopping time and expected value problems map directly to what HRT tests.