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
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
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
040Five rational pirates, A the most senior down to E, split 100 gold coins. The most senior proposes a split; it passes if at least half of the pirates, his own vote included, agree, otherwise he is thrown overboard and the next most senior proposes. Each pirate wants to survive, then to get the most coins, then to see others thrown overboard. How should A split the coins to survive and keep the most?Old Mission CapitalNew York · 2014
Try it first
How many coins can A keep?
Show the worked solution
A proposes 98 for himself, 0 for B, 1 for C, 0 for D and 1 for E. Work backwards. With two pirates, D keeps 100, since his own vote is half. With three, C keeps 99 and gives E 1, because E gets nothing if C dies. With four, B keeps 99 and gives D 1. With five, A needs two other votes and buys the cheapest: C and E, who get nothing under B's plan, accept one coin each. A's vote plus two makes three of five.
Why does the answer come from the end of the game, not the start?
When you negotiate a price you think about what the other side does if you walk away; what they do next determines what they will accept now. Each pirate compares the offer in front of him with what he would get under the next proposal, so to know what A must offer you first need to know what B would do, which needs C, which needs D with two pirates left. With two pirates, D proposes 100 for himself; his own vote is one of two, which is half, so it passes and E gets nothing. That is the anchor. Every earlier step is a question of who gets zero in the next round, because those are the pirates whose votes are cheapest to buy.
Working up from two pirates, D keeps 100, C keeps 99 by paying E one coin, B keeps 99 by paying D one coin, and A keeps 98 by paying C and E one coin each, the two pirates who would receive nothing under B's proposal. How does each proposer decide whose vote to buy?
He buys exactly the number of extra votes he needs, from the pirates who are cheapest, and a pirate is cheap if the next proposal gives him nothing. With three pirates, C needs one more vote; under D's plan E gets zero, so C offers E one coin and keeps 99, and E accepts because one is better than zero. With four, B needs one more; under C's plan D gets zero, so B pays D one coin. With five, A needs two more votes, and under B's plan the pirates with nothing are C and E, so A pays them one coin each and keeps 98; offering anything to B or D is wasted, because B would get 99 and D one coin without A, and neither can be bought for less. The alternation is the pattern to say out loud: each round, the pirates who were paid last time are the ones left out this time.
The relationshipeach tuple coins to the proposer first, then to the others in order of seniority the 1s votes bought for one coin from pirates who would get zero in the next round votes needed half of the pirates, rounded up, including the proposer: 1 of 2, 2 of 3, 2 of 4, 3 of 5 What it says in wordsEach proposer keeps everything except one coin for each extra vote he needs, bought from whoever the next round would leave empty-handed.What assumptions is the answer resting on, and what happens when they change?
Three assumptions, and the interviewer will test at least one. Pirates are perfectly rational and know the others are. A pirate who is indifferent between two outcomes prefers the one where a rival is thrown overboard, which is why a bought pirate must be paid one coin and not zero. And the voting rule is at least half, with the proposer voting. Change the rule to a strict majority of all votes and the two-pirate case flips, D cannot pass anything and dies, so E would reject everything in the three-pirate round, and the whole ladder shifts. With a strict majority of the other pirates' votes the ladder shifts again, and a candidate who re-derives it from the two-pirate anchor is the one who gets hired. The limitation is that real negotiators are not this rational; the puzzle is a model of backward induction, not of pirates.
Where candidates lose it
The common loss is reasoning forward from fairness, offering 20 each or 50 for A, and being unable to say why those numbers rather than others. Fairness is not in the rules; survival and coins are.
The second is paying the wrong pirates. B and D would do well without A and cannot be bought cheaply; C and E would get nothing. Candidates who pay B and D have not worked out the four-pirate round.
What the interviewer asks next
- The proposal now needs a strict majority of all votes. What does A propose?
- The proposal needs a majority of the other pirates' votes, excluding the proposer. Does A survive?
- There are 6 pirates. How does the pattern continue?
- What if a pirate who is indifferent prefers to keep the proposer alive?
Asked at Old Mission Capital, Prop Trading, New York, 2014 (Wall Street Oasis):
There are 5 pirates and they are trying to split 100 gold coins in a rational way.
045Two players each ante Rs 1 and receive one card from an ace, a king and a queen. Player one may bet Rs 1 or check, and a check goes straight to showdown. Facing a bet, player two may call or fold. How often should player one bluff with the queen, and how often should player two call with the king?Old Mission CapitalNew York · 2022
Try it first
How often should player one bet the queen?
Show the worked solution
Player one bets the ace always, checks the king, and bluffs the queen one time in three; player two calls with the ace, folds the queen, and calls with the king one time in three. The bluff rate makes one bet in four a bluff, which is the break-even for a call of 1 into a pot of 3. The king's call rate makes player two fold one time in three overall, the break-even for a bluff of 1 into a pot of 2. Player one gains 1/18 of a rupee a hand.
Which decisions are obvious, and which one is the real question?
Start by removing the choices nobody would make. Player one always bets the ace, since it wins every showdown, and player two always calls with the ace and folds with the queen, since those cards win or lose every time; the only real decisions are player one's queen and player two's king. Player one's king should check: if it bets, player two calls only with the ace and folds the queen, so the bet loses 2 half the time and wins 1 half the time, an average of -0.5, worse than the 0 a showdown gives. That leaves two numbers to find, the queen's bluff frequency and the king's calling frequency, and each is set to make the other player's choice a matter of indifference.
How do you find the bluffing frequency?
A goalkeeper who always dives left is easy to beat; a penalty taker mixes his side so the keeper gains nothing by guessing. Poker equilibrium works the same way. Player one bluffs just often enough that player two's king gains nothing by calling over folding, and player two calls just often enough that player one's queen gains nothing by bluffing over checking. Facing a bet with the king, folding loses the ante, -1. Calling wins 2 against a bluff and loses 2 against the ace. With the ace always bet and the queen bet a fraction b of the time, a bet is a bluff with probability b / (1 + b). Setting the call's value equal to -1 gives b = 1/3, so one bet in four is a bluff.
The relationshipb how often player one bets the queen c how often player two calls with the king -1 the value of the alternative: folding the king, or checking the queen, each loses the ante 1/2 given the queen, player two holds the ace or the king with equal chance What it says in wordsEach player's frequency is chosen so that the other player's two choices are worth the same.Player one bets the ace, checks the king and bluffs the queen one time in three, while player two calls with the ace, folds the queen and calls with the king one time in three, because those frequencies leave each player's marginal choice worth exactly the same either way. How do you sanity check the frequencies, and who wins the game?
Use pot odds as the check. Player two calls 1 to win a pot of 3, two antes and the bet, so a call breaks even when bluffs are 1 / (3 + 1) of bets, a quarter, which is what b = 1/3 delivers. Player one bluffs 1 to win the pot of 2, so a bluff breaks even when player two folds 1 / (2 + 1) of the time; he folds the queen always and the king two times in three, which averages to one in three. Average over the six deals and player one gains 1/18 of a rupee a hand, because only he can bet; neither player can improve on that by changing his own frequency. Against a player two who never calls with the king, bluffing every queen would earn 1/6 of a rupee a hand instead of 1/18. The limitation is that equilibrium is a defence, not the most profitable play against a predictable opponent; a desk uses it as the baseline and then leans towards the other side's mistakes.
Where candidates lose it
The common loss is saying player one should never bluff because the queen cannot win a showdown. Without bluffs player two simply folds his king to every bet, and player one's ace stops getting paid.
The second is giving the bluff rate as a quarter. A quarter is the share of bets that are bluffs; because the ace is always bet, that needs the queen bet one time in three. Keep the two fractions apart and say which one you mean.
What the interviewer asks next
- Player two may also bet after player one checks. How does the equilibrium change?
- The bet size doubles to Rs 2. What are the new bluffing and calling frequencies?
- Player two never calls with the king. What is player one's best response, and what does it earn?
- Why does player one never want to bet the king?
Asked at Old Mission Capital, Quantitative Research, New York, 2022 (Wall Street Oasis):
Asking to find the game theory optimal strategy in a simplified poker game
