QuantPrep
QUANT INTERVIEW TECHNIQUE · OPTIMAL STOPPING

Optimal Stopping in quant interviews

When to stop and take the offer — the secretary problem and its cousins.

TRY A PROBLEM NOW · NO SIGNUP

#042 · optimal_stoppingdifficulty 4

In the classical secretary problem, as n → ∞, what fraction should you reject outright before accepting the next best-so-far candidate?

LIVE DEMO · NO SIGNUP

WHAT IT IS

Optimal stopping problems ask: faced with a stream of uncertain choices presented sequentially, when should you stop and accept the current option? The canonical example is the secretary problem: interview n candidates in random order, decide immediately after each whether to hire, never revisit. The optimal strategy is beautiful in its simplicity — reject the first n/e candidates outright, then accept the first candidate afterwards who beats every prior one. The success probability is also 1/e ≈ 36.8%. Optimal stopping generalises across quant trading (when to execute a trade, when to exit a position), statistics (sequential hypothesis testing), and operations research (when to replace a machine). In interviews, optimal stopping problems test three things: can you formulate a decision problem under uncertainty, can you derive a stopping rule, and do you understand why the limiting behaviour makes sense.

WHEN IT APPEARS IN INTERVIEWS

Most common at Jane Street, SIG, and Citadel — firms that value reasoning depth over rapid-fire brainteasers. The secretary problem itself is canonical; interviewers usually ask a variant (different payoff structure, known distribution, multiple picks) to probe whether you understand the mechanism, not just the answer.

FIRMS THAT TEST THIS

SAMPLE PROBLEMS

Secretary problem

You interview n candidates in random order. After each, you must either hire (ending the process) or reject forever. Goal: maximise probability of hiring the best. As n → ∞, what is your strategy, and what is the success probability?

KEY INSIGHT

Reject the first k candidates; accept the first subsequent candidate who is better than all seen so far. Optimise k by maximising P(best hired | first k skipped) = (k/n) · Σ_{i=k+1..n} 1/(i-1). As n → ∞, this becomes (k/n) · ln(n/k). Maximum at k/n = 1/e; success probability also → 1/e ≈ 36.8%.

House-selling problem

Offers arrive daily, i.i.d. from some known distribution. Each day you receive one offer and must accept or reject. There's a cost c per day of delay. What's the optimal threshold for accepting?

KEY INSIGHT

Set up the Bellman equation: V = max(offer, E[next day V] - c). The optimal policy is a threshold θ where V = θ, and θ satisfies θ = E[max(X, θ) - c] for offer X. Solve for θ; accept any offer ≥ θ.

Parking problem

You're driving toward a destination along a road with parking spots at every integer position. Each spot is independently available with probability p. You can only see whether a spot is free when you reach it (no lookahead). What's your optimal strategy, and what's the expected distance from destination?

KEY INSIGHT

Threshold strategy: reject all free spots further than some distance d from the destination; accept the first free spot at distance ≤ d. Optimise d to minimise expected final distance. For p = 1/2, the optimum is roughly d = log₂(…) and expected distance is O(1/p).

SOLVING STRATEGIES

  • ·Frame the problem as a Markov decision process: states are the information so far, actions are 'stop' or 'continue', rewards are known.
  • ·Use backward induction on finite horizons: starting from the last time step, compute the value function, then propagate backward.
  • ·For infinite horizon problems with a known distribution, look for a threshold policy. Solve for the threshold via the indifference condition.
  • ·Check the asymptotic (large n) behaviour — often the answer simplifies dramatically (e.g., the 1/e in the secretary problem).
  • ·Sanity-check the answer by comparing to a trivial strategy (always accept, never accept, random accept) and verifying your optimum beats them.

COMMON VARIATIONS

  • ·Secretary problem with known payoff (not just 'best/not-best') — changes the optimal stopping ratio.
  • ·Multiple picks: choose the k best out of n.
  • ·Noisy observations: you see a noisy signal, not the true rank.
  • ·Finite-horizon vs. infinite-horizon — affects whether there's a clean closed-form.
  • ·Options pricing: American options are optimal stopping problems for the exercise decision.

FAQ

Why is 1/e the magic number in the secretary problem?

It comes from maximising P(hire the best) = (k/n) ln(n/k) over k/n in (0, 1). Take the derivative, set to zero: ln(n/k) = 1, so n/k = e and k/n = 1/e. The success probability at this optimum is also 1/e.

How is optimal stopping related to American options?

An American option can be exercised at any time up to expiry; deciding when to exercise is an optimal stopping problem. The Black-Scholes PDE extends to the optimal-stopping framework for early-exercise features.

Is the secretary problem ever asked literally in interviews?

Yes, occasionally — but more often, a variant is asked (different payoff, known distribution, multiple candidates to pick). Interviewers use it to probe whether you memorised the answer or understand the mechanism.

Where does optimal stopping appear in real trading?

Execution algorithms, position exits, rebalancing decisions, and volatility-based risk-on/risk-off rules all involve optimal-stopping machinery. Candidates who can bridge interview optimal-stopping to trading context impress interviewers.

RELATED TECHNIQUES

CLASSIC OPTIMAL STOPPING PROBLEMS

Deep walkthroughs of named problems that test optimal stopping.

FREE QUANT BRAINTEASERS WEEKLY

Not ready to sign up? Get 5 hand-picked quant interview problems every week. No spam, unsubscribe any time.

Drill optimal stopping problems now

400+ problems, adaptive selection, AI-generated alternative explanations. Free tier covers 20 attempts.

Start practicing free