Quant Technical Interview Questions: Pete Benson Pbenson@umich - Edu
Quant Technical Interview Questions: Pete Benson Pbenson@umich - Edu
Pete Benson
[email protected]
Department of Mathematics
530 Church Street, 2082C East Hall
Ann Arbor, MI 48109-1043, USA
Contents
1 General math 2
2 Linear Algebra 3
3 Probability 4
4 Options 6
5 Risk Management 7
7 Fixed Income 10
8 Brain Teasers 11
1
Chapter 1
General math
√
√ √2 2...
1.1 [CRACK] What is the value of 2 ?
√
q p
1.2 For what positive values of a is a + a + a + ... an integer?
Z
dx
1.3 What is ?
1 + x2
Z ∞
2
1.4 Find e−x dx.
0
∞
X √
1.5 Does π− n
exist?
n=1
2
Chapter 2
Linear Algebra
2.3 What does the rank of a square matrix tell you about its eigenvalues?
2.9 What numerical issues arise when doing Cholesky decomposition on a ma-
trix that is not PD? How can you address this issue?
3
Chapter 3
Probability
3.1 You have a bag with two coins. One will come up heads 40% of the time,
and the other will come up heads 60%. You pick a coin randomly, flip it and
get a head. What is the probability it will be heads on the next flip?
3.2 What is the Law of Large Numbers? The Central Limit Theorem? Give
an example(s) of a distribution that satisfies one, but not both.
3.3 In front of you is a jar of 1000 coins. One of the coins has two heads,
and the rest are fair coins. You choose a coin at random, and flip it ten times,
getting all heads. What is the probability it is one of the fair coins?
3.4 Suppose you have a fair coin, and you flip it a million times. Estimate the
probability that you get fewer than 499,000 heads.
3.5 [STRAWA] Starting at one vertex of a cube, and moving randomly from
vertex to adjacent vertices, what is the expected number of moves until you
reach the vertex opposite from your starting point?
3.7 Give an example of random variables that are normal, uncorrelated, and
dependent.
3.8 You have a spinner that generates random numbers that are uniform be-
tween 0 and 1. You sum the spins until the sum is greater than one. What is
the expected number of spins?
2
3.9 X ∼ N(µX , σX ) and Y ∼ N(µY , σY2 ) are independent, and you know
X + Y = s. What is the expected value of X?
3.10 A stick is broken randomly into 3 pieces. What is the probability of the
pieces being able to form a triangle?
4
3.11 A stick is broken randomly into two pieces. The larger piece is then
broken randomly into two pieces. What is the probability of the pieces being
able to form a triangle?
3.12 This is based on a Goldman Sachs interview question. You play a game
where you toss two fair coins in the air. You always win $1. However, if you
have tossed 2 heads at least once, and 2 tails at least once, you surrender all
winnings, and cannot play again. You may stop playing at anytime. What’s
your strategy?
3.13 (St. Petersburg Paradox) Consider the following game played by flipping
a fair coin. The pot begins at a $1, and the pot doubles until a tail is flipped,
at which point you receive the pot. Assume you can play as many times as you
want. What would you pay to play this game?
3.14 (Monte Hall Problem) You are on a game show, and there are 3 doors.
Two of the doors conceal something worthless, and one door conceals a valuable
prize. The game show host, Monte Hall, knows where the prize is. He lets you
pick a door, then he opens one of the remaining two doors to reveal something
worthless. He then offers you the chance to switch doors. Should you? How
would you convince someone else of your answer?
3.15 What is the expected number of rolls of a fair die needed to get all six
numbers?
3.16 You have a bucket of unfair coins. Each coin has a probability of getting
heads, p, which is uniformly distributed between zero and one. You pick a coin,
and flip it 64 times, getting 48 heads. What is the expected value of p for your
coin?
3.17 A room of 100 people put their business cards in a hat, then each person
randomly draws a business card. What’s the expected number of people who
draw their own business card?
3.18 A red ant and a black ant are at opposite vertices of a cube. Each
randomly picks an edge to traverse and moves to the next vertex. They continue
this until they meet. What is the expected number of edges each ant traverses?
3.19 If you roll a die repeatedly, what is the expected number of rolls until
you see consecutive sixes?
3.20 Alex and Beth take turns flipping a pair of coins. The first person to flip
a pair of heads wins the game. Alex flips first. Beth eventually wins. What is
the probability she flipped a pair of heads on her second turn?
3.21 Hanxi flips a fair coin 11 times, and Aixi flips the coin 10 times. How
likely is it that Hanxi flipped more heads than Aixi?
5
Chapter 4
Options
4.1 The stock of a company is trading at 100 USD. It is widely known that a
merger decision will be made today, and depending on the news, the stock will
trade at either $96 or $106 after the decision. Your research department believes
there is a 50% chance the company decides to merge. What is the price of a
call option struck at the money, expiring immediately after the merger decision?
What assumptions did you make?
4.4 [CRACK] For a standard European put option, draw the graph of the
delta as a function of the current stock price.
6
Chapter 5
Risk Management
5.1 You collect 2 years of daily returns for the stocks in the Russell 3000.
From the data you collect, you compute a covariance matrix Σ. How would you
determine whether Σ is singular?
5.2 You have a basket of n assets. The asset returns are multivariate normal
with zero mean. If the assets are independent, what is the probability that k
of the assets will have positive return? What if assets are perfectly correlated?
What if the correlation between any pair of assets is 1/2?
5.3 [CRACK] You are a portfolio manager, and intend to invest 100 USD
in two stocks that are expected to have the same return. They have annual
volatilies of 40% and 60%, and correlation of 80%. How much do you invest in
each stock?
5.6 Can you describe the steps involved in historical simulation of a portfolio?
7
Chapter 6
def hasValue ( s e l f , n ) :
...
}
8
6.14 Given an array of a million integers, and a target value n, determine how
many pairs of numbers sum to n. What is the computational complexity of your
solution?
6.15 You are given an unsorted list of 999,000 unique integers, each from 1
and 1,000,000. Find the missing 1000 numbers. What is the computational
complexity of your solution?
6.16 You are given time series of one million prices at which you could buy and
sell one unit of a product. How would you find the maximum profit you could
make if you can only buy and sell once? What is the computational complexity
of your solution?
9
Chapter 7
Fixed Income
7.1 How would you build a zero coupon curve from a US Treasury yield curve?
7.2 How would you compute the price of a 10 year US Treasury with a 4%
coupon?
7.3 The yield on a 5 year zero coupon drops 20bp. What happens to the price?
7.4 A two-year Treasury strip yields 2%, and a three-year strip yields 2.5%.
What is the one year yield, two years forward?
7.7 What is the main idea behind a short rate interest model? What are some
examples of short rate interest models? What are their distinguishing features?
10
Chapter 8
Brain Teasers
8.1 You have 100 quarters, 10 heads, 90 tails up in a dark room where you
can’t see the quarters. How do you divide them into 2 piles where you have an
the same number of heads in each pile?
8.2 A band of six perfectly logical, bloodthirsty pirates must divide a chest
of 300 gold coins. The pirates are ranked by authority. The top pirate is the
captain, and he proposes how the gold should be distributed. All of the pirates
then vote yea or nay. If there are more nays than yeas, the captain is thrown
overboard, and the next takes his place. This is repeated until there are at least
as many yeas as nays, at which point the gold is distributed. Every pirate wants
to survive, and if he survives, he wants as much gold as he can get. If it doesn’t
matter financially whether to accept or reject the proposal, he’d rather reject
it and watch the captain get tossed overboard. Pirates cannot make deals with
other pirates. What deal will the captain propose?
8.3 Anna, Buzz, Charlene, and Dilbert must cross a bridge at night, and a
torch is needed to cross. There is only one torch. The bridge can’t handle more
than two people at a time. Anna can cross in a minute, Buzz in 2 minutes,
Charlene in 5, and Dilbert in 10. What is the quickest way to get all 4 across?
8.4 You are in a canoe in a swimming pool, and you have a penny in your
pocket. You toss the penny into the water. What happens to the water level in
the swimming pool?
8.5 There are 7 boxes in a row, one of which contains treasure. To get the
treasure, you need only open the correct box. You must close the box before
checking another box. Whenever you close a box, the treasure is moved to an
adjacent box. What is the fewest number of boxes you need to open to be
guaranteed you will find the treasure?
8.6 It is 6pm, and the hour and minute hands are pointing in opposite direc-
tions. When will this happen next?
11
8.7 There are one hundred coins on the table. You and an opponent take turns
removing 1, 2, 3, or 4 coins at a time. You win if there are no coins left at the
end of your turn. You may choose whether to go first or second. What do you
do and why?
8.8 You have 20 coins which look identical, but one is slightly lighter than the
others. You have a balance scale that tells you which side has more weight.
What would you do to minimize the number of weighings?
8.9 You have 20 coins which look identical, but one has slightly different mass
than the others (maybe more, maybe less). You have a balance scale that tells
you which side has more weight. How many weighings do you need?
8.10 You have two glasses in front of you. The first is partly filled with wine,
and the second is partly filled with an equal amount of water. You pour some
of the wine into the glass of water, and then you pour an equal amount of the
mixture back into the glass of wine. Is there more water in the glass that was
originally wine, or more wine in the glass that was originally water? Explain
your answer.
8.11 Suppose there are 42 quant students, each assigned a unique integer from
1 to 42. Forty-two quarters are laid out on a table in a row, heads up. Each
student goes to the table, and if they are assigned the number n, they turn over
the nth coin, and every nth coin thereafter, as long as there are more coins. So,
for example, the student who is assigned 20 will turn over the 20th and 40th
coins, but then stop because there is no 60th coin. When everyone is done, how
many tails are showing?
8.12 There are 37 racehorses. You can race them together 6 at a time, and
observe their relative performance. You do not have a timer. How many races
do you need to determine the three fastest horses?
8.13 You have two identical boxes, and each box will break if dropped from
the nth floor (or higher) of a 100-story building. What is your strategy for
guaranteeing finding n in the minimum number of drops? Given your strategy,
what is the worst case number of drops?
8.14 You have two strings, and a lighter. If you light a string at one end, it
burns for one hour. You have no way of measuring or cutting the strings. How
would you measure 45 minutes?
8.15 You are standing in a vast, flat desert on a moonless night. It is foggy,
overcast, and raining hard. You are one mile from the only road, which is
perfectly straight and infinitely long in both directions. You can’t see the road
until you are right on top of it. What is your strategy for finding the road with
minimum hiking in the worst case?
12
8.16 Four villages lie at the vertices of a square, 10 km on each side, uncon-
nected by any roads. They choose to pool their funds, and connect with roads
so that you can reach any village from any other village. What is the minimum
length of road needed?
8.17 Anna is looking at Betty. Betty is looking at Chip. Chip is not a pro-
grammer, but Anna is a programmer. Is there enough information to know if a
programmer is looking at a non-programmer?
8.18 There are 64 people waiting to board an airplane, each with an assigned
seat. The first to board has lost his boarding pass, and sits in a random seat.
Every subsequent passenger has their boarding pass. If they find their assigned
seat empty, they sit in it. Otherwise, they randomly pick an open seat. What
is the probability the last passenger to board sits in his/her assigned seat?
8.19 The logical pirates have decided to grow their business, and bring in
venture capital. Because pirates are greedy, new hires always insist on being
made captain. Now there are 120 logical pirates. They find there are too many
pirates to remember everyone’s name and rank, so they just tattoo a number
on their chest (1-120), with lower numbers meaning lower rank. They discover
a chest with 50 coins. After the gold is distributed, who is the captain?
8.20 You have 100 red and 100 black marbles, to be distributed into two jars.
Once distributed, a jar will be selected at random, and a marble randomly
selected. What distribution of marbles will minimize the chance of getting a
red marble?
8.21 Jane offers to play the following game with you. Starting with a standard
deck of 52 cards, you take turns drawing two cards. Jane goes first. If the two
cards are black, Jane keeps them. If the cards are red, you keep them. If there
is one red and one black card, the cards are discarded. When you have gone
through the deck, you and Jane combine your cards, shuffle them, and resume,
playing until one of the colors is eliminated. If there are red cards remaining,
you win $100. What is a fair price to pay to play this game?
13