Derivatives Foundation puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 66
- Topics
- 12
- Hard
- 29
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
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
083A price starts at 100 and moves up or down 1 each day with equal chance for 10 days. What is the probability that it touches 104 at some point in those 10 days?Exotics tradingQuant trading
Try it first
Which quantity is easier to count, and how does it relate to touching?
Show the worked solution
232 of the 1,024 paths touch 104, about 22.7%. A path ending at or above 104 must have touched it: that needs at least 7 up days, 176 paths. A path that touches 104 and ends below it can be reflected in the 104 line after its first touch, and the reflection ends above 104, needing at least 8 up days: 56 paths. The pairing is one to one, so the count is 176 + 56 = 232.
Why is the reflection a fair way to count?
Imagine a walker who reaches a wall at some point and then wanders on. Flip every step after the first touch, up for down, and you get another walker who also touched the wall at the same moment and is now the same distance on the other side of it. Each flipped step is as likely as the original, so the two walks have equal probability. Reflection pairs every path that touches 104 and finishes below it with exactly one path that finishes above 104, so the hard count becomes an easy count of endpoints. Paths that finish at exactly 104 are their own partners and are counted once.
A path that climbs to 104 by day 4 and ends at 100 is mirrored in the 104 line after the first touch into a path that ends at 108, and counting by endpoint gives 176 paths ending at or above 104 plus 56 mirrors of paths ending above it, 232 of 1,024 paths, which is 22.7%. How do the binomial counts fall out?
After 10 days of plus or minus 1, the position is 100 plus ups minus downs, which is 100 + 2 x ups - 10. Ending at or above 104 needs ups of at least 7: C(10,7) + C(10,8) + C(10,9) + C(10,10) = 120 + 45 + 10 + 1 = 176. Ending strictly above 104 means at or above 106, since the endpoint is always even, so ups of at least 8: 45 + 10 + 1 = 56. The probability of touching is (176 + 56)/1,024 = 232/1,024, about 22.7%, against only 176/1,024 = 17.2% for ending at or above 104. The gap is the 56 paths that visited the barrier and came back.
The relationshipS_10 the net move after ten days P(S_10 >= 4) paths ending at or above the barrier, 176 P(S_10 > 4) paths ending strictly above, which are the reflections of touch-and-return paths, 56 What it says in wordsThe chance of touching a level equals the chance of ending at or past it plus the chance of ending strictly past it.Say why a derivatives desk cares. A knock-out or one-touch option pays on exactly this event, and the reflection principle is how the closed-form barrier prices are derived in continuous time. The limitation is in the symmetry: reflection needs the up and down steps to be equally likely and the barrier to sit on the lattice. With a drift, or in continuous time with a non-zero rate, the reflected path is not equally likely and a correction factor appears, which is why barrier formulas carry that extra power of the barrier over the spot.
Where candidates lose it
The usual loss is answering the probability of ending at or above 104, 17.2%, and forgetting the paths that touched and came back. The interviewer asked about touching, and the difference is a quarter of the answer.
The second loss is trying to enumerate paths that stay below 104 by hand. There are 792 of them and no clean way to list them in the room. Reflection exists so you do not have to.
What the interviewer asks next
- What is the probability the price touches 104 and ends at 100?
- Change the odds to 55% up. Why does reflection stop working as stated?
- How does this count turn into the price of a one-touch option?
084Orders join a queue at a limit price at random at 2 a minute and are filled at random at 3 a minute. What fraction of the time is the queue empty, and how many orders are in it on average?DRWNew York · 2026
Try it first
What fraction of the time is the queue empty?
Show the worked solution
The queue is empty one third of the time and holds 2 orders on average. With arrivals at 2 a minute and fills at 3, the fill process is busy a fraction 2/3 of the time, so the queue is empty 1/3 of the time. Balancing flow across each arrow of the chain gives share(n + 1) = (2/3) share(n), a geometric ladder starting at 1/3, whose mean is (2/3)/(1/3) = 2.
Why does balancing flow across one arrow solve the whole chain?
Picture a ticket counter with one clerk. Over a long day, the number of times the queue grows from 3 people to 4 must equal the number of times it shrinks from 4 to 3, because you cannot go up through that boundary twice without coming back down through it once. In the long run the flow of arrivals across each boundary equals the flow of fills back across it, which pins the share of time in each state to the share in the state below. Arrivals push at 2 a minute times the share of time at n; fills pull at 3 a minute times the share at n + 1. Equal flows mean share(n + 1) = (2/3) share(n).
Arrivals at 2 a minute push the queue one state to the right and fills at 3 a minute pull it one state to the left, and balancing the two flows across every boundary makes the long-run share of each queue length two thirds of the one before, starting at one third for an empty queue and averaging 2 orders. How do the shares add up to one, and what is the mean?
The shares form a geometric series: share(0), share(0) x 2/3, share(0) x 4/9 and so on. They must sum to 1, and a geometric series with ratio 2/3 sums to 3 times its first term, so share(0) = 1/3. The mean number in the queue is the sum of n times share(n), which for a geometric ladder is the ratio over one minus the ratio: (2/3)/(1/3) = 2. A queue fed at two thirds of its capacity holds two orders on average, and because the mean is rho/(1 - rho) it explodes as arrivals approach fills. At 2.7 arrivals a minute the average would be 9; at 3 it is unbounded.
The relationshiplambda the arrival rate, 2 a minute mu the fill rate, 3 a minute pi_n the long-run share of time with n orders in the queue L the mean number of orders in the queue What it says in wordsEach queue length is two thirds as likely as the one below it, the empty state has share one third, and the average length is two.Two sentences that show you can use it. Little's law says time in the system equals mean number over arrival rate, 2/2 = 1 minute, so an order joining this queue expects to wait a minute to be filled, which is what a market maker deciding whether to post at this price wants to know. The limitation: the chain assumes memoryless arrivals and fills and no cancellations, and real order books have cancellations that depend on queue position, so the geometric shape is a first model, not a description.
Where candidates lose it
Candidates write the balance equations for every state at once and try to solve a system, then run out of time. The cut across a single boundary is the whole method: flow up equals flow down, so each share is a fixed multiple of the one below.
The second loss is answering zero for the empty fraction because orders keep arriving. Fills outpace arrivals, so the queue drains to empty regularly; it is empty exactly the fraction of time the fill process is idle.
What the interviewer asks next
- How long does an order expect to wait from joining to being filled?
- What happens to the average queue if arrivals rise to 2.7 a minute?
- Now orders can also be cancelled at 1 a minute each. How does the chain change?
Asked at DRW, Quantitative Research, New York, 2026 (Wall Street Oasis):
one on birth death chains
