Derivatives Foundation puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 66
- Topics
- 12
- Hard
- 29
003A logger stamps every event to the nanosecond, nine decimal places, and whenever the timestamp is missing it writes nine zeros instead. In 100,000 records you find 15 whose fractional part is exactly nine zeros. What is the probability that at least one of those 15 is a filled-in missing value?Jump TradingAnonymous interview candidate in · 2022
Try it first
First instinct: roughly how many genuine timestamps, out of 100,000, should end in nine zeros by chance?
Show the worked solution
Essentially 1; the 15 are gaps. A genuine stamp ends in nine zeros with probability 10^-9, so in 100,000 records you expect 0.0001 such endings. The chance that 15 or more arise genuinely is about 10^-72, which no reasonable prior on missing data can overcome: even a missing rate of one in ten thousand would produce about 10 filled-in endings. So the probability that at least one of the 15 is a filled-in value is 1 to every decimal place you could print.
What is the question really asking you to compare?
A shopkeeper who finds 15 notes with the same serial number does not ask what the chance of a coincidence is; she asks which explanation makes 15 identical notes likely. This is a Bayes question in disguise: compare how likely 15 all-zero endings are if nothing is missing against how likely they are if some values are missing, then weight by a prior. The first likelihood is astronomically small; the second is ordinary. The prior would need to be more extreme than anything a real system justifies to change the answer.
Genuine nanosecond stamps should produce 0.0001 all-zero endings in 100,000 records, while 15 were observed, five orders of magnitude more, and the chance of 15 or more genuine ones is about 10^-72, so the observation is explained only by filled-in missing values. How do you put a number on the genuine case?
Each of the 100,000 stamps ends in a specific nine-digit string with probability one in a billion, so the count of genuine all-zero endings is Poisson with mean 0.0001. The probability of exactly 15 is e^(-0.0001) times 0.0001^15 over 15 factorial, which is about 10^-72. You do not need the exact figure in the room; say that 0.0001 to the fifteenth power is 10^-60 before dividing by 15 factorial, and the interviewer has what they need. The point is to show you can set up the count, not to print 72 zeros.
The relationshipP(15 | none) the chance of 15 genuine all-zero endings when no value is missing, Poisson with mean 0.0001 P(none) your prior that the data set has no missing values at all P(15) the overall chance of seeing 15, dominated by the missing-value explanation What it says in wordsThe probability that none are missing is the genuine likelihood times its prior, divided by the total, and the genuine likelihood is so small that the result rounds to 1 whatever prior you hold.What does the interviewer want to hear about the prior?
The honest answer is that the question is underspecified: without a prior on how often values go missing, you cannot write a single number. Say that, then show it does not matter: for the posterior to drop even to 99.9% you would need a prior of no missing values more than 10^69 times stronger than the alternative, and no logging system earns that confidence. For contrast, a modest missing rate of one record in ten thousand would give an expected 10 filled-in endings, right where the observed 15 sits. A limitation worth adding: the argument assumes the genuine fractional digits are uniform, which breaks if the clock quantises to microseconds and pads with zeros itself.
Where candidates lose it
Candidates reach for the binomial probability of 15 genuine zeros and stop, reporting a tiny number as if it were the answer. The question asks for the probability of a missing value given the data, which needs the comparison with the alternative, not a single likelihood.
The second loss is freezing because no prior is given. The strong move is to name the missing input, then show that the likelihood ratio is so lopsided that the prior cannot matter. That is what a desk wants: a conclusion that survives the unknown.
What the interviewer asks next
- Now the logger stamps to the microsecond, six digits, and pads with three zeros. Does the argument survive?
- Suppose only 1 record ends in nine zeros. What would you conclude then, and what would you need to know?
- How would you check the data itself rather than reason about it?
Asked at Jump Trading, Prop Trading, Anonymous interview candidate in, 2022 (Wall Street Oasis):
What is the probability of at least 1 missing value given that we see 15 data points with 0's in the end
008You roll a fair die again and again, adding each face to a pot. But if you roll a 1, the whole pot is wiped out and the game ends. You may stop and bank the pot at any time. When should you stop, and why?Quant tradingProp trading firms
Try it first
First instinct: with 15 in the pot, should you roll once more?
Show the worked solution
Roll while the pot is below 20 and stop once it reaches 20 or more. One more roll loses the pot with probability 1/6 and otherwise adds a face of 2, 3, 4, 5 or 6, which sum to 20. The expected change is (20 minus pot) over 6: +3.33 from an empty pot, +0.83 at 15, zero at 20 and negative beyond. The number of rolls so far is irrelevant; only the pot matters. Played this way, the expected bank from an empty pot is about 8.14.
What does one more roll actually buy you?
Think of a street game where you can keep picking envelopes that each add a few rupees to your winnings, but one envelope in six says lose everything. Whether to pick again depends on how much you already hold, not on how many envelopes you have opened. The expected change from one more roll is the chance of adding, five sixths, times the average addition, 4, minus the chance of ruin, one sixth, times the pot you would lose. That is (20 minus pot) over 6, and it is positive exactly while the pot is under 20.
The expected gain from one more roll falls in a straight line from +3.33 with an empty pot to zero at a pot of 20 and to -1.67 at 30, so rolling adds value on the left of 20 and destroys it on the right, and the stopping rule is simply to bank at 20 or above. The relationshipp the pot already held 5/6 x 4 the chance of surviving the roll times the average of the faces 2 to 6 p/6 the pot at risk, times the one-in-six chance of a 1 What it says in wordsOne more roll is worth the expected addition minus the expected loss, and the two balance when the pot is 20.Why is the one-step rule the whole answer here?
In many stopping problems you cannot trust a one-step look: a roll that loses value today might open a bigger gain tomorrow. Here the gain from one more roll only falls as the pot grows, so once rolling stops being worth it, it never becomes worth it again, and the one-step rule is optimal. You can check it by valuing the whole game for each stopping threshold: stopping at 20 (or 21, which is equivalent because the roll at exactly 20 is worth zero) gives an expected bank of about 8.14, stopping at 15 gives 7.85 and at 25 gives 8.00. Say the word monotone if you know it; say the reason either way.
What would a desk add to the textbook answer?
That the rule maximises expected value and nothing else. A player who cannot afford to lose the pot, or who is paid on a target rather than on the average, would stop earlier, and a trader who sizes positions knows that expected value is only the first thing to check. The limitation is the same in the puzzle and on the desk: expected value is right for a game you can play many times, and this game is played once.
Where candidates lose it
Candidates who answer by feel either stop far too early, because a one-in-six wipe-out sounds frightening, or never stop, because the pot keeps growing. The question is asking for the point where the two forces balance, and that point is a number: 20.
The second loss is using 3.5 as the average face. The faces that keep you in the game are 2 to 6, averaging 4, and their total is 20. Using 3.5 gives a threshold of 21 and shows the ruin branch has been counted twice.
What the interviewer asks next
- Now rolling a 1 costs you only half the pot. What is the new stopping rule?
- What is the expected bank from an empty pot under the optimal rule, and how would you compute it?
- Suppose you must pay 1 for every roll. Does the threshold go up or down, and by how much?
009Three players each hold one hidden card from a standard deck, ace counting 1 up to king counting 13. You can see only your own card, a 10. You must make a two-way market on the total of all three cards. The player on your left lifts your offer, you requote, and he lifts again. What do you do now?OptiverChicago · 2025
Try it first
Before the second lift: what is a fair value for the total when all you know is your own 10?
Show the worked solution
Raise the market and widen it; do not sell a third time near the old level. With only your 10 known, the fair total is 24 and the two unknowns give a standard deviation of about 5.3. A player who sees his own card and lifts your offer is telling you his card is high: if it is 8 or more the fair total is 27.5; after a second lift, 11 or more, it is 29. You are short 2 at an average near 27 against a value near 29. Quote something like 28 at 32.
What does a lift tell you that the cards do not?
If you are selling a second-hand bike and the first viewer pays your asking price without haggling, you have probably priced it low; if he immediately asks to buy a second one, you certainly have. A counterparty who can see something you cannot and keeps buying is telling you the value is higher than your offer, and every trade you do with him before repricing is a trade you will regret. This is adverse selection, and a market-making game exists to see whether you notice it in time.
With your 10 the prior fair total is 24; one lift suggests the buyer's card is 8 or more and moves the fair value to 27.5; a second lift suggests 11 or more and moves it to 29, so the quote climbs from 23 at 25 to 28 at 32 and widens from 2 to 4 while you sit short 2. The relationshipL the card held by the player who keeps lifting 7 the mean of the third player's card, still unknown and uniform on 1 to 13 L >= 8, L >= 11 the rough information in a first and a second lift: his card is above what your offer implied What it says in wordsEach lift raises your estimate of the lifter's card, and the fair total moves by exactly that amount.How much do you move, and how much do you widen?
Move at least as far as the information says and widen because your uncertainty about his behaviour has grown. After one lift a quote of 26 at 29 sits around the new estimate of 27.5; after two lifts 28 at 32 sits around 29 and is twice as wide, because the next lift would mean his card is 12 or 13 and the total near 30 or more. The width is not a penalty on him; it is the price of your own blindness. A standard deviation of 5.3 on the total from the two unknown cards is the natural scale for the width before any lifts.
What about the position you already have?
You are short 2 at an average near 27 and the value is near 29, so you are losing about 4 on paper. Do not try to earn it back by selling more at a worse price, and do not flip to buying from the other player at any cost; skew your quote up so the next trade is more likely to reduce the short than add to it. Say your position out loud when the interviewer asks; the game checks whether you can hold the fair value, the quote and the inventory in your head at once. The limitation to state: the thresholds 8 and 11 are a rough model of his behaviour, and a player who bluffs changes the inference.
Where candidates lose it
The common failure is to keep quoting 23 at 25 after the first lift, and to sell a third unit at 25 after the second, because the cards have not changed. Your information has changed. Two lifts from a player who sees his own card are worth more than the deck statistics.
The second loss is overreacting: moving the quote to 35 at 40 after one lift. He may hold a 9. Move to what the evidence supports, widen for what it does not, and keep your position in mind.
What the interviewer asks next
- Now the third player hits your bid at 28. How do you reprice?
- What if the lifter can see your card as well as his own?
- Make a market on the product of the three cards instead of the sum. What changes about the width?
Asked at Optiver, Quantitative Research, Chicago, 2025 (Wall Street Oasis):
The next round was a poker style market making game as well as a separate behavioural interview
011n points are dropped at random on a circle of circumference 1. Each point colours in the arc between itself and its nearest neighbour. As n grows large, what fraction of the circle do you expect to be coloured?Susquehanna International GroupLondon · 2026
Try it first
First instinct: a gap between two neighbouring points stays blank when?
Show the worked solution
7/18 of the circle, about 38.9%. A gap between neighbouring points stays blank only when it is longer than both gaps beside it. For large n the gaps behave like independent exponentials with the same mean, and the expected length of the longest of three is 1 + 1/2 + 1/3 = 11/6 times the mean. Any one of the three is longest a third of the time, so the blank share of length is (11/6)/3 = 11/18, and the coloured share is 1 minus that, 7/18.
Why is the question about gaps and not about points?
Think of houses along a ring road where each household paints the stretch of road to its nearest neighbour. A stretch of road gets paint from the house at either end, so to find the unpainted road you ask which stretches are chosen by neither house. A gap is blank exactly when it is longer than both of its neighbouring gaps, because then each of its end points has a closer neighbour on the other side. That turns the problem into a question about one gap and its two neighbours, which is small enough to solve.
Fourteen random points cut the circle into fourteen gaps; the green gaps are coloured because each is shorter than at least one neighbour, the grey gaps are blank because each beats both neighbours, and in the limit the blank gaps carry 11/18 of the length and the coloured ones 7/18, about 38.9%. Why 11/18 and not 1/3 for the blank share?
Each gap is the longest of its three with probability 1/3, by symmetry. But the question asks for length, not count, and the gaps that stay blank are the long ones. The blank share is the expected length of a gap that is the longest of three, divided by the mean gap, which for exponential gaps is (1 + 1/2 + 1/3)/3 = 11/18. Count and length give different answers because being blank is correlated with being long. That distinction is the whole difficulty of the question, and saying it out loud is most of the marks.
The relationshipG_1, G_2, G_3 a gap and its two neighbours, approximately independent exponentials for large n mu the mean gap, 1/n 1 + 1/2 + 1/3 the expected maximum of three unit exponentials, from the memoryless property What it says in wordsA gap's expected blank length is a third of the expected longest of three gaps, and dividing by the mean gap gives the blank share of the circle.Where does the 1 + 1/2 + 1/3 come from, and what are you assuming?
Three exponential clocks run together. The first to ring takes an expected 1/3 of the mean; then two remain, memoryless, and the next takes 1/2; the last takes a full mean. Adding gives 11/6 for the longest. The assumption is that neighbouring gaps are independent, which is exact in the limit of many points and only approximate for small n, where the gaps must sum to 1. A quick simulation with 2,000 points gives a coloured share of 0.388, against 7/18 = 0.389. The exact answer for any n differs slightly and settles to 7/18 as n grows.
Where candidates lose it
The common wrong answer is 2/3, from the count: each gap is the longest of three one time in three, so one third of the gaps are blank. The blank gaps are the long ones, so by length they carry more than a third, 11/18.
The second loss is trying to integrate over the joint distribution of n spacings. The limit is a three-gap problem with exponential gaps, and a desk wants the memoryless argument, not the integral.
What the interviewer asks next
- What is the expected number of blank gaps when there are n points?
- Now each point colours the arcs to both of its neighbours. What changes?
- Why do the gaps between uniform points on a circle look exponential when n is large?
Asked at Susquehanna International Group, Quantitative Research, London, 2026 (Wall Street Oasis):
if n points are placed on a circle and each point colours in the arc to its nearest neighbour, what is the expected length of coloured circumference
021You roll a fair die again and again and keep a running total. What is the probability that the running total is ever exactly 10? And what does the probability of hitting a given target settle to as the target grows large?Quant trading
Try it first
Before any recursion: for a very large target, the chance the running total lands on it exactly is closest to
Show the worked solution
For 10 the chance is 0.2893, and for large targets it settles at 2/7, about 0.286. The total lands on n only by landing on one of the six numbers before it and then rolling the exact gap, so p(n) is the average of the previous six values, starting from p(0) = 1. Running that recursion gives p(10) = 17,492,167/60,466,176. In the long run the total advances 3.5 per roll, so it lands on one number in 3.5.
How do you set up the recursion?
Think of climbing a staircase by jumping one to six steps at a time, each jump picked at random. To stand on step 10 you must at some point stand on one of steps 4 to 9 and then make exactly the right jump. The running total equals n only if it first equals one of n minus 1 down to n minus 6 and then the next roll is exactly the gap, and those six routes cannot both happen, so p(n) is the sum of p(n minus k) times 1/6 for k from 1 to 6. In words, each value is the average of the six before it, with p(0) = 1 because you start at zero and p of a negative number = 0.
The relationshipp(n) the probability that the running total ever equals n exactly p(n - k) the chance the total visits the number k below the target 1/6 the chance the next roll is exactly the gap k What it says in wordsThe chance of hitting a number is the average of the chances of hitting each of the six numbers just below it.n p(n) n p(n) 1 0.1667 6 0.3602 2 0.1944 7 0.2536 3 0.2269 8 0.2681 4 0.2647 9 0.2804 5 0.3088 10 0.2893 10 0.2893 The hit probability climbs to a peak of 0.3602 at six, falls back to 0.2536 at seven, and by ten is already within half a percentage point of its long-run level of 2/7. The chance the running total ever equals n climbs from 0.167 at one to a peak of 0.360 at six, drops at seven, and then wobbles in towards 2/7 = 0.286, with p(10) = 0.2893, because each bar is the average of the six bars before it. Why does it settle at 2/7?
If you walk down a long street taking steps that average 3.5 paving stones, then over a kilometre you will have stepped on about one stone in every 3.5. A long run of rolls moves the total forward 3.5 per roll on average, so the totals visited are a share 1/3.5 = 2/7 of all the numbers passed, and far from the start every number is equally likely to be one of them. That is the renewal argument, and it gives the limit without any recursion. It also explains why the answer is not 1/6: the total does not get one try at each number, it passes every number and either lands on it or steps over it.
Why the hump at 6, and what is the desk point?
Small totals have many routes compared with their distance from zero: you can reach 6 in one roll, or in two, three, up to six rolls. For n from 1 to 6, p(n) = (1/6)(7/6) to the power n minus 1, so it grows each step and peaks at 0.360 at six; after that the averaging takes over and damps the swings. The interview point, often set as a coding task, is dynamic programming: one pass, six additions per number, no enumeration of paths. The limitation to say out loud is that the 2/7 limit needs a fair die and nothing that depends on the total so far; a rule such as skip your turn above 50 breaks it.
Where candidates lose it
The common answer is 1/6, as though the total gets a single roll at landing on 10. It gets many chances, from 4, 5, 6, 7, 8 and 9, and the whole question is about adding those routes without double counting.
The second loss is trying to count sequences of rolls that sum to 10 and weight each by its length. It works in principle and collapses under the arithmetic in the room. The recursion on p(n) is the answer the interviewer is waiting for, followed by the 2/7 limit from the average step.
What the interviewer asks next
- Write the recursion as a loop and say how much work it takes to reach n = 1,000.
- The die is replaced by a coin that moves the total 1 or 2. What is the long-run hit chance, and what is p(n) exactly?
- What is the expected number of rolls until the running total first reaches 10 or more?
024I roll a fair die, then flip as many fair coins as the die shows. Make me a market on the number of heads.OptiverAustin · 2025
Try it first
Before the variance: what is the fair value, the centre of your market?
Show the worked solution
Centre on 1.75 and quote something like 1.6 bid, 1.9 offered. The die averages 3.5 coins and each coin gives half a head, so the mean is 1.75. The spread comes from two sources: the coin flips, E[N]/4 = 0.875, and the uncertain number of coins, Var(N)/4 = 0.729, a variance of 1.604 and a standard deviation of 1.27. The fair value is exact, so the quote can be tight; the spread tells you how hard to size it.
How do you get the centre?
Suppose a shop's daily customers vary and each spends Rs 200 on average. Average takings are average customers times Rs 200, whatever the day-to-day mix. When a random number of random things are added up, the mean is the expected count times the expected size of each, so here 3.5 coins times half a head = 1.75. That is the law of total expectation in one line. Note that 1.75 is not a possible outcome, and the single most likely outcome is one head, with a chance of 0.312; a market is centred on the mean because that is where neither side has an edge.
The number of heads has mean 1.75 and most of its mass on one and two heads, and its variance of 1.604 splits into 0.875 from the coin flips and 0.729 from not knowing how many coins the die will give, so the standard deviation is 1.27. Why is the spread bigger than the coins alone suggest?
Because you are uncertain about two things at once: how many coins, and how they land. The variance of a random sum is the average of the inner variance plus the variance of the inner mean: E[N] x 1/4 from the coins, plus Var(N) x 1/4 from the die, 0.875 + 0.729 = 1.604. If you knew the die would show 3.5 coins and ignored its own wobble, you would quote a standard deviation of 0.94 instead of 1.27 and size too large. The die's contribution is almost half the total, which is the step most candidates leave out.
The relationshipH the number of heads N the number of coins, the die roll, with mean 3.5 and variance 35/12 1/4 the variance of one fair coin, and the square of its half-head mean What it says in wordsThe mean is half the expected number of coins, and the variance adds the coin noise to the noise in the coin count.How tight should the market be, and what if the other side saw the die?
Width pays you for two risks: not knowing the fair value, and trading with someone who knows more. Here the fair value is exact and nobody has seen anything, so a tight quote around 1.75, such as 1.6 at 1.9, is right, and the standard deviation of 1.27 governs how many contracts you take, not where you centre. Change one fact and the answer changes: if the counterparty has seen the die, a buyer is telling you the die was high. A die of 6 implies 3 heads on average, and a die of 1 only 0.5, so widen sharply or ask to see the die before quoting. The limitation is that real games price in that information risk from the first quote.
Where candidates lose it
The common loss is centring the market on two, the most likely outcome of the coins, or on 1.5 from a guessed three coins. A market is centred on the expected value, and the expected value takes the die's average into account exactly.
The second loss is computing the spread as if the number of coins were fixed at 3.5. That leaves out the variance of the die, almost half the total, and makes you size the position as if it were safer than it is.
What the interviewer asks next
- I buy 5 from you at your offer. Where is your market now, and does it matter whether I saw the die?
- What is the probability of zero heads?
- Now the die decides the number of coins, and each head pays the die's value. What is the expected payout?
Asked at Optiver, Quantitative Research, Austin, 2025 (Wall Street Oasis):
Technical (Simulated EV Poker like game, with cards, coins and dice; Market Making and Taking)
027You back out implied volatility from an option price with Newton's method. For an at-the-money call priced at 40 on a stock at 1,000 with three months to expiry and rates at zero, starting from 30%, how fast does it converge, when can it fail, and what starting guess do traders use?Akuna CapitalNew York · 2025
Try it first
Starting from 30%, how many Newton steps until the error is below one part in a million?
Show the worked solution
Two steps, because Newton converges quadratically near the root. From 30% the error goes 0.099, 8.2e-05, 4.3e-11, then machine precision: the correct digits roughly double each step. The implied volatility is 20.06%. Newton fails where vega is tiny, far out of the money or close to expiry, because dividing by a near-zero slope throws the next guess to nonsense, and it fails outright if the price sits outside the no-arbitrage bounds. Traders start from price over 0.4 x S x sqrt T, which is 20% here.
Why is Newton so fast on this option?
Picture walking towards a wall in the dark by stepping the full distance your outstretched hand estimates. If the floor is level the estimate is right and you arrive in one step; if it slopes gently you arrive in two. Newton does the same with the pricing function: it fits a straight line at the current guess and jumps to where that line hits the target price. The jump is as good as the line, and at the money the call price is almost a straight line in volatility, so the first jump lands within a hair of the answer. Here the price is roughly S x 0.4 x sigma x sqrt T, which is linear in sigma, with a small concave bend. Starting at 30% gives a price of 59.79 against a target of 40; one step takes sigma to 20.0532%, an error of 8.2e-05, and the next step clears ten digits.
The relationshipC(sigma) the model price at the current volatility guess C mkt the market price, 40 here dC/d sigma vega, the slope of price in volatility sigma star the implied volatility being solved for C'' over 2C' the curvature of price in volatility relative to its slope; small at the money, so the squaring bites hard What it says in wordsEach step divides the price gap by the slope, and once close the error is squared, so the correct digits double every step.For the at-the-money call the error in volatility falls from 0.10 to 8.2e-05 to 4.3e-11 and reaches machine precision by the third step, while for a far out-of-the-money call started where vega is tiny the first step overshoots to 114% and the method needs many more steps to crawl back. When does the method fail, and what does the failure look like?
Newton divides by vega, so it breaks where vega is close to zero: far out of the money, close to expiry, or at a very low starting volatility. Take an illustrative call struck at 1,300, 30% above spot, priced at 0.50. Its true implied volatility is 23.0%, but at a starting guess of 15% the model price is 0.005 and vega is only 0.50 per unit of volatility, so the first step jumps to 114% and the method needs 7 more steps to get within 7e-06. Start at 10% and vega is 2.4e-04, so the step divides by almost nothing and the next guess is a volatility of 2,095, which is garbage. The other failure is a price with no solution at all: a call priced below its intrinsic value or above the stock has no volatility that produces it, and Newton loops forever. Check the bounds before you iterate.
What starting guess do traders actually use?
Use the at-the-money approximation: an at-the-money call is worth about 0.4 x S x sigma x sqrt T, so invert it. Here that gives 40 / (0.4 x 1,000 x 0.5) = 20%, within 0.0006 of the true 20.06%; the version with the exact constant, sqrt(2 pi / T) x C / S, gives 20.05%. A guess that close means Newton is finishing a job that is already nearly done, which is why production code rarely needs more than three steps. For options away from the money, a guard is standard: a starting volatility of sqrt(2 |ln(S/K)| / T), 145% for the 1,300 strike, from which the method is known to converge, or a bracketed method such as bisection for the first few steps and Newton only to polish. Say the limitation too: all of this assumes a price that the model can reach, and real screens carry stale or crossed quotes that no solver can fix.
Where candidates lose it
The common loss is describing Newton as halving the error, which is bisection, or saying one step per digit, which is a linear method. The word the interviewer wants is quadratic, with the digits doubling, and the reason: near the root the error is squared.
The second is forgetting the failure cases. A candidate who only praises the speed has not run the method on a far out-of-the-money option, where a tiny vega sends the next guess negative. Name vega as the divisor and the failure explains itself.
What the interviewer asks next
- Why is the call price nearly linear in volatility at the money, and where does it stop being so?
- What goes wrong if you start Newton above the true volatility for a far out-of-the-money put?
- How would you make the solver robust enough for a live surface of ten thousand strikes?
- Price a call at 40 with the stock at 1,000: is any price between 0 and 1,000 reachable by some volatility?
Asked at Akuna Capital, Quantitative Research, New York, 2025 (Wall Street Oasis):
Convergence time of newton's method
033We play chess repeatedly. Half the games are draws; of the decisive games I win two thirds. The match ends when someone wins three games in a row, and a draw resets both streaks. What is the probability that I win the match?Old Mission CapitalChicago · 2018
Try it first
Before setting anything up: roughly how likely am I to win the match?
Show the worked solution
86/99, about 86.9%. Per game I win with probability 1/3, you win with 1/6 and we draw with 1/2. The match has five live states: no streak, my streak of one or two, your streak of one or two. Writing my chance of winning the match from each state as an unknown, each state's equation is a weighted average of its neighbours, and solving the five equations gives 86/99 from the start. The naive ratio of (1/3)^3 to (1/6)^3 gives 89% and is wrong.
Why does the match need states rather than a single formula?
A tennis game at deuce is the everyday version: whoever is a point ahead is in a different position from level, and the chance of winning the game from deuce is best found by naming the positions and linking them. What matters here is not the game count but the current streak, and only five positions are possible before the match ends: no streak, me on one, me on two, you on one, you on two. Every game moves the match from one of those positions to another, with the same three probabilities each time, so the match is a Markov chain and the answer is a small linear system rather than a series. Three in a row sounds like it needs a long sum over all the ways the match can go; the states collapse that sum into five unknowns.
From the no-streak start my chance of winning the match is 86/99, about 86.9%; on my streak of one or two it rises to 87.9% and 90.9%, on your streak of one or two it falls to 84.8% and 72.7%, and every draw returns the match to the start. How do you write and solve the equations?
Call my winning chance x from no streak, a1 and a2 from my streaks, b1 and b2 from yours. From any state a draw, probability 1/2, takes you to x. From no streak a win takes you to a1 and a loss to b1, so x = x/2 + a1/3 + b1/6. From a1 a win takes you to a2 and a loss to b1. From a2 a win ends the match in my favour, worth 1. From b1 a loss takes you to b2 and a win takes you to a1; from b2 a loss ends it, worth 0. Five equations in five unknowns, and the structure is friendly: substitute the draw term first, since x/2 appears everywhere, and the system reduces by hand in a few lines. The solution is x = 86/99, a1 = 29/33, a2 = 10/11, b1 = 28/33, b2 = 8/11. A simulation of 200,000 matches gives 0.869, which confirms the fraction.
The relationshipx my chance of winning the match with no streak live a1, a2 my chance when I have won one or two in a row b1, b2 my chance when you have won one or two in a row 1/2, 1/3, 1/6 the per-game chances of a draw, my win and your win What it says in wordsEach state's value is the average of the values of where the next game can send it, weighted by the chance of each result.Why is the naive ratio wrong, and in which direction?
The tempting shortcut compares the chance of three straight wins for me, (1/3)^3, with three straight for you, (1/6)^3, and takes my share: 8 over 9, 88.9%. That treats the match as a single race from scratch, but a broken streak is not a reset to equal footing: when you beat me on my streak of two, you start a streak of one, and the shortcut ignores every such hand-over. Those hand-overs favour the weaker player a little, which is why the true 86.9% sits below 88.9%. It is also worth saying that the draws change nothing about who wins: they only lengthen the match, which lasts about 33.9 games on average, because every draw sends both streaks back to zero.
Where candidates lose it
The common loss is the ratio shortcut, (1/3)^3 against (1/6)^3, which gives 8/9. It is close enough to sound right and the interviewer will ask you to defend it, at which point the missing hand-over of streaks becomes obvious.
The second is setting up too many states, tracking game counts or draw counts. Only the current streak matters. Five states, five equations, and the draw term is the same in every one.
What the interviewer asks next
- How long does the match last on average?
- The match now ends at two in a row. Does my chance go up or down, and why?
- Draws no longer reset the streaks, they are simply ignored. What is my chance now?
- Write the transition matrix and show which states are absorbing.
Asked at Old Mission Capital, Prop Trading, Chicago, 2018 (Wall Street Oasis):
You and I play chess. 1/2 games end in draws and in the other half I win with 2/3 probability and you win with 1/3
036Three assets all have the same pairwise correlation rho. What are the eigenvalues of the correlation matrix, and how low can rho go?Jump TradingPudong Xinqu · 2023
Try it first
How negative can the common correlation be?
Show the worked solution
The eigenvalues are 1 + 2 rho, once, and 1 - rho, twice; rho can go no lower than -1/2. The vector (1, 1, 1) is an eigenvector with eigenvalue 1 + 2 rho, and any vector whose entries sum to zero is an eigenvector with eigenvalue 1 - rho, which gives a two-dimensional space and hence a double root. A correlation matrix must have no negative eigenvalue, since each eigenvalue is a portfolio variance, so 1 + 2 rho is at least 0 and rho is at least -1/2.
Why can three assets not all be strongly negatively correlated?
Three friends cannot all sit opposite each other at a table: if A faces B and B faces C, then A and C are on the same side. Correlation has the same constraint. If asset A moves against B and B moves against C, A and C are pushed towards moving together, so there is a floor on how negative a common correlation can be, and for three assets that floor is -1/2. You can see the floor without any algebra by holding an equal-weight portfolio of the three, each with unit variance: its variance is (3 + 6 rho) / 9, which is (1 + 2 rho) / 3, and a variance cannot be negative. At rho = -1/2 the portfolio has zero variance; it is perfectly hedged, and nothing below that is possible.
Plotted against rho, the eigenvalue 1 + 2 rho rises steeply and crosses zero at rho = -1/2, while the double eigenvalue 1 - rho falls gently to zero at rho = 1, so the matrix is a valid correlation matrix only between those two points. How do you find the eigenvalues without expanding a determinant?
Write the matrix as (1 - rho) times the identity plus rho times the all-ones matrix J. The identity leaves every vector alone, so you only need the eigenvalues of J, and J is easy: it maps (1, 1, 1) to (3, 3, 3), eigenvalue 3, and it maps any vector whose entries sum to zero to the zero vector, eigenvalue 0, with a two-dimensional space of such vectors. Shifting and scaling by (1 - rho) turns those into 1 - rho + 3 rho = 1 + 2 rho for the market direction and 1 - rho for the two spread directions. Check with the trace: the eigenvalues add to 1 + 2 rho + 2(1 - rho) = 3, the sum of the diagonal, as they must. At rho = 0.3 they are 1.6, 0.7 and 0.7.
The relationshipI the identity matrix J the matrix of all ones, whose eigenvalues are 3 (once) and 0 (twice) lambda 1 the eigenvalue of the common or market direction lambda 2, 3 the double eigenvalue of the two directions that net to zero, the spread trades What it says in wordsThe matrix is a stretch of the all-ones matrix, so the market direction gets 1 + 2 rho and every spread direction gets 1 - rho.What does the structure tell a risk or trading desk?
The eigenvectors are the principal components. The (1, 1, 1) direction is the market factor, and its eigenvalue over the trace, (1 + 2 rho) / 3, is the share of total variance it explains: 53% at rho = 0.3 and 80% at rho = 0.7. The two spread directions carry the rest, equally. A long-short book that nets to zero across the three assets lives entirely in the 1 - rho directions, which is why pairs trades get calmer as correlation rises and why a correlation of 1 collapses them to nothing. For n assets the same argument gives eigenvalues 1 + (n - 1) rho and 1 - rho, so the floor is -1 / (n - 1): -1/3 for four assets and -1/9 for ten. Say the limitation as well: a historical correlation matrix estimated from more assets than observations is only barely positive semi-definite, and a hand-edited one, where a trader overrides a few pairs, can fail the test entirely, which is exactly the fault a risk system is built to catch.
Where candidates lose it
The common loss is answering -1, because a correlation can be -1. For a pair it can; for three assets pairwise, it cannot, and the interviewer wants the reason: a negative eigenvalue is a negative portfolio variance.
The second is expanding the characteristic polynomial by hand and getting lost. Spot the all-ones structure, name the eigenvector (1, 1, 1), and the rest is one line.
What the interviewer asks next
- What is the floor on rho for n equally correlated assets?
- The three assets have correlations 0.9, 0.9 and -0.9. Is that a valid correlation matrix?
- What is the variance of the equal-weight portfolio at rho = -1/2, and what does that portfolio look like?
- How would you repair an estimated correlation matrix that has a small negative eigenvalue?
Asked at Jump Trading, Prop Trading, Pudong Xinqu, 2023 (Wall Street Oasis):
Some very difficult linear algebra questions about PCA and eigenvalues
039You start with Rs 2 and bet Rs 1 at a time on a coin that falls your way 60% of the time. You stop when you reach Rs 5 or go broke. What is the probability you reach Rs 5?Two SigmaNew York · 2023
Try it first
Roughly how likely are you to reach Rs 5 before going broke?
Show the worked solution
135/211, about 64.0%. Let r be q over p, which is 0.4 / 0.6 = 2/3. The probability of reaching N from a stake of i is (1 - r^i) / (1 - r^N). With i = 2 and N = 5 that is (1 - 4/9) / (1 - 32/243) = (5/9) x (243/211) = 135/211. A fair coin would give 2/5 = 40%; the 60% edge lifts it to 64.0%. The game lasts about 6.0 bets on average.
Why is the answer not simply 2 out of 5?
With a fair coin the answer is 2/5, because a fair game cannot create or destroy expected money: you start with Rs 2, you finish with Rs 5 or Rs 0, so the chance of Rs 5 must be 2/5 to keep the average at 2. With a 60% coin each bet gains you Rs 0.20 on average, so the walk drifts upward and the chance of hitting the top is higher than the fair-coin fraction; what you need is a quantity that is still conserved under the biased coin. That quantity is (q/p) to the power of your stake. A win multiplies it by q/p, a loss by p/q, and weighted by their probabilities the two moves cancel: p x (q/p) + q x (p/q) = q + p = 1. Because that quantity is conserved, its starting value must equal its average finishing value, and that one line gives the formula.
The relationshipr the loss probability over the win probability; below 1 when the coin favours you i the starting stake, Rs 2 N the target, Rs 5 P i the chance of reaching the target before going broke What it says in wordsSet the conserved quantity r to the stake equal to its average at the end, and solve for the chance of reaching the target.The chance of reaching Rs 5 before Rs 0 rises along a curve above the fair-coin straight line, reaching 0.640 from a starting stake of Rs 2 against 0.4 for a fair coin, because each rupee of stake multiplies the odds of ruin by q over p, two thirds. How do you derive it from the states if you forget the formula?
Write P_i for the chance of reaching 5 from a stake of i. Then P_0 = 0, P_5 = 1, and in between P_i = 0.6 P_(i+1) + 0.4 P_(i-1), one equation per state. That is a second-order linear recurrence whose solutions are of the form A + B r^i with r = q/p, and the two boundary conditions fix A and B. Solving the five equations directly gives P_1 = 81/211, P_2 = 135/211, P_3 = 171/211 and P_4 = 195/211, and the recurrence is the thing to write on the whiteboard first, because it works for any rule change. A simulation of 200,000 games gives 0.639, agreeing with the fraction to three places. The same system with a 1 on the right-hand side of each interior equation gives the expected duration, about 6.0 bets from Rs 2.
What does the biased formula tell you about trading with an edge?
Let the target go to infinity. With a fair coin the chance of never going broke is zero: any finite stake is eventually lost. With the 60% coin it is 1 minus r to the stake, which from Rs 2 is 1 - 4/9 = 5/9, about 56%, and from Rs 10 it is above 98%. An edge does not protect a thin stake: with Rs 2 behind a 60% coin you still go broke 44% of the time, and the cure is not a better coin but a bigger stake relative to the bet. That is why a desk with a genuine edge still caps position size, and why the question sits next to the Kelly one. The limitation is that the bets here are of fixed size; once you can resize the bet with your capital, the ruin arithmetic changes completely.
Where candidates lose it
The common loss is answering 2/5, the fair-coin answer, or guessing that 60% means roughly 60%. The edge changes the structure, and the interviewer wants to hear q over p.
The second is writing the formula with p/q instead of q/p, which gives a number below 40% for a coin that favours you. Sanity check the direction: an edge in your favour must raise the chance above the fair-coin 2/5.
What the interviewer asks next
- What is the chance of reaching Rs 5 from Rs 2 with a fair coin, and why is it exactly 2/5?
- The target is Rs 10 instead of Rs 5. What is the chance now?
- There is no target: you play until you go broke or forever. What is the chance you never go broke?
- How long does the game last on average from Rs 2?
Asked at Two Sigma, Research, New York, 2023 (Wall Street Oasis):
Biased gamblers ruin problems; Markov Chain problems; sampling uniformly from triangle
