Hedge Funds puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 38
- Topics
- 14
- Hard
- 30
008A stock closes at 100, 96, 104, 99, 110, 105 and 112 on seven days, and short selling is not allowed. What is the maximum profit from one buy and one sell, and from any number of round trips?Man GroupLondon · 2019
Try it first
What is the most you can make with any number of round trips?
Show the worked solution
One round trip makes at most 16; unlimited round trips make 26. For one trade, walk the prices once, carrying the lowest price so far and the best sale against it: buy at 96, sell at 112. For many trades, add every day-on-day rise and skip every fall: 8 + 11 + 7 = 26. Without short selling the falls are simply sat out, never profited from.
How do you find the best single trade without checking every pair?
Imagine walking down a street of shops that all sell the same phone, planning to buy once and sell once further along. You do not need to compare every pair of shops: carry the cheapest price seen so far in your head, and at each shop ask what selling here would make against it. One pass, keeping the running minimum and the best gap found so far, gives the best single trade. Here the running minimum drops to 96 on day 2 and the best gap appears on day 7: 112 - 96 = 16.
The best single trade buys at 96 on day 2 and sells at 112 on day 7 for 16, while trading every rising leg, 96 to 104, 99 to 110 and 105 to 112, collects 8 + 11 + 7 = 26. Day Price Move Lowest so far Best single trade so far Sum of rises so far 1 100 100 0 0 2 96 -4 96 0 0 3 104 +8 96 8 8 4 99 -5 96 8 8 5 110 +11 96 14 19 6 105 -5 96 14 19 7 112 +7 96 16 26 One pass through the prices tracks both answers at once: the running minimum gives the best single trade, 16, and the running sum of positive moves gives the many-trade maximum, 26. Why is the many-trade answer just the sum of the rises?
Any rise from a low to a later high is the sum of the daily steps inside it, and some of those steps may be falls. With no short selling and no costs, the most you can make is the total of every positive day-on-day move, 26 here, because trading only the up steps collects everything a longer trade would and skips its falls. In practice that is three round trips: buy 96, sell 104; buy 99, sell 110; buy 105, sell 112.
What does the interviewer add next?
Costs. Once each round trip costs something, the sum of rises overstates the profit, because small moves stop being worth trading. With a cost of 6 per round trip, the three separate trades net 2 + 5 + 1 = 8, the best two-trade split nets 9, and the single trade from 96 to 112 nets 10, so the single trade now wins. The general version is a short dynamic programme that tracks the best profit on each day while holding and while flat.
Where candidates lose it
For the first part, candidates take the lowest and highest prices without checking the order. Here they happen to line up, 96 before 112, but an interviewer who swaps two prices will catch anyone who never checked that the low comes first.
For the second, the loss is counting falls as profit, which needs a short sale the question forbids, or stopping at 16 because it is the best single trade. Say the rule plainly: bank every rise, sit out every fall.
What the interviewer asks next
- What if each round trip costs 6?
- What if you may make at most two round trips?
- How does the answer change if short selling is allowed?
Asked at Man Group, Alternative Investments, London, 2019 (Wall Street Oasis):
Given a series of prices, find the one buy/sell trade pair which gives the maximum profit
033Make a two-way market on the sum of three fair dice. Then one die is revealed to be a 6. Where do you move your market, and should it get wider or narrower?CitadelLondon · 2026
Try it first
After the 6 is shown, what happens to your market?
Show the worked solution
Move the mid from 10.5 to 13 and tighten the market by about a fifth. Each die averages 3.5, so three dice average 10.5. Once one die shows 6, the sum is 6 plus two unknown dice averaging 7, which is 13. The variance falls from 3 x 35/12 to 2 x 35/12, so the standard deviation drops from 2.96 to 2.42. If the first market was 9.5 at 11.5, the new one is about 12.2 at 13.8.
Where do you put the first market, and how wide?
Start from the fair value and then decide the width from how uncertain the outcome is. The mid is the expected sum, 3 x 3.5 = 10.5, and the width should scale with the standard deviation of the sum, because that is how far the answer typically lands from the mid. One die has variance 35/12, so three independent dice have 35/4 = 8.75, a standard deviation of 2.96. A market of 9.5 bid, 11.5 offered is a reasonable opening: tight enough to trade, with room for your edge.
What does revealing one die change?
A weather forecast for tomorrow is more precise than one for next week, because fewer things can still change. Once one die is known, it contributes a certain 6 and no uncertainty, so the mid rises by 2.5 and only two dice of variance remain. The mid becomes 6 + 7 = 13. The variance becomes 35/6, a standard deviation of 2.42, down from 2.96. Scale the width by the same ratio, about 0.82, and a 2.0 wide market becomes about 1.6 wide: 12.2 at 13.8.
Before the reveal the sum is centred on 10.5 with a standard deviation of 2.96; after one die shows 6 it is centred on 13 with a standard deviation of 2.42, so the market moves up by 2.5 and tightens from 2.0 wide to about 1.6. Say what would make you widen instead. If the person revealing the die can choose which die to show, or picks the moment, the reveal itself carries information and you should be more careful, not less. A 6 chosen as the highest of three tells you the other two are 6 or lower, and they no longer average 7. Interviewers like it when you ask who chose what to reveal before you requote.
Where candidates lose it
The common loss is widening after the 6 because it feels like a shock. A shock that is fully known removes uncertainty. The mid jumps, but the range of outcomes shrinks.
The second loss is moving the mid by the full 6, or to 16.5 as if all dice were sixes. Only the revealed die is known; the other two still average 3.5 each.
What the interviewer asks next
- A second die is revealed as a 1. Where is your market now?
- The revealer chose to show the highest of the three dice. Where do you quote?
- Someone lifts your 13.8 offer straight away. What do you do next?
Asked at Citadel, Quantitative Research, London, 2026 (Wall Street Oasis):
3rd I got rejected it was different brainteasers and trading game
045You make a market on the number of heads in 10 fair coin flips: 4.5 bid, 5.5 offered. A counterparty who has already seen the first three flips lifts your offer. What does the trade tell you, and where do you requote?CitadelNew York · 2025
Try it first
Given that they bought at 5.5, the fair value is about
Show the worked solution
The lift says they saw at least two heads, so the fair value is now at least 5.75, not 5; requote around 5.75 bid, 6.5 offered. The other seven flips are worth 3.5 heads, so the buyer's value is heads seen plus 3.5. Paying 5.5 only makes sense with two heads (5.5) or three (6.5). Those are 3 to 1 likely, giving 5.75; a buyer who needs a strict edge saw three heads, worth 6.5.
What is the trader's view before they trade?
A friend offers to buy your raffle ticket after the first few numbers are drawn. The offer itself is the warning. The informed trader values the contract at heads already seen plus 3.5, the expected heads in the seven unseen flips, so their value is 3.5, 4.5, 5.5 or 6.5 with chances 1, 3, 3 and 1 in 8. Against your market of 4.5 bid and 5.5 offered, they buy only if their value is at least 5.5, and sell to you at 4.5 only if it is 4.5 or less. The flat 5 you quoted around is right only for someone who has seen nothing.
The informed trader's value is 3.5, 4.5, 5.5 or 6.5 depending on how many heads they saw, so a lift at 5.5 means two or three heads, and weighting those 3 to 1 puts the fair value given the trade at 5.75, above your 5.5 offer. How do you turn the trade into a new fair value?
Condition on the fact that they traded. Only the two-head and three-head worlds produce a buy at 5.5, and they are 3/8 and 1/8 likely, so given a lift the value is (3 x 5.5 + 1 x 6.5) / 4 = 5.75. If you assume they would not bother trading at zero edge, only the three-head world is left and the value is 6.50. Either way you sold too cheaply: this is adverse selectionThe tendency of a market maker to trade most with the people who know more, so the trades that happen are the ones that lose money for the market maker., and it is the cost every market maker prices into the spread.
Now requote. Your bid should not be below what you now believe the floor is, and your offer should sit where even the best informed buyer has no edge. Something like 5.75 bid, 6.5 offered does both: a buyer who saw three heads is indifferent at 6.5, and you are no longer selling below value. Cut your size too, because you know someone is trading with more information than you, and say you would ask whether they could see the flips before quoting again.
Where candidates lose it
The common loss is staying at 5 because the coin is fair. The coin is fair; the counterparty is not uninformed. The trade itself carries information and you must update on it.
The other loss is overreacting and moving to 8 or 9, as if the trader knew all ten flips. They saw three. Condition on what could have made them trade, weight those worlds, and move by exactly that much.
What the interviewer asks next
- The same trader then hits your new bid. What do you conclude?
- How wide should your first market have been if you knew one counterparty could see three flips?
- What if the trader had seen the first three flips but traded a small size and then a large size?
Asked at Citadel, Quantitative Trading, New York, 2025 (Wall Street Oasis):
Superday was more market-making but requires very sold foundation in math and statistics.
