Hedge Funds puzzles, solved step by step
- Puzzles
- 100
- Traced to a firm
- 38
- Topics
- 14
- Hard
- 30
021A stock with 20% annual volatility and no drift starts at Rs 100. Roughly what is the chance it ends the year more than 10% higher, and what is the chance it touches Rs 110 at some point during the year?Quant and systematic fundsProp and quant trading firms
Try it first
How does the chance of touching 110 compare with the chance of finishing above it?
Show the worked solution
About 31% to finish above Rs 110, and about 62% to touch it during the year. A 10% move is half of one year's 20% standard deviation, and a normal variable ends more than half a standard deviation up 30.9% of the time. By the reflection principle, every path that touches 110 and ends below has a mirror twin that ends above, so touching is twice as likely as finishing above: 61.7%.
Why is finishing above 110 about a one in three chance?
Scale the move by the volatility. Over one year the price spreads out with a standard deviation of about Rs 20, so Rs 110 is half a standard deviation above the start, and a normal variable finishes more than half a standard deviation up 30.9% of the time. Treating the price as an arithmetic random walk is close enough for a 10% move; a lognormal model, in which prices cannot go negative, gives a slightly lower figure, about 28%. Say you are approximating, and say which way the error runs.
A path that touches 110 and ends below it has a mirror twin, reflected in the barrier after the first touch, that ends above it, so the chance of touching 110 during the year, 61.7%, is twice the chance of finishing above it, 30.9%. Why is touching twice as likely as finishing above?
Think of a walker on a foggy path who is equally likely to step forward or back. Once she reaches a marker post, her remaining steps are a fair coin again: from the post she is as likely to end past it as short of it. So for every path that touches 110 and ends below, reflecting the part after the touch gives an equally likely path that ends above; touching paths split evenly between the two. Every path that ends above must have touched on the way, so the chance of touching is twice the chance of ending above.
The relationshipb the barrier, Rs 110 S_T the price at the end of the year 0.5 the barrier's distance in standard deviations: 10 / 20 What it says in wordsFor a driftless continuous walk, the chance of ever reaching a level is double the chance of finishing beyond it.Where does the factor of two matter on a desk?
Anything that triggers on a touch rather than on the finish. A stop-loss set 10% away is hit about twice as often as the price ends beyond it, and an option that pays on a touch is worth roughly twice one that pays only if the price finishes past the same level. The limitation: the factor of two holds for a driftless, continuously watched walk. Drift, jumps and checking the price only at the daily close all move it, and a checked-daily barrier is touched a little less often than a continuous one.
Where candidates lose it
The common error is answering the touch question with the finishing probability, 31%, as though the path does not matter. A price can visit 110 in March and be back at 100 by December, and the question asked about the visit.
The second is forgetting to scale by volatility. Ten per cent sounds small, but against 20% a year it is half a standard deviation, not a rare event. Say the scaling first, then the number.
What the interviewer asks next
- What is the chance the stock touches Rs 90 during the year?
- Roughly what is the chance it touches both 110 and 90?
- How does a positive drift change the ratio between touching and finishing above?
071You start with Rs 10 and bet Rs 1 at a time on a game you win with probability 0.55, winning or losing Rs 1 each round. What is the chance you reach Rs 20 before you go broke?Two SigmaNew York · 2023
Try it first
Roughly what is the chance of reaching Rs 20 first?
Show the worked solution
About 88%. Let r be the ratio of losing to winning odds, 0.45/0.55 = 9/11. The chance of reaching Rs 20 from Rs 10 is (1 - r to the 10th)/(1 - r to the 20th), which simplifies to 1/(1 + r to the 10th). Since r to the 10th is about 0.134, the answer is 1/1.134, about 88.1%. A fair game would give exactly 50%.
Why does a small edge per bet become a large edge on the game?
Think of a tug of war between two teams, one a shade stronger. A single pull is close to a coin toss, but the rope has to travel a long way before either side wins, and every pull leans the same way. Reaching Rs 20 or Rs 0 takes many Rs 1 bets, and the 0.55 edge applies to every one of them, so the chance of winning the whole game rises far above 0.55. Staking all Rs 10 on one bet would give only 55%; betting Rs 1 at a time gives about 88%.
How do you get the formula?
Let P(i) be the chance of reaching 20 from a stake of i. One bet later you are at i + 1 with chance p or i - 1 with chance q, so P(i) = p P(i + 1) + q P(i - 1), with P(0) = 0 and P(20) = 1, and the solution is P(i) = (1 - r to the i)/(1 - r to the 20), where r = q/p. For a fair game the formula collapses to a straight line, P(i) = i/20, because a fair game keeps your expected wealth at 10, so 20 times P must equal 10. Checking the fair case is the fastest way to trust the biased one.
The relationshipP(10) the chance of reaching Rs 20 before Rs 0 from Rs 10 r the ratio of the losing chance to the winning chance r^20 the same ratio over the full distance of Rs 20 What it says in wordsThe chance of success from the middle is one over one plus the odds ratio raised to the distance to either end.Betting Rs 1 a time from Rs 10, a fair game reaches Rs 20 first 50% of the time, a 0.55 edge lifts that to 88.1% and a 0.45 disadvantage cuts it to 11.9%, because the small edge on each bet compounds over the many bets the game takes. How do you compute r to the tenth in your head, and what is the lesson?
Square repeatedly: 9/11 squared is 81/121, about 0.669; squared again about 0.448; again about 0.201; times 0.669 gives about 0.134. The desk lesson is about sizing: with an edge, make many small bets so the edge compounds; without one, the same arithmetic works against you, and at 0.45 the Rs 1 strategy reaches Rs 20 only 12% of the time against 45% for one bold bet. This is the classic gambler's ruinThe problem of a gambler betting fixed amounts until reaching a target or losing everything, solved as a random walk with two absorbing ends. result, and it is why a trader with a real but thin edge wants volume, not size.
Where candidates lose it
The common wrong answer is 55%, the chance of winning one bet, carried over to the whole game. It ignores that the game takes many bets and the edge applies to each of them.
The second loss is setting up the recursion and getting lost in the algebra. Write the answer in the form 1/(1 + r to the 10th), check it on the fair case, and compute the power by repeated squaring.
What the interviewer asks next
- With a win probability of 0.45, should you bet Rs 1 at a time or everything at once, and why?
- How many rounds do you expect the game to last at p = 0.5?
- The casino has unlimited money and you never stop at Rs 20. What is your chance of eventual ruin at p = 0.55?
Asked at Two Sigma, Research, New York, 2023 (Wall Street Oasis):
Biased gamblers ruin problems; Markov Chain problems; sampling uniformly from triangle
096You roll a fair die repeatedly and keep a running total. What is the probability that the total is ever exactly 10? What does the answer approach for large targets?Quant and systematic fundsProp and quant trading firms
Try it first
Roughly what is the chance the running total ever hits exactly 10?
Show the worked solution
About 0.289, and it settles at 2/7, about 0.286, for large targets. Let p(n) be the chance the total ever equals n. To hit n, the total must first land on one of n - 1 to n - 6 and then roll exactly the gap, each with chance 1/6, so p(n) is the average of the six values before it, with p(0) = 1. Working up gives p(10) = 0.2893. Totals advance 3.5 a roll on average, so they land on 1 number in 3.5.
How do you set up the recursion?
Think about the last roll before the total reaches n. The total can land exactly on n only by first landing on one of n - 1 down to n - 6 and then rolling exactly the gap, each with chance 1/6, so p(n) = (1/6)[p(n - 1) + ... + p(n - 6)]. Start with p(0) = 1, because you begin at zero, and p of any negative number = 0. Then p(1) = 1/6, p(2) = 7/36, p(3) = 0.227, and so on up to p(10) = 0.2893.
The chance of ever landing on a total climbs from 1/6 at 1 to a peak of 0.360 at 6, then wobbles and settles onto 2/7, about 0.286; the target of 10 is hit with probability 0.289. Why does the answer settle at 2/7?
Picture stepping stones across a river, where each stride covers 1 to 6 stones with equal chance. Over a long walk you touch about one stone in every 3.5, because that is your average stride. The running total advances 3.5 per roll on average, so in the long run it lands on a fraction 1/3.5 = 2/7 of all numbers, and each far-off target is hit with probability close to 2/7. The early values wobble: p(6) is the highest, 0.360, because 6 is the last total a single roll from zero can reach directly, and the wobbles die out by about 20.
The relationshipp(n) the chance the running total ever equals n p(n - k) the chance of standing k below the target, one roll away E[roll] the average roll of a fair die, 3.5 What it says in wordsEach total's chance is the average of the six before it, and in the long run the totals land on one number in every 3.5.Why would a quant interviewer ask for a table or code here?
Because the recursion is dynamic programmingSolving a problem by building up answers to smaller versions of it and reusing them, instead of recomputing from scratch.: each value reuses the six before it, so a table of ten numbers is faster and safer than listing every sequence of rolls that sums to 10. Say the recursion, compute a few terms out loud, and give the limit with its reason; that is the complete answer. Do not try to enumerate paths: there are 492 ordered ways to reach 10 with rolls of 1 to 6, each with its own probability.
Where candidates lose it
The quick answers are 1/6, reasoning that some roll must land on 10 with one chance in six, and 2/7 stated as exact. The first ignores that most runs skip straight over 10; the second is close but is the long-run limit, and 10 is not yet far enough out for it to be exact.
The second loss is trying to count paths. Set up the recursion in one line instead and let it do the counting.
What the interviewer asks next
- What is the probability that the running total ever equals exactly 6?
- With a coin that adds 1 or 2 instead of a die, what does the hit probability approach?
- How would you write this as a dynamic programme in a few lines of code?
