Hedge Funds puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 38
- Topics
- 14
- Hard
- 30
011An ant starts at one corner of a cube and at each step walks along an edge to a randomly chosen neighbouring corner. What is the expected number of steps until it first reaches the opposite corner?Quant and systematic fundsProp and quant trading firms
Try it first
Pick your estimate before you set anything up.
Show the worked solution
10 steps. Group the eight corners by how many edges separate them from the target: one corner at distance 3, three at 2, three at 1, and the target itself. From 3 the ant must move to 2; from 2 it slips back to 3 one time in three; from 1 it reaches the target one time in three. Solving the three equations gives 10 from the start, 9 from distance 2 and 7 from distance 1.
How do you turn eight corners into four states?
Ask a lost tourist how far they are from the station, not which street they are on. Every corner at the same distance from the target behaves the same way, so the distance is all you need to track. Collapsing the cube by distance turns eight corners into four states, 3, 2, 1 and 0, and the walk becomes a short chain. From distance 3 all three neighbours are at distance 2. From 2, one neighbour is back at 3 and two are at 1. From 1, two neighbours are at 2 and one is the target.
Grouped by distance from the target, the ant moves from 3 to 2 for certain, from 2 forward with probability two thirds, and from 1 home with probability one third, which gives expected times of 10, 9 and 7 steps from distances 3, 2 and 1. The relationshipE_k the expected steps still needed from a corner at distance k 1 the step being taken now What it says in wordsEach expected time is one step plus the average of the expected times from wherever that step lands.How do you solve the equations quickly?
Substitute from the two ends into the middle. Put E3 = 1 + E2 and E1 = 1 + 2E2/3 into the middle equation and it collapses to E2 = 2 + 7E2/9, so E2 = 9, E3 = 10 and E1 = 7. Then sanity-check the odd-looking one: from distance 1 the ant sits right next to the target yet still needs seven steps on average, because two of its three moves lead away. A number that surprises you is worth one sentence of explanation, not a recalculation.
What is the skill a fund is actually testing?
The same first-passage logic tells you how long a mean-reverting spread takes to reach a target or a stop, and how many moves a process needs to hit a barrier. Whenever many states behave alike, lump them, write one equation per lumped state, and solve: that is the skill, and the cube is only the costume. Candidates who write eight equations, one per corner, get the right answer too, but too slowly for the room.
Where candidates lose it
Answering 3, the length of the shortest path, is the fast mistake. The ant does not know where it is going, and from every corner except the start it is at least as likely to wander as to advance.
The slower mistake is writing eight equations, one per corner. It works, but it takes far longer than the interview allows. Say the symmetry out loud first: corners at the same distance are interchangeable.
What the interviewer asks next
- What is the expected number of steps for the ant to return to its starting corner?
- What if the ant stays put with probability one half at each step?
- On a square, what is the expected time to reach the opposite corner?
036A regime model says a bull month is followed by another bull month 90% of the time, and a bear month by another bear month 80% of the time. In the long run, what share of months are bull months?Quant and systematic fundsProp and quant trading firms
Try it first
Long-run share of bull months:
Show the worked solution
Two thirds of months are bull months, whatever the starting state. In the long run the number of months switching from bull to bear must equal the number switching back. 10% of bull months switch out and 20% of bear months switch in, so 0.1 x bull = 0.2 x bear, which makes bull twice as common as bear: 2/3 against 1/3. A second route: bull spells last 10 months on average and bear spells 5.
What has to balance in the long run?
Think of a shop with people walking in and out all day. Once the crowd inside stops growing or shrinking, the number walking in each minute must equal the number walking out. In the long run, the flow from bull to bear must equal the flow from bear to bull, because otherwise one state would keep filling up. The flow out of bull is 10% of bull months; the flow out of bear is 20% of bear months. Setting 0.1 x bull equal to 0.2 x bear, with bull plus bear equal to 1, gives bull = 2/3.
Bull months turn bear 10% of the time and bear months turn bull 20% of the time, so the long-run share of bull months is two thirds, and a chain started in either state is within a few points of two thirds after about a year. How do you check two thirds another way?
Use the length of each spell. A state you leave with probability p each month lasts 1/p months on average, so bull spells last 10 months and bear spells 5. Spells alternate, so over a long stretch the market spends 10 months bull for every 5 bear: 10 out of 15 is two thirds. Two methods that agree is what the interviewer is listening for.
The relationshippi_bull the long-run share of bull months 0.1, 0.2 the chances of leaving bull and leaving bear each month 0.7 how much of any starting gap survives each month What it says in wordsThe long-run share of a state is the chance of entering it divided by the total chance of switching, and the start is forgotten at a rate of 0.7 a month.Answer the part of the question people skip: why the starting state does not matter. The gap between today's odds and two thirds shrinks by a factor of 0.7 every month, so after 12 months only 1.4% of it is left. A model this sticky still forgets its starting point within about a year, which is why regime forecasts beyond a few months mostly return the long-run average.
Where candidates lose it
The first loss is answering 90%, the one-step persistence, as if it were the long-run share. The second is saying it depends on today's state, which is true for next month and false for the long run.
Set up the flow balance in one line, give two thirds, then check it with spell lengths of 10 and 5 months. If you have time, say how fast the start is forgotten: 0.7 a month.
What the interviewer asks next
- Today is a bear month. What is the chance that the month after next is a bull month?
- How long does the average bear spell last, and what is the chance one lasts more than a year?
- How would you estimate the two transition probabilities from 20 years of monthly data, and how wide would the error be?
061How many flips of a fair coin do you expect to need before you see two heads in a row? Why is the answer different if you wait for a head followed by a tail?Squarepoint CapitalLondon · 2025
Try it first
What are the expected waits for HH and for HT?
Show the worked solution
Six flips on average for two heads in a row, and four for a head then a tail. Track how far along the pattern you are. For HH, a tail at any point sends you back to the start, including right after a head. For HT, a head after a head keeps you one step away, so progress is never lost. Solving the two small chains gives 6 and 4.
Why do two equally likely patterns take different times?
Think of two ladders where a slip costs you differently. On one, slipping from the first rung drops you to the ground; on the other, you can only ever slip back to the first rung. Both patterns are equally likely in any given pair of flips, but after one head the wrong next flip costs you everything for HH and nothing for HT. A head then a tail breaks HH and restarts it; a head then a head is still a perfect start for HT.
In the HH chain a tail from the one-head state falls back to the start, so the expected wait is 6 flips; in the HT chain a head from the one-head state stays where it is, so progress is never lost and the wait is 4 flips. How do you solve the chain?
Let E0 be the expected flips still needed from the start and E1 after one head. For HH, E0 = 1 + E1/2 + E0/2 and E1 = 1 + E0/2, because a tail from one head sends you back, and these solve to E1 = 4 and E0 = 6. For HT, the one-head state just waits for a tail, which takes 2 flips on average, and reaching the first head takes 2 more, giving 4. Say the states out loud before the algebra; the interviewer wants to hear them named.
The relationshipE0 expected flips still needed from the start E1 expected flips still needed after one head 1 the flip you are about to make What it says in wordsEach state's expected wait is one flip plus the average wait from wherever that flip sends you.What is the general pattern?
Patterns that can fail back to nothing take longer. The expected wait for n heads in a row is 2 to the power n + 1, minus 2: 2, 6 and 14 flips for one, two and three heads. This is a Markov chainA process whose next step depends only on the current state, not on how it got there, so it can be solved state by state. at heart, and the same state-by-state method handles anything that depends on a path: a streak, a barrier, a drawdown rule on a trading book.
Where candidates lose it
The usual wrong answer is 4 for both, reached by noting that each pattern has a one-in-four chance in a pair of flips. That treats the flips as separate pairs, which they are not: a pattern can start at any flip, and what happens after a failure depends on the pattern.
The second loss is setting up one equation instead of two. Name the states, start and one head, and write one equation for each.
What the interviewer asks next
- How many flips do you expect to need for three heads in a row?
- Two players race: one wins at the first HH, the other at the first HT. Who is more likely to win?
- With a coin that lands heads 60% of the time, how long do you expect to wait for HH?
Asked at Squarepoint Capital, Quantitative Research, London, 2025 (Wall Street Oasis):
statistical problems e.g. # of throws expected to get 2 heads in a row
086A stock ticks up or down by Rs 1 each minute with equal probability, starting at Rs 50. On average, how many minutes pass before it first touches Rs 45 or Rs 55?Quant and systematic fundsProp and quant trading firms
Try it first
Pick your answer before setting up any equation.
Show the worked solution
25 minutes. Let E(k) be the expected minutes to exit from price k. Each minute costs one and moves the price up or down with equal chance, so E(k) = 1 + half E(k + 1) + half E(k - 1), with E(45) = E(55) = 0. The solution is E(k) = (k - 45)(55 - k), the product of the distances to the two barriers. From Rs 50 that is 5 x 5 = 25.
Why is the answer not 5 minutes?
Think of someone pacing a corridor, taking one step forward or back on each coin toss. After 25 steps they are not 25 steps away; typically they are about 5 away, because the steps keep undoing each other. A fair random walk covers distance like the square root of time, so reaching a barrier 5 away takes on the order of 5 squared, 25 steps, not 5.
Three sample paths from Rs 50 leave the Rs 45 to Rs 55 channel after 11, 23 and 45 minutes; averaged over all paths the exit takes (50 - 45) x (55 - 50) = 25 minutes, and from Rs 48 or Rs 46 it takes 21 or 9. How do you get exactly 25?
Set up the one-step equation. From any price k strictly between the barriers, you spend one minute and then stand at k + 1 or k - 1 with equal chance. E(k) = 1 + half E(k + 1) + half E(k - 1) says the second difference of E is always minus 2, so E is a downward parabola that is zero at both barriers. The only such parabola is (k - 45)(55 - k). Check a point: from Rs 46 it gives 1 x 9 = 9 minutes, and it passes the one-step test, since 1 plus half of E(47), which is 16, plus half of E(45), which is 0, is 9.
The relationshipa, b the lower and upper barriers, Rs 45 and Rs 55 k the starting price E(k) the expected number of one-minute steps before either barrier is touched What it says in wordsFor a fair walk, the expected time to leave a channel is the distance to the floor times the distance to the ceiling.What does the shape tell a trader?
Starting in the middle is the slowest place to be, and an off-centre start is much faster: from Rs 48 the answer is 3 x 7 = 21 minutes, and from Rs 46 only 9. Doubling both distances quadruples the expected time: barriers at Rs 40 and Rs 60 give 100 minutes. That is the arithmetic behind why widening a stop and a profit target together makes a trade live much longer. It holds only for a fair walk: if the stock ticks up 60% of the time, the exit comes sooner, about 19.2 minutes, and mostly at the top.
Where candidates lose it
The quick wrong answer is 5 minutes, which treats the walk as if it moved steadily towards one barrier. A fair walk wanders, and the interviewer is checking whether you know that distance grows with the square root of time.
The second loss is reaching 25 from the square-root intuition without being able to show it. Write the one-step equation and the parabola; that is what turns a good guess into an answer.
What the interviewer asks next
- What is the probability the stock touches Rs 55 before Rs 45?
- From Rs 50, the barriers move to Rs 40 and Rs 55. What is the expected time now?
- The stock ticks up with probability 0.6. Why does the expected time fall?
