Green Book Quant Solutions: All 176 Problems Solved Online, Free

All 176 problems from Xinfeng Zhou's "A Practical Guide to Quantitative Finance Interviews" in book order, each with the question, a hidden answer and the key idea, plus 158 enhanced worked solutions to practice, 127 of them free.

Ask a quant where to start preparing for interviews and the answer is almost always the same book: "A Practical Guide to Quantitative Finance Interviews" by Xinfeng Zhou, the Green Book. It collects the canonical problems that show up again and again in real interviews, and its terse solutions send more people searching for help than any other prep book.

This page is the digital Green Book: all 176 problems in the book, in the book's order, each with the question in plain words, a hidden answer so you can attempt it first, the key idea, and, for 158 of them, an enhanced QuantVault version with a full step-by-step solution, hints and intuition. Filter by topic, expand a chapter, or start the track and work through it in order.

Practice the Green Book on QuantVault158 Green Book problems rebuilt with full solutions, in book order, with a timer and progress tracking. 127 are free with no account.

Start the Green Book trackSee the study plan
176 problems

Every Green Book problem, with the answer

Click a problem to see the question. Answers are hidden until you ask for them, so you can use the list as a self-test. Free means the enhanced version opens without an account; Pro means it is part of QuantVault Pro.

Chapter 2: Brain Teasers (37 problems)

Logic, symmetry, pigeonhole, modular arithmetic, induction and contradiction. Interviewers still ask these almost verbatim. More of the same families: brain teaser bank.

2.1 Problem Simplification

Screwy PiratesFree

Five pirates split 100 gold coins: the most senior proposes a split, and if at least half the pirates (including him) vote yes it passes, otherwise he is thrown overboard and the next senior pirate proposes. Pirates value survival first, gold second, and prefer fewer pirates when otherwise indifferent. What is the final split?

Show answer

Answer: Most senior pirate keeps 98 coins and gives 1 coin each to pirates 1 and 3 (the two most junior of odd rank); pirates 2 and 4 get 0.

Key idea: Backward induction from the 2-pirate case; buy the cheapest votes from those who get nothing otherwise.

Tiger and SheepFree

On an island 100 rational tigers and 1 sheep live; a tiger that eats the sheep turns into a sheep itself, and tigers care about survival above all. Does the sheep get eaten?

Show answer

Answer: No. With an even number of tigers the sheep survives; with an odd number it is eaten. 100 is even, so the sheep is safe.

Key idea: Solve n = 1, 2, 3, 4 tigers and observe the parity pattern.

2.2 Logic Reasoning

River CrossingFree

Four people (crossing times 10, 5, 2 and 1 minutes) must cross a bridge at night with one torch; at most two go at once and a pair moves at the slower person's pace. What is the minimum total time?

Show answer

Answer: 17 minutes: 2 and 1 cross (2), 1 returns (1), 10 and 5 cross (10), 2 returns (2), 2 and 1 cross (2).

Key idea: Send the two slowest together in the middle so neither has to come back; fast pair ferries the torch.

Birthday ProblemFree

A boss's birthday is one of ten listed dates (Mar 4, 5, 8; Jun 4, 7; Sep 1, 5; Dec 1, 2, 8). You are told only the month, colleague C only the day. You say you don't know and C doesn't either; C then says he now knows; you then say you know too. What is the date?

Show answer

Answer: September 1.

Key idea: Each statement eliminates candidates: unique days rule out Jun and Dec, C's certainty removes the 5s, yours removes March.

Card GameFree

From a standard 52-card deck, cards are flipped two at a time: two blacks go to the dealer, two reds go to you, mixed pairs are discarded. You win 100 dollars only if your pile is strictly larger. How much should you pay to play?

Show answer

Answer: Nothing (0). Every discarded pair removes one red and one black, so the two piles are always equal in size and you can never win.

Key idea: Symmetry: red and black counts are always equal, so ties are guaranteed.

Burning RopesPro

Two ropes each burn in exactly 60 minutes but burn unevenly along their length. Using only these ropes, how do you measure 45 minutes?

Show answer

Answer: Light rope A at both ends and rope B at one end; when A finishes (30 min) light B's other end; B finishes 15 min later, total 45 min.

Key idea: Lighting both ends halves the burn time regardless of unevenness.

Defective BallFree

Among 12 identical-looking balls one is either heavier or lighter, unknown which. With a two-pan balance, find the odd ball in just 3 weighings.

Show answer

Answer: Split 4/4/4: weigh 1-4 vs 5-8, branch (1,2,5 vs 3,6,9 or 9,10 vs 8,11), then one pair comparison. n weighings handle (3^n - 3)/2 balls.

Key idea: Split into three groups, not two, since each weighing has three outcomes.

Trailing ZerosPro

How many zeros does 100! end with?

Show answer

Answer: 24.

Key idea: Count factors of 5: floor(100/5) + floor(100/25) = 20 + 4.

Horse RaceFree

There are 25 horses of distinct constant speeds and a track with 5 lanes and no stopwatch. What is the fewest races needed to find the 3 fastest?

Show answer

Answer: 7 races: 5 group races, 1 race of the winners, then 1 race among horses 2, 3, 6, 7, 11 to pick the remaining two.

Key idea: Eliminate by ranking within groups and among group winners; only 5 candidates remain for places 2 and 3.

Infinite SequencePro

If the infinite power tower x^x^x^x^... equals 2, what is x?

Show answer

Answer: x = sqrt(2).

Key idea: The tower equals x raised to itself, so x^2 = 2.

2.3 Thinking Out of the Box

Box PackingFree

Can 53 bricks of size 1x1x4 (total volume 212) fit inside a 6x6x6 box (volume 216)?

Show answer

Answer: No. Colour the 27 2x2x2 sub-cubes alternately (13 and 14); each brick occupies half a cube of each colour, and the 13-cube colour supports at most 52 bricks.

Key idea: 3D parity colouring, extending the mutilated-chessboard argument.

Calendar CubesFree

Label the six faces of two dice with single digits so that, placed side by side (either order), they can display every day of the month 01 through 31. Which digits go on each die?

Show answer

Answer: Die one: 0, 1, 2, 3, 4, 5. Die two: 0, 1, 2, 6, 7, 8, with the 6 flipped to serve as 9.

Key idea: Both dice need 0, 1, 2; the seven remaining digits fit because 6 doubles as 9.

Door to OfferFree

Two doors, one to a job offer and one to the exit, each with a guard; one guard always lies, the other always tells the truth. You may ask one guard one yes/no question. What do you ask?

Show answer

Answer: Ask a guard: would the other guard say you are guarding the offer door? If yes, take the other door; if no, take his door.

Key idea: Route the question through both guards so the lie and the truth cancel.

Message DeliveryFree

You must send a document to a colleague through an insecure courier using a padlock box; anything in an unlocked box is stolen, and each person's padlock has a single key held only by its owner. How do you get the document across securely?

Show answer

Answer: Send the box locked with your lock; colleague adds his own lock and returns it; you remove your lock and send it back; he removes his lock and opens it.

Key idea: Two locks on the box at once; each party only ever removes their own.

Last BallFree

A bag holds 20 blue and 14 red balls. Repeatedly draw two at random without replacement: if same colour add a blue ball, if different add a red ball. What colour is the final ball? What if the bag starts with 20 blue and 13 red?

Show answer

Answer: Blue with 14 red (red count changes by 0 or minus 2, stays even, ends at 0); red with 13 red (red count stays odd, ends at 1).

Key idea: Invariant: parity of the red-ball count never changes.

Light SwitchesFree

A room contains one bulb controlled by exactly one of four switches outside, all currently off. You may toggle switches freely; how many trips into the room are needed to identify the right switch?

Show answer

Answer: One trip. Turn on 1 and 2, wait, switch 2 off and 3 on, enter: on+hot is 1, off+hot is 2, on+cold is 3, off+cold is 4.

Key idea: Use heat as a second binary signal so one visit distinguishes 2x2 = 4 cases.

Quant SalaryFree

Eight quants want to learn their group's average salary without anyone revealing their own salary to the others. Design a procedure.

Show answer

Answer: Quant 1 adds a secret random number to his salary and passes the total; each quant adds his salary; quant 1 subtracts the random number and divides by 8.

Key idea: Mask the running sum with a random offset known only to the first person.

2.4 Application of Symmetry

Coin PilesFree

Blindfolded, you face 1000 coins of which 20 are heads up. Without being able to feel which side is up, but allowed to flip coins, split them into two piles that are guaranteed to contain the same number of heads.

Show answer

Answer: Pick any 20 coins as one pile and flip all of them; both piles then have the same number of heads.

Key idea: Flipping a pile of n coins with m heads leaves n - m heads; choose n = 20.

Mislabeled BagsFree

Three bags contain apples, oranges, and a mix respectively, and every bag is labeled wrong. What is the fewest fruits you must draw to relabel all bags correctly?

Show answer

Answer: One fruit, drawn from the bag labeled mix; its colour identifies that bag, and the other two follow since every label is wrong.

Key idea: Use the all-wrong constraint; the mix-labeled bag is pure so one draw resolves it.

Wise MenPro

A sultan holds 50 wise men and one glass that starts bottom down. Each minute a random man is summoned and may flip the glass or not. When someone correctly declares that everyone has been summoned at least once, all go free; a wrong claim kills all. They confer once beforehand. Find a strategy.

Show answer

Answer: One spokesman; each other man flips the glass upside down only the first time he finds it bottom down; the spokesman resets it and declares after his 49th reset.

Key idea: Break symmetry with one counter; the glass is a one-bit token each other man uses exactly once.

2.5 Series Summation

Clock PiecesFree

A clock face numbered 1 to 12 breaks into three pieces whose numbers sum to the same total; no odd-shaped pieces. Which numbers are on each piece?

Show answer

Answer: Each piece sums to 26: {11, 12, 1, 2}, {3, 4, 9, 10} and {5, 6, 7, 8}.

Key idea: Total 78 gives 26 per piece; remember 12 and 1 are adjacent on a clock.

Missing IntegersPro

You are given 98 distinct integers drawn from 1 to 100. How do you efficiently find the two that are missing?

Show answer

Answer: Compute sum and sum of squares of the 98 numbers: x + y = 5050 minus sum, x^2 + y^2 = 338350 minus sum of squares; solve. O(n).

Key idea: Two unknowns need two equations: use the linear and square sum formulas.

Counterfeit Coins IFree

Ten bags each hold 100 coins; genuine coins weigh 10 g, but every coin in one bag weighs either 9 g or 11 g. Using a digital scale once, identify the counterfeit bag.

Show answer

Answer: Take i coins from bag i (55 coins, expected 550 g); the weight deviation from 550 g equals the bag number, its sign says lighter or heavier.

Key idea: Take a distinct number of coins from each bag so each bag leaves a unique signature.

Glass BallsFree

With two identical glass balls in a 100-storey building, find the lowest floor X from which a ball breaks while minimising the worst-case number of drops. What is the strategy?

Show answer

Answer: 14 drops worst case: drop ball one from floors 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100; after it breaks, scan floor by floor.

Key idea: With N drops, decreasing step sizes cover N(N+1)/2 floors; need N(N+1)/2 >= 100.

2.6 The Pigeon Hole Principle

Matching SocksPro

A drawer has 2 red, 20 yellow and 31 blue socks. Grabbing socks blindly, how many must you take to guarantee a matching pair?

Show answer

Answer: 4 socks.

Key idea: Three colours are three pigeonholes; a fourth sock must repeat a colour.

HandshakesFree

At a party with you and 25 teammates, every teammate shakes your hand and there is arbitrary handshaking among the rest. Without knowing the total, can you be sure two people shook exactly the same number of hands?

Show answer

Answer: Yes. Each of the 26 people shook between 1 and 25 hands, so 26 people fall into 25 possible counts.

Key idea: 26 pigeons, 25 holes.

Have We Met Before?Free

Prove that among any 6 people at a party, either some 3 all knew each other beforehand or some 3 were mutual strangers.

Show answer

Answer: True. Pick one person; among the other 5, at least 3 all know him or all don't; that trio either contains a matching pair or forms the opposite triple.

Key idea: Generalised pigeonhole on one person's 5 relationships, then case analysis (Ramsey R(3,3) = 6).

Ants on a SquareFree

51 ants sit on a unit square. Can a circular glass of radius 1/7 always be placed to cover at least 3 ants?

Show answer

Answer: Yes. Split into a 5x5 grid of side 1/5; some cell holds at least 3 ants, and a radius-1/7 circle covers a square of side sqrt(2)/7 > 1/5.

Key idea: Generalised pigeonhole: 51 ants in 25 cells forces a cell with 3.

Counterfeit Coins IIFree

Five bags each hold 100 coins; within a bag all coins weigh 9, 10 or 11 g, but each bag's type is unknown. With an exact digital scale, how many weighings are needed to determine every bag's type?

Show answer

Answer: One weighing: take 1, 3, 9, 27 and 81 coins from bags 1 to 5; the total weight decodes uniquely (base-3 encoding of deviations).

Key idea: Choose coin counts so that the 3^5 deviation combinations map to distinct sums.

2.7 Modular Arithmetic

Prisoner ProblemFree

100 prisoners each get a red or blue hat, see all hats but their own, and are called in random order to announce a guess aloud; a correct guess frees that prisoner. With a strategy agreed the night before, how many can they guarantee to save? What if there are 3 colours?

Show answer

Answer: At least 99 of 100 in both cases. The first prisoner announces the parity of red hats he sees (or colour-code sum mod 3); the rest deduce their own.

Key idea: First prisoner sacrifices himself to broadcast a checksum mod the number of colours.

Division by 9Free

State a test for whether an integer is divisible by 9, and prove it.

Show answer

Answer: Divisible by 9 iff the digit sum is. Proof: a minus its digit sum equals sum of a_k(10^k - 1), and each 10^k - 1 is a multiple of 9.

Key idea: 10^k is congruent to 1 mod 9, so a number and its digit sum agree mod 9.

Chameleon ColorsFree

An island has 13 red, 15 green and 17 blue chameleons; whenever two of different colours meet, both switch to the third colour. Can all chameleons ever become one colour?

Show answer

Answer: No. Each meeting changes any pairwise count difference by 0 or 3; counts are 1, 0, 2 mod 3, so two colours never become equal, which a final state requires.

Key idea: Invariant: the pairwise differences of counts mod 3 never change.

2.8 Math Induction

Coin Split ProblemFree

Start with 1000 coins, split a pile into two of sizes x and y and record xy; keep splitting every pile and adding the products until all piles are single coins. Show the total is the same regardless of how you split, and find it.

Show answer

Answer: f(n) = n(n-1)/2, so for 1000 coins the sum is 1000 x 999 / 2 = 499500.

Key idea: Strong induction on f(n) = x(n-x) + f(x) + f(n-x); or count pairs of coins separated.

Chocolate Bar ProblemPro

A 6 by 8 chocolate bar (48 squares) is broken into single squares, each break splitting one rectangle into two. How many breaks are required?

Show answer

Answer: 47 breaks; in general mn - 1 for an m by n bar.

Key idea: Each break adds exactly one piece, so going from 1 piece to mn pieces takes mn - 1 breaks.

Race TrackFree

N gas cans are scattered around a one-way circular track and together contain exactly enough fuel for one lap. Starting with an empty tank, can you always choose a starting can so that you complete the lap?

Show answer

Answer: Yes, always. Induction: some can i has fuel to reach can i+1, so merge them and reduce N+1 to N; equivalently, start where a full car's tank reads lowest.

Key idea: Induction by merging a can that reaches the next one; base case N = 1, 2.

2.9 Proof by Contradiction

Irrational NumberFree

Prove that sqrt(2) cannot be written as a ratio of two integers.

Show answer

Answer: Suppose sqrt(2) = m/n in lowest terms; then m^2 = 2n^2 forces m even, m = 2x, so n^2 = 2x^2 forces n even too, contradicting lowest terms.

Key idea: Assume a reduced fraction and derive that both numerator and denominator are even.

Rainbow HatsFree

Seven prisoners each receive a hat in one of the 7 rainbow colours (chosen adversarially), see the other six hats, and simultaneously write a guess of their own colour. They are freed if at least one guess is right. Is there a strategy that guarantees freedom?

Show answer

Answer: Yes. Code colours and prisoners 0 to 6; prisoner i guesses the colour that makes the sum of all seven hats equal i mod 7. Exactly one is right.

Key idea: The true sum mod 7 is some i in 0..6, and prisoner i's guess assumes exactly that value.

Chapter 3: Calculus and Linear Algebra (24 problems)

A compact math review: derivatives, integrals, Taylor series, Newton's method, Lagrange multipliers, ODEs, and the linear algebra behind regression and simulation. More: linear algebra bank.

3.1 Limits and Derivatives

Basics of Derivatives: derivative of (ln x)^(ln x)Free

Differentiate y = (ln x)^(ln x), a function whose base and exponent both involve ln x.

Show answer

Answer: dy/dx = (ln x)^(ln x) / x * (ln(ln x) + 1)

Key idea: Take logs: ln y = ln x * ln(ln x); apply product and chain rules, multiply back by y.

Maximum and Minimum: e^pi vs pi^eFree

Without computing either number, decide which is bigger, e^pi or pi^e.

Show answer

Answer: e^pi > pi^e

Key idea: Compare ln x / x at e and pi; the function decreases for x > e, peaking at e.

L'Hospital's Rule: e^x / x^2 and x^2 ln xFree

Find the limit of e^x / x^2 as x goes to infinity, and of x^2 ln x as x goes to 0 from the right.

Show answer

Answer: e^x / x^2 goes to infinity; x^2 ln x goes to 0

Key idea: Apply L'Hospital twice for the first; rewrite second as ln x / x^(-2) then L'Hospital.

3.2 Integration

Basics of Integration: integral of ln xFree

Find the antiderivative of ln x.

Show answer

Answer: x ln x - x + c

Key idea: Integration by parts with u = ln x, v = x.

Basics of Integration: integral of sec x from 0 to pi/6Free

Evaluate the definite integral of sec x over the interval from 0 to pi/6.

Show answer

Answer: ln(sqrt 3), since antiderivative is ln|sec x + tan x|

Key idea: Derivative of sec x + tan x is sec x times itself, so antiderivative is ln|sec x + tan x|.

Applications of Integration: two intersecting cylindersFree

Two cylinders of radius 1 cross at right angles with intersecting axes. What is the volume of the region common to both?

Show answer

Answer: 16/3 (in general 16 r^3 / 3)

Key idea: Horizontal cross sections are squares of side sqrt(4r^2 - 4z^2); integrate over z, or compare with inscribed sphere.

Applications of Integration: snow plow problemFree

Snow starts falling at a constant rate before noon; a plow leaving at noon removes constant volume per minute and has gone 2 miles by 1 pm and 3 miles by 2 pm. When did the snow start?

Show answer

Answer: T = (sqrt 5 - 1)/2 hours before noon, about 37 minutes, so roughly 11:23 am

Key idea: Speed = c/(t+T); integrate distance over [0,1] and [0,2], divide equations, solve quadratic T^2 + T - 1 = 0.

Expected Value Using Integration: E[X | X > 0] for standard normalFree

For X a standard normal random variable, compute the conditional expectation of X given X is positive.

Show answer

Answer: sqrt(2/pi), about 0.80. (The book prints 1/sqrt(2 pi), which is E[X; X>0] before dividing by P(X>0) = 1/2.)

Key idea: Integrate x times the normal density from 0 to infinity using substitution u = -x^2/2.

3.3 Partial Derivatives and Multiple Integrals

Partial Derivatives and Multiple Integrals: Gaussian integralFree

Compute the integral of e^(-x^2/2) from 0 to infinity.

Show answer

Answer: sqrt(pi/2); the full-line integral is sqrt(2 pi)

Key idea: Recall the normal pdf integrates to 1, or square the integral and switch to polar coordinates.

3.4 Important Calculus Methods

Taylor's Series: i^iFree

What is the value of i raised to the power i?

Show answer

Answer: i^i = e^(-pi/2)

Key idea: Euler's formula (via Taylor series) gives i = e^(i pi/2), so ln i = i pi/2.

Taylor's Series: Bernoulli inequality (1+x)^n >= 1+nxFree

Show that (1 + x)^n is at least 1 + nx for every x > -1 and every integer n >= 2.

Show answer

Answer: Holds; remainder term n(n-1)(1+xi)^(n-2) x^2 / 2 is nonnegative

Key idea: Second-order Taylor expansion at 0 with nonnegative remainder, or induction on n.

Newton's Method: solve x^2 = 37Free

Use Newton's method to find the square root of 37 to three decimal places.

Show answer

Answer: x is about 6.083 (6.083^2 = 37.003)

Key idea: One Newton step from x0 = 6 on f(x) = x^2 - 37; or Taylor of sqrt at 36.

Newton's Method: other root-finding algorithmsFree

Describe root-finding algorithms other than Newton's method for a differentiable f(x) = 0.

Show answer

Answer: Bisection (linear convergence, guaranteed once sign-changing bracket found); secant (order (1+sqrt5)/2, no derivative needed)

Key idea: Bisection halves a sign-changing interval; secant replaces f' with a finite-difference slope.

Lagrange Multipliers: distance from origin to plane 2x+3y+4z=12Free

Find the distance from the origin to the plane 2x + 3y + 4z = 12.

Show answer

Answer: 12 / sqrt(29), attained at (24/29, 36/29, 48/29); in general |d| / sqrt(a^2+b^2+c^2)

Key idea: Minimize x^2 + y^2 + z^2 subject to the plane constraint with a Lagrange multiplier.

3.5 Ordinary Differential Equations

Separable Differential Equations: y' + 6xy = 0Free

Solve the ODE y' + 6xy = 0 with initial condition y(0) = 1.

Show answer

Answer: y = e^(-3x^2)

Key idea: Separate dy/y = -6x dx and integrate; initial condition fixes the constant.

Separable Differential Equations: y' = (x - y)/(x + y)Free

Solve the ODE y' = (x - y)/(x + y).

Show answer

Answer: y^2 + 2xy - x^2 = c

Key idea: Substitute z = x + y to get z dz = 2x dx, which is separable.

First-Order Linear Differential Equations: y' + y/x = 1/x^2Free

Solve y' + y/x = 1/x^2 for x > 0 with y(1) = 1.

Show answer

Answer: y = (ln x + 1) / x

Key idea: Integrating factor I(x) = e^(integral of 1/x) = x turns left side into (xy)'.

Homogeneous Linear Equations: y'' + y' + y = 0Free

Find the general solution of y'' + y' + y = 0.

Show answer

Answer: y = e^(-x/2) (c1 cos(sqrt3 x / 2) + c2 sin(sqrt3 x / 2))

Key idea: Characteristic equation r^2 + r + 1 = 0 has complex roots -1/2 plus or minus i sqrt3/2.

Nonhomogeneous Linear Equations: y'' + y' + y = 1 and = xFree

Find the general solutions of y'' + y' + y = 1 and of y'' + y' + y = x.

Show answer

Answer: Homogeneous part e^(-x/2)(c1 cos(sqrt3 x/2) + c2 sin(sqrt3 x/2)) plus particular solution 1, respectively x - 1

Key idea: General solution = homogeneous solution + particular solution; try a polynomial of the same degree.

3.6 Linear Algebra

Vectors: correlation range given rho_xy = rho_xz = 0.8Free

Three random variables x, y, z have corr(x,y) = 0.8 and corr(x,z) = 0.8. What are the largest and smallest possible values of corr(y,z)?

Show answer

Answer: Maximum 1, minimum 0.28

Key idea: Treat correlation as cosine of angle between vectors; min is cos(2 theta) = 0.8^2 - 0.6^2.

QR Decomposition: implement linear least squares regressionFree

How would you code ordinary least squares regression from scratch if the language lacks a built-in routine?

Show answer

Answer: Solve the normal equations (X'X) beta = X'Y via QR decomposition (Rx = Q'b, back substitution), or beta = (X'X)^(-1) X'Y

Key idea: Minimize (Y - X beta)'(Y - X beta); set derivative to zero; solve linear system with QR.

Determinant, Eigenvalue and Eigenvector: 2x2 matrix [[2,1],[1,2]]Free

Find the eigenvalues and eigenvectors of the 2x2 matrix with rows (2, 1) and (1, 2).

Show answer

Answer: Eigenvalues 3 and 1; eigenvectors (1,1)/sqrt2 and (1,-1)/sqrt2

Key idea: Solve det(A - lambda I) = 0, or use product = det = 3 and sum = trace = 4.

Positive Semidefinite/Definite Matrix: correlation range via correlation matrixFree

Same setup as before: corr(x,y) = corr(x,z) = 0.8. Find the max and min of corr(y,z) using the correlation matrix.

Show answer

Answer: Between 0.28 and 1, since det(P) = -0.28 + 1.28 rho - rho^2 >= 0

Key idea: Correlation matrix must be positive semidefinite, so its determinant is nonnegative.

LU Decomposition and Cholesky Decomposition: generating correlated normalsFree

Given a generator for independent standard normals, how do you produce two N(0,1) variables with correlation rho?

Show answer

Answer: x1 = z1, x2 = rho z1 + sqrt(1 - rho^2) z2; in n dimensions X = mu + R' Z with Sigma = R'R

Key idea: Cholesky factor of the covariance matrix applied to an independent normal vector.

Chapter 4: Probability Theory (42 problems)

The chapter that matters most: conditional probability, Bayes, combinatorics, distributions, expectation and order statistics. More: probability and expectation banks.

4.1 Basic Probability Definitions and Set Operations

Coin Toss Game (n+1 coins vs n coins)Pro

Gambler A flips n+1 fair coins and gambler B flips n fair coins. What is the probability that A ends up with strictly more heads than B?

Show answer

Answer: 1/2

Key idea: Compare first n coins by symmetry (tie prob y, 2x+y=1); extra coin breaks ties half the time.

Card Game (higher card wins)Free

From a shuffled 52-card deck you draw one card and the dealer draws another without replacement; you win only if your value is strictly higher. What is your winning probability?

Show answer

Answer: 8/17

Key idea: P(tie) = 3/51; by symmetry P(win) = (1 - 3/51)/2.

Drunk PassengerFree

100 passengers board in order; the first is drunk and takes a random seat, everyone else takes their own seat if free, otherwise a random free one. What is the probability the 100th passenger gets seat 100?

Show answer

Answer: 1/2

Key idea: Only seats 1 and 100 matter; by symmetry whichever is taken first is equally likely.

N Points on a CirclePro

N points are placed uniformly at random on a circle. What is the probability that all of them lie within some semicircle?

Show answer

Answer: N/2^(N-1); for an arc of fraction x <= 1/2 of the circumference, N*x^(N-1)

Key idea: Events 'clockwise semicircle from point i contains all others' are mutually exclusive, each prob 1/2^(N-1).

4.2 Combinatorial Analysis

Poker HandsFree

In a 5-card hand from a 52-card deck, what are the probabilities of four of a kind, a full house, and two pairs?

Show answer

Answer: Total C(52,5) = 2,598,960 hands; four of a kind 624 (about 0.024%); full house 3,744 (about 0.144%); two pairs 123,552 (about 4.75%)

Key idea: Count hands: 13*48; 13*C(4,3)*12*C(4,2); C(13,2)*C(4,2)^2*44; divide by C(52,5).

Hopping RabbitFree

A rabbit climbs a staircase of n steps taking 1 or 2 steps per hop. How many distinct ways can it reach the top?

Show answer

Answer: f(n) = f(n-1) + f(n-2) with f(1) = 1, f(2) = 2 (Fibonacci numbers)

Key idea: Condition on the last hop being 1 or 2 steps; induction.

Screwy Pirates 2Free

11 pirates lock their treasure so that any 6 of them can open every lock but no 5 can. What is the minimum number of locks, and how many keys must each pirate carry?

Show answer

Answer: 462 locks (C(11,5)); 252 keys per pirate

Key idea: Each 5-pirate subset needs a lock only the other 6 can open; keys = 462*6/11.

Chess TournamentFree

2^n players of strictly ranked skill play a random-draw knockout where the stronger player always wins. What is the probability that players 1 and 2 meet in the final?

Show answer

Answer: 2^(n-1)/(2^n - 1)

Key idea: Player 2 must land in the other half of the bracket: 2^(n-1) of the 2^n - 1 remaining slots.

Application LettersFree

5 personalized cover letters are stuffed at random into 5 addressed envelopes. What is the probability every letter goes to the wrong firm?

Show answer

Answer: 11/30

Key idea: Inclusion-exclusion on 'letter i correct' events: 1 - (1 - 1/2! + 1/3! - 1/4! + 1/5!).

Birthday ProblemFree

With 365 equally likely birthdays, how many people are needed for the chance that at least two share a birthday to exceed 1/2?

Show answer

Answer: 23

Key idea: P(all distinct) = 365*364*...*(365-n+1)/365^n; find smallest n with this below 1/2.

100th DigitFree

What is the 100th digit after the decimal point of (1 + sqrt(2))^3000?

Show answer

Answer: 9

Key idea: (1+sqrt2)^n + (1-sqrt2)^n is an integer and 0 < (1-sqrt2)^3000 << 10^-100.

Cubic of IntegerFree

For an integer x chosen uniformly from 1 to 10^12, what is the probability that x^3 ends in the digits 11?

Show answer

Answer: 1/100 (x must end in 71)

Key idea: Expand (a+10b)^3: units digit forces a = 1, tens digit forces b to end in 7.

4.3 Conditional Probability and Bayes' Formula

Boys and GirlsFree

Part A: a mother of two invited to a dinner for mothers with at least one son; probability both are boys? Part B: you see a colleague's child and it is a boy; probability both her children are boys?

Show answer

Answer: Part A: 1/3; Part B: 1/2

Key idea: Part A conditions on 'at least one boy' among (bb,bg,gb,gg); Part B conditions on a specific child.

All-Girl World?Pro

Every couple keeps having children until the first girl, then stops; each birth is independently 50% girl. What happens to the fraction of girls in the population?

Show answer

Answer: Stays at 50%

Key idea: Each birth is independent with 50% girl regardless of stopping rule.

Unfair CoinFree

Among 1000 coins one is double-headed and 999 are fair. You pick one at random, toss it 10 times and get 10 heads. What is the probability you hold the double-headed coin?

Show answer

Answer: 1024/2023, about 0.5

Key idea: Bayes: (1/1000)/(1/1000 + 999/1000 * 1/1024).

Fair Probability from an Unfair CoinFree

Given a coin with unknown bias, how can you generate a fair 50/50 outcome?

Show answer

Answer: Toss twice: HT means win, TH means lose, repeat on HH or TT (von Neumann trick)

Key idea: P(HT) = P(TH) = p*(1-p) regardless of bias.

Dart GameFree

Jason's second dart lands farther from the center than his first. If he throws a third dart with the same skill, what is the probability it also lands farther than the first? Generalize to n darts all worse than the first, then dart n+1.

Show answer

Answer: 2/3; general case n/(n+1)

Key idea: The event 'dart n+1 is best of n+1' has prob 1/(n+1), independent of the order of the first n.

Birthday LinePro

A theater gives a free ticket to the first person in line whose birthday matches someone already served (365 days). Which position in line maximizes your chance of the free ticket?

Show answer

Answer: 20th position

Key idea: p(n) = P(first n-1 distinct) * (n-1)/365; find n with p(n) > p(n-1) and p(n) > p(n+1).

Dice OrderFree

Three dice are rolled one after another. What is the probability the three results come out in strictly increasing order?

Show answer

Answer: 5/54

Key idea: P(all different) = 1 * 5/6 * 4/6, times 1/3! for the one increasing permutation.

Monty Hall ProblemFree

Three doors hide one car and two goats. After you pick, the host opens another door he knows has a goat and offers a switch. Should you switch, and with what winning probability?

Show answer

Answer: Switch; win probability 2/3 (vs 1/3 staying)

Key idea: Switching wins exactly when the original pick was a goat, probability 2/3.

Amoeba PopulationFree

Each minute an amoeba dies, stays the same, splits into two, or splits into three, each with probability 1/4, offspring behaving independently alike. Starting from one amoeba, what is the probability the population eventually dies out?

Show answer

Answer: sqrt(2) - 1, about 0.414

Key idea: Condition on first minute: P = 1/4 (1 + P + P^2 + P^3), take the root in (0,1).

Candies in a JarFree

A jar holds 10 red, 20 blue and 30 green candies drawn one at a time at random. What is the probability at least one blue and one green remain when the last red is drawn?

Show answer

Answer: 7/12

Key idea: Last candy overall is green (30/60) then last of red/blue is blue (20/30), plus the mirror case (20/60)(30/40).

Coin Toss Game (first HT wins)Pro

A and B alternately toss a fair coin, A first; the game ends at the first head immediately followed by a tail and whoever tossed that tail wins. What is the probability A wins?

Show answer

Answer: 4/9

Key idea: Condition on A's first toss: P(A|T) = 1 - P(A), P(A|H) = 1/3; solve for P(A).

Russian Roulette SeriesPro

Six-chamber revolver, two players alternate pulling the trigger. (1) One bullet, spun once: go first or second, and loss probability? (2) Respin after every pull? (3) Two random bullets, opponent survived: spin or not? (4) Two adjacent bullets: spin or not?

Show answer

Answer: (1) no difference, 1/2 each; (2) go second, lose with 5/11 (first player 6/11); (3) spin (2/6 < 2/5); (4) do not spin (survive 3/4 vs 2/3)

Key idea: Fixed bullet position vs independent respins; condition on opponent's survival for two-bullet cases.

AcesFree

A 52-card deck is dealt evenly to 4 players, 13 cards each. What is the probability every player receives exactly one ace?

Show answer

Answer: (39*26*13)/(51*50*49) = 2197/20825, about 0.1055

Key idea: Place aces sequentially: each next ace must fall in a pile not yet holding an ace.

Gambler's Ruin ProblemFree

A gambler starts with i dollars, wins 1 with probability p or loses 1 with probability q = 1 - p each game, stopping at 0 or N. What is the probability he reaches N?

Show answer

Answer: P_i = (1 - (q/p)^i)/(1 - (q/p)^N) if p differs from 1/2; i/N if p = 1/2

Key idea: First-step recursion P_i = p P_(i+1) + q P_(i-1) with boundaries P_0 = 0, P_N = 1.

Basketball ScoresFree

A player makes her first free throw, misses the second, and thereafter scores with probability equal to her running success fraction. After 100 throws, what is the probability she has made exactly 50?

Show answer

Answer: 1/99

Key idea: Induction shows P(k made after n throws) = 1/(n-1) uniformly for k = 1..n-1 (Polya urn).

Cars on RoadFree

The probability of seeing at least one car in any 20-minute window on a highway is 609/625, with a constant rate. What is the probability of seeing at least one car in a 5-minute window?

Show answer

Answer: 3/5

Key idea: Four independent 5-minute intervals: (1-p)^4 = 16/625.

4.4 Discrete and Continuous Distributions

Meeting ProbabilityPro

Two bankers each arrive at a station uniformly at random between 5:00 and 6:00 and each stays exactly 5 minutes. What is the probability they meet?

Show answer

Answer: 23/144

Key idea: Geometric probability: area of |X - Y| <= 5 in the 60 by 60 square is 60^2 - 55^2.

Probability of TriangleFree

A stick is broken at two uniformly random points. What is the probability the three pieces can form a triangle?

Show answer

Answer: 1/4

Key idea: Each piece under 1/2; feasible region is two triangles of total area 1/4 in unit square.

Property of Poisson ProcessFree

Buses arrive as a Poisson process with mean interarrival time 10 minutes. Arriving at a random time, what is your expected wait, and on average how long ago did the last bus leave?

Show answer

Answer: Expected wait 10 minutes; last bus also 10 minutes ago on average (inspection paradox, not 5 each)

Key idea: Memorylessness of the exponential distribution applies forward and backward in time.

Moments of Normal DistributionFree

For X standard normal, what are E[X^n] for n = 1, 2, 3, 4?

Show answer

Answer: 0; 1; 0; 3

Key idea: Odd moments vanish by symmetry; use MGF M(t) = exp(t^2/2) and differentiate.

4.5 Expected Value, Variance and Covariance

Connecting NoodlesFree

A bowl has 100 noodles. Blindfolded, you repeatedly pick two free ends at random and join them until no free ends remain. What is the expected number of loops?

Show answer

Answer: 1 + 1/3 + 1/5 + ... + 1/199 (sum of 1/(2k-1) for k = 1 to 100), about 3.28

Key idea: Each join with 2n free ends closes a loop with prob 1/(2n-1); E[f(n)] = E[f(n-1)] + 1/(2n-1).

Optimal Hedge RatioPro

You hold one share of stock A (return variance sigma_A^2) and short h shares of B (variance sigma_B^2, correlation rho). What h minimizes the variance of the hedged position?

Show answer

Answer: h = rho * sigma_A / sigma_B

Key idea: Minimize sigma_A^2 - 2 rho h sigma_A sigma_B + h^2 sigma_B^2 by setting the derivative to zero.

Dice GameFree

You roll a die and are paid its face value; on a 4, 5 or 6 you roll again (accumulating), on 1, 2 or 3 the game stops. What is the expected payoff?

Show answer

Answer: 7

Key idea: Law of total expectation: E = 1/2 * 2 + 1/2 (5 + E).

Card Game (expected cards to first ace)Free

Turning over cards from a shuffled 52-card deck, what is the expected number of cards turned to see the first ace?

Show answer

Answer: 10.6 (= 1 + 48/5); generally 1 + m/(n+1) for m ordinary and n special cards

Key idea: Indicator per non-ace card: it precedes all 4 aces with probability 1/5.

Sum of Random VariablesFree

X1, ..., Xn are IID uniform on [0,1]. What is the probability that their sum is at most 1?

Show answer

Answer: 1/n!

Key idea: Volume of the n-simplex; prove by induction conditioning on X_(n+1) and integrating (1-x)^n/n!.

Coupon CollectionFree

N coupon types are equally likely in each box. (A) Expected boxes to collect a full set? (B) After n boxes, expected number of distinct types?

Show answer

Answer: (A) N * (1 + 1/2 + ... + 1/N); (B) N * (1 - ((N-1)/N)^n)

Key idea: (A) sum of geometric waiting times with p = (N-i+1)/N; (B) indicator per type.

Joint Default ProbabilityFree

Bond A defaults next year with probability 50%, bond B with 30%. What is the range of the probability that at least one defaults, and the range of their default correlation?

Show answer

Answer: P(at least one) in [50%, 80%]; correlation in [-sqrt(3/7), sqrt(3/7)], about [-0.655, 0.655]

Key idea: P(A or B) = 0.65 - rho*sqrt(0.21)/2 with indicator variances 0.25 and 0.21; correlation cannot reach plus or minus 1.

4.6 Order Statistics

Expected Value of Max and MinFree

For n IID uniform [0,1] variables, give the cdf, pdf and expected value of the maximum Z_n and of the minimum Y_n.

Show answer

Answer: Max: cdf x^n, pdf n x^(n-1), mean n/(n+1); Min: cdf 1 - (1-x)^n, pdf n(1-x)^(n-1), mean 1/(n+1)

Key idea: P(max <= x) = x^n and P(min > x) = (1-x)^n, then differentiate and integrate.

Correlation of Max and MinPro

For two IID uniform [0,1] variables with Y = min and Z = max, what is P(Y >= y | Z <= z), and what is the correlation of Y and Z?

Show answer

Answer: P(Y >= y | Z <= z) = (z-y)^2/z^2 for y <= z, else 0; corr(Y,Z) = 1/2

Key idea: E[Y]=1/3, E[Z]=2/3, var each 1/18, E[YZ]=E[X1 X2]=1/4, cov=1/36.

Random AntsFree

500 ants at independent uniform positions on a 1-foot string each walk at 1 ft/min in a random direction, reversing on head-on collisions. What is the expected time until all fall off?

Show answer

Answer: 500/501 minutes: the last ant falls off after the max of 500 i.i.d. uniform times, E[max] = n/(n+1). (The book prints 499/500, an erratum.)

Key idea: Collisions are equivalent to ants passing through; answer is expected max of 500 uniform positions.

Chapter 5: Stochastic Process and Stochastic Calculus (21 problems)

Markov chains, martingales and random walks, dynamic programming games, Brownian motion and Ito's lemma. More: stochastic processes bank.

5.1 Markov Chain

Gambler's Ruin ProblemFree

M starts with $1 and N with $2; each game moves $1 to the winner and M wins each game with probability 2/3. They play until someone is broke. Find the probability M ends up with all $3.

Show answer

Answer: M wins with probability 4/7 (from $2 the probability is 6/7).

Key idea: Absorbing Markov chain on M's dollars 0 to 3; solve a1 = (2/3) a2, a2 = a1/3 + 2/3.

Dice QuestionFree

Two dice are rolled repeatedly. A wins if a sum of 12 shows up before two consecutive 7s; B wins otherwise. Find the probability that A wins.

Show answer

Answer: P(A wins) = 7/13.

Key idea: States S, 7, 7-7, 12 with P(12) = 1/36, P(7) = 6/36; absorption equations or conditioning on first two rolls.

Coin TripletsFree

Fair coin. (A) Expected tosses to first see HHH, and to first see THH. (B) Probability HHH appears before THH. (C) If two players pick different triplets in turn and the first to appear wins, should you pick first or second, and with what winning chance?

Show answer

Answer: A: HHH needs 14 tosses, THH needs 8; B: 1/8; C: go second, player 2 can always get at least 2/3 (player 1 best picks HTH, HTT, THH, THT).

Key idea: Expected absorption time; THH beats HHH unless start is HHH; nontransitive, pick triplet whose last two match rival's first two.

Color BallsFree

A box holds n balls, each a different color. Repeatedly pick an ordered pair at random, repaint the first ball to match the second, and return them. Find the expected number of steps until all n balls share one color.

Show answer

Answer: Expected steps = (n-1)^2.

Key idea: Condition on final color (prob 1/n by symmetry); Markov chain on count of that color with Bayes-adjusted transitions; recursion.

5.2 Martingale and Random Walk

Drunk ManFree

A drunk stands at meter 17 of a 100 meter bridge and each step moves him forward or back one meter with equal chance. Find the probability he reaches meter 100 before meter 0, and the expected number of steps until he reaches either end.

Show answer

Answer: P(home first) = 17/100; expected steps E[N] = 17 x 83 = 1411. (The book prints 1441, a typo; its own formula alpha x beta gives 1411.)

Key idea: S_n and S_n^2 - n are martingales; optional stopping with boundaries 83 and -17.

Dice Game (Wald, Reroll On 4 5 6)Free

Roll a die and collect the face value each roll; a 4, 5 or 6 lets you roll again, a 1, 2 or 3 ends the game. Find the expected total payoff.

Show answer

Answer: Expected payoff = 7.

Key idea: Wald's equality: E[S_N] = E[X] E[N] = (7/2) x 2, since N is geometric with p = 1/2.

Ticket LineFree

2n people queue for $5 tickets; n hold only a $5 bill and n hold only a $10 bill, and the seller starts with no change. Find the probability that nobody has to wait for change, i.e. every person is served in order.

Show answer

Answer: Probability = 1/(n+1) (Catalan count C(2n,n) - C(2n,n-1) over C(2n,n)).

Key idea: Map to a +1/-1 walk that must stay nonnegative; reflection principle counts bad paths as paths ending at -2.

Coin SequenceFree

With a fair coin, find the expected number of tosses needed to obtain n heads in a row; the book also works the pattern HHTTHH as an example of the general method.

Show answer

Answer: E[tosses for n heads in a row] = 2^(n+1) - 2; for the pattern HHTTHH the expectation is 2^6 + 2^2 + 2 = 70.

Key idea: Induction E[f(n+1)] = 2E[f(n)] + 2, or the gambler-joins-each-toss martingale (Li's method) summing payoffs of matching suffix-prefix overlaps.

5.3 Dynamic Programming

Dice Game (Up To 3 Rolls, Stop Or Continue)Free

You may roll a die up to 3 times; after the first or second roll you can stop and take the face value in dollars or forgo it and roll again, and you must accept the third roll. Find the value of the game and the optimal strategy.

Show answer

Answer: Value = 14/3 = 4.67 dollars; stop on 5 or 6 after roll 1, stop on 4, 5 or 6 after roll 2, take roll 3.

Key idea: Backward induction: third roll worth 3.5, so second stage worth 4.25, then first stage 4/6 x 4.25 + (5+6)/6.

World SeriesPro

Red Sox and Rockies play a best-of-7 series (first to 4 wins). You have $100 and can only place double-or-nothing bets on individual games. How much to bet each game so that you end up exactly +$100 if the Red Sox win the series and exactly -$100 if they lose?

Show answer

Answer: Bet 31.25 on game 1; at state (i,j) bet y = (f(i+1,j) - f(i,j+1))/2 where f(i,j) averages its two successors, terminal f = +100 or -100.

Key idea: Backward induction on wins state (i,j) from terminal payoffs; equals delta hedging a zero-rate binomial tree.

Dynamic Dice GameFree

Roll a die as often as you like: faces 1 to 5 add that many dollars to your winnings, a 6 wipes out everything and ends the game; after any roll you may stop and keep the money. How much would a risk-neutral player pay to play?

Show answer

Answer: Pay at most $6.15 (E[f(0)] = 6.15); keep rolling while accumulated money is at most $14, stop at 15 or more.

Key idea: Reroll iff 5n/6 + 2.5 > n, i.e. n <= 14; backward recursion E[f(n)] = (1/6) sum E[f(n+i)].

Dynamic Card GameFree

A dealer draws from a shuffled 52-card deck (26 red, 26 black) one at a time; you get $1 per red card and lose $1 per black card and may stop whenever you like. Find the optimal stopping rule and the fair price of the game.

Show answer

Answer: Fair value E[f(26,26)] = $2.62; stop at state (b black, r red left) iff b - r >= b/(b+r) f(b-1,r) + r/(b+r) f(b,r-1).

Key idea: DP on cards left (b,r): f(b,r) = max(b-r, expected continuation), f(0,r) = 0, f(b,0) = b; American-option recursion.

5.4 Brownian Motion and Stochastic Calculus

Brownian Motion (Definition And Properties)Free

Define a Brownian motion W(t) and list its main properties, including the martingales built from it.

Show answer

Answer: W(0) = 0, independent increments, W(t) - W(s) ~ N(0, t-s); continuous, W(t) ~ N(0,t), martingale, Cov(W(s),W(t)) = min(s,t), Markov; W^2 - t and exp(aW - a^2 t/2) are martingales.

Key idea: Recite definition (W(0)=0, independent normal increments) plus quadratic and exponential martingales.

Brownian Motion (Correlation With Its Square)Free

Find the correlation between a Brownian motion B_t and its square B_t^2 at the same time t.

Show answer

Answer: Correlation is 0 (Cov = E[B^3] - E[B] E[B^2] = 0 - 0 = 0).

Key idea: B_t ~ N(0,t) is symmetric so all odd moments vanish; uncorrelated but not independent.

Brownian Motion (P(B1 > 0 And B2 < 0))Free

For a standard Brownian motion, find the probability that B_1 is positive and B_2 is negative.

Show answer

Answer: 1/8.

Key idea: B_1 and B_2 - B_1 are iid N(0,1); need B_1 > 0, increment negative, |increment| > B_1: (1/2)^3 by symmetry.

Stopping Time (Hit -1 Or 1)Free

Find the expected time for a standard Brownian motion started at 0 to first reach either -1 or +1.

Show answer

Answer: E[T] = 1 (in general E[T] = alpha x beta for boundaries alpha and -beta).

Key idea: B_t^2 - t is a martingale (Ito's lemma); optional stopping gives E[T] = E[B_T^2] = 1.

First Passage Time (Density And Mean)Free

For a standard Wiener process and x > 0, let tau_x be the first time the process reaches level x. Find the probability density of tau_x and its expected value.

Show answer

Answer: P(tau_x <= t) = 2 - 2N(x/sqrt(t)); density f(t) = x exp(-x^2/(2t)) / (t sqrt(2 pi t)); E[tau_x] = infinity although P(tau_x < infinity) = 1.

Key idea: Reflection principle: P(tau_x <= t) = 2P(W(t) >= x); differentiate in t; mean is alpha x beta with beta infinite.

Stopping Time (Hit 3 Before -5, With And Without Drift)Free

A driftless Brownian motion starts at 0: find the probability it hits 3 before -5. Repeat when the process has drift m, dX = m dt + dW.

Show answer

Answer: No drift: 5/8; with drift m: P = (e^(10m) - 1)/(e^(10m) - e^(-6m)).

Key idea: Optional stopping, P = beta/(alpha+beta); with drift use exponential martingale exp(-2mX) or solve mP' + P''/2 = 0.

Stopping Time (Drift +1, Ever Reach -1)Free

A process follows dX = dt + dW(t) starting at 0. Find the probability that it ever reaches the level -1.

Show answer

Answer: P = e^(-2).

Key idea: Exponential martingale exp(-2mX) with m = 1, boundaries -1 and +infinity: P e^2 + (1-P) x 0 = 1.

Ito's Lemma (Z = sqrt(t) B_t)Pro

Let Z_t = sqrt(t) B_t where B_t is a Brownian motion. Find the mean and variance of Z_t and decide whether Z_t is a martingale.

Show answer

Answer: Mean 0, variance t^2 (Z_t ~ N(0, t^2)); not a martingale since dZ has drift term (1/2) t^(-1/2) B_t dt.

Key idea: Apply Ito's lemma to f(B,t) = sqrt(t) B; nonzero drift means not a martingale despite zero unconditional mean.

Ito's Lemma (W(t)^3 Martingale?)Pro

Let W(t) be a Brownian motion. Determine whether W(t)^3 is a martingale.

Show answer

Answer: No: d(W^3) = 3W dt + 3W^2 dW has nonzero drift 3W(t).

Key idea: Ito's lemma on f = W^3: drift = (1/2) f'' = 3W, nonzero with probability 1.

Chapter 6: Finance (29 problems)

Option pricing, put-call parity, Black-Scholes, the Greeks, spreads and exotics, then portfolio optimization, VaR, duration and rates. More: options pricing bank.

6.1 Option Pricing

Price Direction of OptionsFree

Explain how the prices of vanilla European and American calls and puts move when the stock price, strike, time to maturity, volatility, risk-free rate, or dividends increase.

Show answer

Answer: Calls rise with S, sigma, r; fall with K, D. Puts the opposite except sigma (up). Longer maturity raises American options; ambiguous for European.

Key idea: Payoff reasoning holding one factor fixed at a time; Table 6.1.

Put-Call ParityPro

State the put-call parity relation for European options on a stock with no dividends and give a proof.

Show answer

Answer: c + K e^(-r tau) = p + S. Call plus zero-coupon bond and put plus stock both pay max(S_T, K), so no arbitrage forces equal prices.

Key idea: Replicating portfolios with identical terminal payoff must have equal value today.

American vs European Options, never exercise a call earlyFree

Explain why an American call on a stock paying no dividends should never be exercised before maturity, so it is worth the same as the European call.

Show answer

Answer: Early exercise gives only intrinsic value S minus K; the live call also holds time value of the strike plus a put, and Jensen shows e^(-r tau) E[C(S_T)] >= C(S).

Key idea: Decompose c = (S minus K) + (K minus K e^(-r tau)) + p; convexity plus Jensen.

American vs European Options, put arbitrageFree

European puts on a non-dividend stock: strike 80 trades at 8 and strike 90 trades at 9. Is there an arbitrage?

Show answer

Answer: Yes. Convexity in K requires P(80) <= (8/9) P(90) = 8, so the 80 put is overpriced: short 9 of them, long 8 of the 90 puts.

Key idea: Put price is convex in strike with P(0) = 0, so P(aK) <= a P(K).

Black-Scholes-Merton Differential EquationPro

Write the Black-Scholes-Merton PDE and outline its derivation.

Show answer

Answer: dV/dt + r S dV/dS + (1/2) sigma^2 S^2 d2V/dS2 = r V. Hold one derivative short dV/dS shares; the portfolio has no dW term so it earns r.

Key idea: Ito on V(S,t), delta hedge kills diffusion, riskless portfolio earns r; special case of Feynman-Kac.

Black-Scholes Formula, assumptionsPro

List the assumptions underlying the original Black-Scholes call and put formulas.

Show answer

Answer: No dividends; constant known r; geometric Brownian motion with constant mu and sigma; no transaction costs or taxes, short proceeds investable; perfect divisibility; no arbitrage.

Key idea: Six standard assumptions behind c = S N(d1) minus K e^(-r tau) N(d2).

Black-Scholes Formula, risk-neutral derivationPro

Derive the Black-Scholes price of a European call on a non-dividend stock using the risk-neutral measure.

Show answer

Answer: Under Q, ln S_T ~ normal, mean ln S + (r minus sigma^2/2) tau; integrating the discounted payoff over S_T > K gives S N(d1) minus K e^(-r tau) N(d2).

Key idea: c = e^(-r tau) E_Q[max(S_T minus K, 0)]; complete the square; N(d2) is the exercise probability.

Black-Scholes Formula, PDE derivationPro

Derive the Black-Scholes call price by solving the Black-Scholes-Merton PDE directly.

Show answer

Answer: Change variables y = ln S, u = e^(r tau) V, x = y + (r minus sigma^2/2) tau; the heat kernel gives S N(d1) minus K e^(-r tau) N(d2).

Key idea: Change variables to reduce the PDE to a heat equation, then apply the fundamental solution.

Black-Scholes Formula, hitting-level optionPro

With zero interest rate and a non-dividend stock at 1, an option pays 1 the first time the price reaches H > 1. What is it worth?

Show answer

Answer: 1/H. With r = 0 the value equals the risk-neutral probability of ever hitting H, which is 1/H; replication with 1/H shares confirms it.

Key idea: S is a martingale with barriers 0 and H, so P(hit H) H = 1; no-arbitrage bounds both sides.

Black-Scholes Formula, inverse stock price contractPro

A non-dividend stock follows geometric Brownian motion. Value a contract paying 1/S_T at maturity T.

Show answer

Answer: V = (1/S_t) e^((sigma^2 minus 2 r) tau). Under Q, 1/S is a GBM with drift sigma^2 minus r, so E[1/S_T] = (1/S_t) e^((sigma^2 minus r) tau), then discount.

Key idea: Ito on V = 1/S gives a GBM; take the lognormal expectation and discount at r.

6.2 The Greeks

Delta, European call derivationFree

What is the delta of a European call on a non-dividend stock, and how is it derived correctly?

Show answer

Answer: Delta = N(d1). Differentiating fully, the terms S N'(d1) dd1/dS and K e^(-r tau) N'(d2) dd2/dS cancel because S N'(d1) = K e^(-r tau) N'(d2).

Key idea: Do not treat N(d1), N(d2) as constants; the extra derivative terms cancel exactly.

Delta, at-the-money call estimateFree

Estimate the delta of an at-the-money call on a non-dividend stock, and describe what happens to it as maturity approaches.

Show answer

Answer: Slightly above 0.5 since d1 = (r/sigma + sigma/2) sqrt(tau) > 0; longer maturity gives higher delta, and as tau goes to 0 delta tends to N(0) = 0.5.

Key idea: At S = K, d1 depends only on (r/sigma + sigma/2) sqrt(tau).

Delta, hedging a long callFree

You hold a long European call on GM and want to hedge the stock-price risk dynamically. How do you hedge, and how do you rebalance after a sudden rise in GM?

Show answer

Answer: Short delta = e^(-y tau) N(d1) shares per call and lend K e^(-r tau) N(d2). After a jump up, delta rises, so short more stock and lend more cash.

Key idea: Delta hedging makes the position delta neutral; delta increases monotonically with S.

Delta, at-the-money call value approximationFree

Give a quick estimate of the value of an at-the-money call on a non-dividend stock when rates are low and maturity is short.

Show answer

Answer: c is approximately 0.4 sigma S sqrt(tau). With r near 0, c = S (N(d1) minus N(d2)) and the difference d1 minus d2 = sigma sqrt(tau) times 1/sqrt(2 pi).

Key idea: Both d1 and d2 near zero, so N(d1) minus N(d2) is about (d1 minus d2)/sqrt(2 pi).

GammaFree

What happens to the gamma of an at-the-money European option as it approaches maturity?

Show answer

Answer: Gamma = N'(d1)/(S sigma sqrt(tau)) goes to infinity: at S = K, d1 goes to 0 so the numerator is 1/sqrt(2 pi) while the denominator vanishes.

Key idea: Differentiate delta = N(d1); at the money the sqrt(tau) denominator drives gamma up.

Theta, when positiveFree

When can a European option have positive theta?

Show answer

Answer: Deep in-the-money European puts: theta is about r K e^(-r tau) > 0. Also deep in-the-money European calls on high-dividend stocks, where the y S e^(-y tau) N(d1) term dominates.

Key idea: Examine the theta formula limits when N'(d1) is near 0 and N(d2) near 1.

Theta, delta-neutral long call portfolioFree

You are long a GM call and delta neutral via short shares (no dividends). What happens to the portfolio value on an immediate move up or down, and is this an arbitrage?

Show answer

Answer: Value rises either way since the portfolio is long gamma. Not arbitrage: Theta + (1/2) sigma^2 S^2 Gamma = r V, so positive gamma is paid for by negative theta.

Key idea: Gamma-theta trade-off in the Black-Scholes-Merton PDE for a delta-neutral position.

Vega, implied volatility and smileFree

Explain implied volatility and the volatility smile, and what the smile implies about the Black-Scholes model.

Show answer

Answer: Implied vol equates model and market prices; the smile is implied vol versus strike (a skew for equities). It shows volatility is neither constant nor deterministic and prices may jump.

Key idea: Non-constant implied vol across strikes contradicts the constant-volatility lognormal assumption.

Vega, constant versus random volatilityFree

Would a European call be worth more priced at a constant 30% volatility or with volatility drawn randomly with mean 30%?

Show answer

Answer: Usually the random one, since c is convex in sigma when Volga = vega d1 d2/sigma > 0. Near the money d1 > 0 > d2, so constant can win.

Key idea: Jensen applies only where the call price is convex in sigma; check the sign of d1 d2.

Vega, risk-neutral density from call pricesFree

Given European call prices for every strike K but an unknown price process, recover the risk-neutral density of S_T.

Show answer

Answer: f(K) = e^(r tau) d2c/dK2. Since c = e^(-r tau) integral of (s minus K) f(s) ds over s > K, differentiate twice in K.

Key idea: Breeden-Litzenberger: second strike derivative of the call price via the Leibniz rule.

6.3 Option Portfolios and Exotic Options

Bull SpreadPro

What bounds apply to the price of a bull call spread?

Show answer

Answer: Long call at K1, short call at K2 > K1: price c1 minus c2 is positive, at most e^(-r T) (K2 minus K1), and at most S (K2 minus K1)/K2.

Key idea: Payoff is capped at K2 minus K1 and by (K2 minus K1) S_T/K2.

StraddlePro

Describe a straddle and explain when an investor would buy one.

Show answer

Answer: Long a call and a put with the same K and T; payoff |S_T minus K|. Buy when expecting a big move or realized volatility above implied.

Key idea: ATM call and put are each about 0.4 sigma S sqrt(tau), nearly linear in volatility.

Binary OptionsPro

Price a cash-or-nothing European call on a non-dividend GBM stock, describe how to hedge it, and note the hedging limitation.

Show answer

Answer: Price is e^(-r tau) N(d2). Delta hedge with e^(-r tau) N'(d2)/(S sigma sqrt(tau)) shares, or replicate with a tight bull spread; near expiry at the money delta explodes.

Key idea: N(d2) is the risk-neutral in-the-money probability; delta is unbounded as tau goes to 0 near K.

Exchange OptionsFree

Price an option paying max(S2_T minus S1_T, 0) where both stocks are non-dividend GBMs with correlation rho.

Show answer

Answer: S2 N(d1) minus S1 N(d2) with sigma_s = sqrt(sigma1^2 minus 2 rho sigma1 sigma2 + sigma2^2), d1 = (ln(S2/S1) + 0.5 sigma_s^2 tau)/(sigma_s sqrt(tau)), d2 = d1 minus sigma_s sqrt(tau).

Key idea: Change numeraire to S1: a call on S2/S1 with strike 1, rate 0, volatility sigma_s (Margrabe).

6.4 Other Finance Questions

Portfolio OptimizationPro

Stocks A and B both return 12% expected; A has 20% standard deviation, B 30%, correlation 50%. How do you weight them to minimize portfolio risk?

Show answer

Answer: Put 6/7 in A and 1/7 in B. w_A = (sigma_B^2 minus rho sigma_A sigma_B)/(sigma_A^2 minus 2 rho sigma_A sigma_B + sigma_B^2) = (0.09 minus 0.03)/(0.04 minus 0.06 + 0.09).

Key idea: Minimize two-asset variance; equal expected returns make the return constraint irrelevant.

Value at RiskPro

Explain VaR and its drawback for measuring derivative risk.

Show answer

Answer: VaR is the loss threshold exceeded only with probability 1 minus alpha (a percentile). It ignores tail shape and is not sub-additive, hence not coherent.

Key idea: Two independent 3% default CDS positions each have zero 95% VaR but 1M combined.

Duration and ConvexityFree

Find the price and duration of a 5-year inverse floater, face 100, semiannual coupon at annual rate 30% minus 3r, with a flat 7.5% yield curve.

Show answer

Answer: Price 100, duration 14.98. Replicate with 4 fixed 7.5% bonds long and 3 floaters short: dollar duration 4 x 410.64 minus 3 x 48.19 = 1498.

Key idea: Cash-flow replication; dollar durations add, floater duration equals a six-month zero.

Forward and FuturesPro

How do futures differ from forwards, and which is priced higher when the underlying is strongly positively correlated with stochastic interest rates?

Show answer

Answer: Futures are exchange-traded and marked to market daily; forwards are OTC and settle at maturity. With positive correlation, futures gains are reinvested at high rates, so futures price higher.

Key idea: Daily settlement interacts with rate moves; equal prices only if rates are deterministic.

Interest Rate ModelsPro

Describe some basic interest rate models and how they differ.

Show answer

Answer: Short-rate versus forward-rate (HJM); equilibrium versus no-arbitrage. Vasicek mean-reverts but can go negative; CIR uses sigma sqrt(R) to stay positive; Ho-Lee and Hull-White fit the term structure.

Key idea: Classify by what is modeled and whether the current term structure is matched.

Chapter 7: Algorithms and Numerical Methods (23 problems)

Classic programming questions, bit tricks and the numerical methods behind pricing and simulation. More: coding bank.

7.1 Algorithms

Number SwapFree

Swap two integers i and j without using any extra storage.

Show answer

Answer: Arithmetic: i = i + j; j = i minus j; i = i minus j. Or XOR: i ^= j; j ^= i; i ^= j.

Key idea: Encode both values in one variable using sum or XOR, then peel them apart.

Unique ElementsPro

Given a sorted array such as [1,1,3,3,3,5,5,5,9,9,9,9], write code returning the distinct values [1,3,5,9].

Show answer

Answer: Push the first element, then scan once and push a[i] whenever a[i] differs from a[i minus 1]; O(n).

Key idea: In a sorted array a new value always differs from its predecessor.

Horner's AlgorithmPro

Write an efficient algorithm to evaluate the polynomial A0 + A1 x + A2 x^2 + ... + An x^n.

Show answer

Answer: Nest as (((An x + An-1) x + An-2) x + ...) x + A0: B = An, then repeatedly B = B x + A(k); n multiplications.

Key idea: Horner's rule evaluates a polynomial with one multiply and add per coefficient.

Moving AveragePro

Given a long array A of length m, efficiently compute the n-element moving average array B.

Show answer

Answer: Running sum: S = A[1] + ... + A[n], B[n] = S/n; for i > n, S = S minus A[i minus n] + A[i], B[i] = S/n. O(m).

Key idea: Update the window sum incrementally instead of recomputing it.

Sorting AlgorithmFree

Describe three algorithms to sort n distinct values and analyze their complexity.

Show answer

Answer: Insertion sort: average and worst Theta(n^2). Merge sort: T(n) = 2T(n/2) + O(n) gives Theta(n log n). Quicksort: worst Theta(n^2), average Theta(n log n).

Key idea: Master theorem for merge sort; pair-comparison probability 2/(q minus p + 1) for quicksort average.

Random Permutation, shuffling a deckFree

With a uniform random number generator, shuffle 52 cards so every ordering is equally likely.

Show answer

Answer: Assign a random number to each card and sort, Theta(n log n); or Knuth shuffle: for i = 1..n swap A[i] with A[Random(i, n)], Theta(n).

Key idea: Each step picks uniformly among remaining cards, so each order has probability 1/n!.

Random Permutation, uniform pick from a streamFree

A file of characters is read sequentially and its length is unknown. Pick one character so that each is equally likely.

Show answer

Answer: Reservoir sampling: keep the current pick with probability n/(n+1) and replace it with the (n+1)th character with probability 1/(n+1); induction gives 1/m each.

Key idea: Replace the held item with probability 1/k at step k.

Search Algorithm, minimum and maximumPro

Find both the minimum and maximum of n numbers using at most 3n/2 comparisons.

Show answer

Answer: Compare elements in n/2 pairs, sending smaller to group A and larger to group B (n/2 comparisons); then min of A and max of B take n/2 minus 1 each.

Key idea: Pairwise pre-comparison halves the candidates for each extreme.

Search Algorithm, first nonzero elementPro

An array of unknown size starts with zeros then becomes all nonzero. Find the position of the first nonzero element.

Show answer

Answer: Probe positions 1, 2, 4, 8, ... until a nonzero is found at 2^i, then binary search between 2^(i minus 1) and 2^i; Theta(log n).

Key idea: Exponential search to bound the range, then binary search inside it.

Search Algorithm, sorted gridPro

In an n by n grid where each row increases left to right and each column increases top to bottom, find a given number. What is the complexity?

Show answer

Answer: Start at the top of the last column, move down while entries are smaller, then left along the row, alternating; at most 2n steps, O(n).

Key idea: Each comparison eliminates a full row or column from the top-right corner.

Fibonacci NumbersFree

A naive recursive Fibonacci(n) takes 100 seconds. How long does Fibonacci(n+1) take, is it efficient, and how should Fibonacci numbers be computed?

Show answer

Answer: About 162 seconds, since T(n+1)/T(n) tends to the golden ratio (1 + sqrt 5)/2. Exponential, so iterate in Theta(n) or use recursive squaring of the matrix [[1,1],[1,0]] in Theta(log n).

Key idea: Running time satisfies the Fibonacci recurrence; matrix power with divide and conquer.

Maximum Contiguous SubarrayFree

Given an array of n positive and negative numbers, find the maximum sum over any contiguous subarray.

Show answer

Answer: O(n): track prefix sum T and its running minimum Tmin; Vmax = max over j of T(j) minus Tmin. Sample array gives 9 on [4, -3, 2, 6].

Key idea: V(i,j) = T(j) minus T(i minus 1); maximize by minimizing the earlier prefix sum.

7.2 The Power of Two

Power of 2?Free

How do you test whether an integer is a power of 2?

Show answer

Answer: x is a power of 2 if and only if x & (x minus 1) == 0 (for x > 0).

Key idea: 2^n has a single set bit and 2^n minus 1 has the n lower bits set, sharing none.

Multiplication by 7Free

Multiply an integer by 7 quickly without using the multiplication operator.

Show answer

Answer: (x << 3) minus x, since shifting left by 3 multiplies by 8 (beware overflow).

Key idea: Bit shift for the power of two, then subtract.

Probability SimulationFree

Using only a fair coin, design a game whose winning probability is any given p in (0, 1).

Show answer

Answer: Write p in binary 0.p1 p2 ...; toss coins for bits s_i. At the first i where s_i differs from p_i, win if s_i < p_i, else lose.

Key idea: Compare a uniform random binary fraction with p digit by digit.

Poisonous WineFree

One of 1000 wine bottles is poisoned; poison kills a mouse in exactly 18 hours with no earlier symptoms. With 10 mice and 20 hours, can you surely identify the bottle?

Show answer

Answer: Yes. Label bottles 1 to 1000 in 10-bit binary; mouse k sips every bottle whose bit k is 1. The dead-mice pattern, read as bits, gives the bottle number.

Key idea: Parallel binary encoding: each mouse tests one bit for all bottles at once.

7.3 Numerical Methods

Monte Carlo Simulation, pricing a European callFree

Explain how to price a European call with Monte Carlo simulation.

Show answer

Answer: Simulate M risk-neutral GBM paths, S(t+dt) = S(t) exp((r minus sigma^2/2) dt + sigma sqrt(dt) eps), average max(S_T,k minus K, 0), and discount by e^(-r (T minus t)).

Key idea: Law of large numbers on discounted risk-neutral payoffs; one step suffices for European payoffs.

Monte Carlo Simulation, generating normal random variablesFree

Your computer only produces uniform(0,1) numbers. How do you generate N(mu, sigma^2) random variables?

Show answer

Answer: Generate x ~ N(0,1) by inverse transform x = F^(-1)(u) (numerical) or acceptance-rejection using an exponential proposal g with M = sqrt(2e/pi) about 1.32; then return mu + sigma x.

Key idea: Inverse CDF method or rejection sampling with bound f(y) <= M g(y); accept if v <= f/(M g).

Monte Carlo Simulation, variance reductionFree

Describe several variance reduction techniques that make Monte Carlo simulation more efficient.

Show answer

Answer: Antithetic variables (pair eps with minus eps), moment matching (rescale samples), control variates (correct with an analytically priced related derivative), importance sampling (change of measure), low-discrepancy sequences.

Key idea: Standard error falls as sigma/sqrt(M); reduce sigma or use quasi-random points for 1/M convergence.

Monte Carlo Simulation, delta and gamma without closed formFree

An option has no closed-form price. How do you estimate its delta and gamma?

Show answer

Answer: Simulate at S minus dS, S, S + dS using common random numbers: delta = (f(S+dS) minus f(S minus dS))/(2 dS), gamma = (f(S+dS) minus 2f(S) + f(S minus dS))/dS^2.

Key idea: Central finite differences on simulated prices with common random numbers.

Monte Carlo Simulation, estimating piFree

How can Monte Carlo simulation estimate pi?

Show answer

Answer: Draw independent uniform (x, y) in the unit square; the fraction p with x^2 + y^2 <= 1 is about pi/4, so pi is estimated by 4p.

Key idea: Area ratio of quarter circle to unit square; more points give higher precision.

Finite Difference Method, overviewFree

Briefly explain finite difference methods for pricing derivatives.

Show answer

Answer: Grid the heat equation in tau and x. Explicit: u(n+1,j) = a u(n,j-1) + (1 minus 2a) u(n,j) + a u(n,j+1), a = dt/dx^2. Implicit: backward time; Crank-Nicolson averages both.

Key idea: Discretize time and space; recurse from boundary conditions using central second differences in x.

Finite Difference Method, time versus space stepsFree

Solving a parabolic PDE with the explicit finite difference method, is it worse to use too many time steps or too many space steps?

Show answer

Answer: Too many space steps is worse: stability needs 1 minus 2a > 0, i.e. dt/dx^2 < 1/2, so tiny dx breaks it while small dt helps. Implicit is always stable.

Key idea: Explicit scheme stability condition dt/(dx)^2 < 1/2.

What the Green Book covers

Seven chapters, organized around the topics quant interviews keep returning to:

  • General principles (Chapter 1): how to approach an interview problem. No exercises.
  • Brain teasers (Chapter 2): logic, symmetry, pigeonhole, modular arithmetic, induction, contradiction. The classic warm-up filter.
  • Calculus and linear algebra (Chapter 3): a compact math review of limits, integration, Taylor series, ODEs, and matrix decompositions.
  • Probability theory (Chapter 4): conditional probability, Bayes, combinatorics, distributions, expectation, order statistics. The largest and most valuable chapter.
  • Stochastic process and stochastic calculus (Chapter 5): Markov chains, martingales, random walks, dynamic programming, Brownian motion, Ito's lemma.
  • Finance (Chapter 6): option pricing, Black-Scholes, the Greeks, option portfolios, and a few fixed-income and risk questions.
  • Algorithms and numerical methods (Chapter 7): classic programming questions, bit tricks, Monte Carlo, finite differences.

Counted the way the book names them, there are about 147 problems. The cover's "more than 200" is fair because many entries carry lettered sub-questions.

Strengths, gaps, and how to use it

  • Strength: problem selection. The chapters 2, 4 and 5 problems are still the ones interviewers reach for, sometimes word for word.
  • Strength: breadth in one place: brain teasers through Ito's lemma in under 200 pages.
  • Gap: the solutions are terse and skip the "why", which is what the enhanced versions above add: hints, intuition and the general pattern.
  • Gap: no coding, no market-making games, no firm-specific online assessments, all of which now decide first rounds. Cover those with the OA guide and trading games.
  • How to use it: attempt before reading, write your own solution, then compare. Time yourself on the second pass. Track what you missed and redo only those.

A realistic week-by-week plan

Candidates who share their timelines most commonly report 8 to 12 weeks at 1 to 2 hours a day, with probability taking the largest share. A plan that matches how the book is structured:

  • Weeks 1 to 3: Probability (Chapter 4). Closed-book attempts first, solutions second. This chapter earns the slow pace.
  • Week 4: Brain teasers (Chapter 2). Learn the recurring pattern families rather than memorizing answers.
  • Weeks 5 to 6: Stochastic calculus and finance (Chapters 5 and 6). Compress these if you are targeting a pure developer seat.
  • Week 7: Algorithms (Chapter 7) plus a first full review pass. Supplement the dated coding material with auto-graded problems.
  • Week 8: Mixed timed sets. Simulate pressure with mental-math reps in the trading games and the 150 most frequently asked quant questions.

The full study plan expands this into a schedule with time budgets per chapter. Treat the timeline as a floor: candidates converting offers at top firms generally layer firm-specific practice on top rather than rereading the book.

Green Book vs the alternatives

The Green Book is usually weighed against three other books and, increasingly, against interactive problem banks:

ResourceBest forCompared with the Green Book
Heard on the Street (Timothy Crack)Breadth and extra brainteaser repsA wider net with 500-plus questions, including general-finance and non-quant material, but lighter on stochastic calculus and modern quant math. The Green Book explains theory before problems, which is why forum consensus makes it the first book and this the second. See the Heard on the Street guide.
Quant Job Interview Questions and Answers (Mark Joshi and co-authors)Quant developer and pricing-quant rolesDeeper on derivatives pricing, numerical methods, and C++ implementation, closer to how bank pricing-quant interviews run. Overkill for pure trading or mental-math roles; read it after the Green Book's finance chapter.
Fifty Challenging Problems in Probability (Frederick Mosteller)Building the probability baseA compact set of classic probability puzzles overlapping heavily with Green Book Chapter 4 (birthday, gambler's ruin, matching problems). Good preparation if Chapter 4 feels too fast. See the Fifty Challenging Problems guide.
QuantVaultVolume, feedback, firm-specific practiceNot a book. Every classic problem above is practiceable with a full worked solution, hints, and intuition, most of them free, alongside 2,800-plus further problems, firm-by-firm interview guides, trading games, and an auto-graded coding judge. Learn the methods from the Green Book, put in the reps here.

For a longer ranking, including which book to buy first for each role, see the best quant interview books.

Community solutions and videos

There is no official solutions manual and no canonical community one either; the space is a scatter of small hobby projects. These are the ones with actual per-problem content. Links open in a new tab.

GitHub repositories

  • ellenzishanli/quant_interview_trainer: a static site covering all 147 problems from Chapters 2 to 7, each with a statement, hint, full solution, and key idea in the author's own words. The most complete public inventory we found. 0 stars, updated June 2026.
  • thewaxmango/green-book-trains-of-thought: Markdown walkthroughs of every Chapter 2 problem and Chapter 4 through section 4.3, written as trains of thought. 0 stars, last updated August 2025.
  • jamaalm01/QuantCodingQs: 29 Jupyter notebooks of coding questions from Joshi and from the Green Book's Chapter 7 (Fibonacci, Horner's method, moving average, random permutation, maximum subarray, Monte Carlo digital call, missing number). 22 stars, last updated March 2024.
  • Luciferbobo/A-Practical-Guide-to-Quantitative-Finance-Interviews-Chinese: a fan translation of the whole book into Chinese with the English problem names kept; explicitly non-commercial and asks readers to buy the book. 5 stars, updated June 2026.
  • Aniruddha-Deb/quant-prep: not solutions, but the most-starred quant prep resource list on GitHub (806 stars); it recommends the book and logs the author's mental-math practice.

YouTube playlists

  • Simple Quant: Quant Green Book: 21 videos, updated February 2026, covering the Chapter 2 brain teasers (plus the poisonous wine problem) with the puzzles lightly re-skinned, for example box packing becomes packing tiles.
  • Pranam Hegde: Quant Green Book All Problems: 17 videos in book order from Screwy Pirates through Quant Salary (sections 2.1 to 2.3). Last updated June 2024 and apparently abandoned.

Both playlists stop at the brain teasers. For Chapters 4 to 7, the index above, the ellenzishanli trainer, and the linked QuantVault solutions are the practical options in English.

Frequently asked questions

Can I work through the Green Book problems online?

Yes. All 176 problems are indexed on this page with the question, a hidden answer and the key idea, and 158 of them have an enhanced version on QuantVault with a full step-by-step solution, hints and intuition, 127 of them free without an account. The Green Book track on QuantVault runs them in book order with a timer and progress tracking.

Is there an official Green Book solutions manual?

No. The only official solutions are the ones printed in the book after each problem, and they are famously terse. There is no errata page and no author website. The closest things to a solutions manual are the per-problem index on this page, the small community repositories listed above, and the worked solutions on QuantVault, which show every intermediate step the book skips.

Is the Green Book still relevant in 2026?

Yes, but it is not sufficient on its own. The brain teasers and probability chapters are still asked nearly verbatim at trading firms and hedge funds, and the stochastic calculus and option-pricing chapters remain the core of quant research interviews. What has changed is the format: most firms now add an auto-graded online assessment and a coding screen that the book does not prepare you for, and interviews go deeper into variants than the book's single solution per problem.

Is the Green Book enough to prepare for a quant interview?

It is the best single starting point but rarely enough. Its solutions are terse, it has no firm-specific guidance, no coding environment, and no variants to test whether you learned the method or memorized the answer. Most successful candidates pair it with a large problem bank for repetition, firm-by-firm question data, and timed mental-math practice for trading roles.

How long does it take to work through the Green Book?

Candidates who share timelines most commonly report 8 to 12 weeks at 1 to 2 hours a day if they attempt every problem closed-book before reading the solution. Chapter 4 (probability) alone usually takes 2 to 3 weeks. Reading the book cover to cover without attempting the problems takes a few days and teaches much less. Our Green Book study plan lays out a week-by-week schedule.

Which Green Book chapters matter for quant trading, quant research, and quant developer roles?

Quant trading: Chapters 1, 2, 4, and the dynamic-programming part of Chapter 5, plus heavy mental-math practice the book does not include. Quant research: Chapters 4, 5, and 6 in depth, with the Chapter 3 math review as needed. Quant developer: Chapter 7 plus Chapters 4 and 6 for the domain, paired with real coding practice. Every role should master Chapter 4.

Green Book vs Heard on the Street: which should I read first?

Read the Green Book first. It explains the theory before the problems and is tighter on the modern quant canon (probability, stochastic calculus, option pricing). Heard on the Street is broader, with 500-plus questions that include general-finance and non-quant material, and works well as a second book for extra brainteaser reps. See our Heard on the Street guide and the best quant interview books comparison.

How many problems does the Green Book have?

Counted the way the book names them, 176 problems across chapters 2 to 7 (chapter 1 has none), and more than 200 if you count lettered sub-questions. All 176 are indexed on this page in book order with answers.

Do I need to solve every problem, and should I memorize the solutions?

Solve every problem in Chapters 2 and 4 and everything relevant to your target role in Chapters 5 to 7; skim Chapter 3 for what is rusty. Do not memorize solutions. Interviewers ask variants precisely to catch memorized answers, so the goal is to recognize the pattern family (parity invariant, symmetry, backward induction, conditioning on the first step) and rebuild the argument. Drilling the variant problems linked in the index above is the fastest way to test that.

Which QuantVault problems correspond to the Green Book?

The chapter tables on this page link each Green Book problem to the QuantVault problem that is the same puzzle or a close variant, for example the Pirate Game, Bridge and Lantern Crossing, Four Switches One Light Bulb, Airplane Boarding, Birthday Problem, Gambler's Ruin, Coupon Collector, Optimal Stopping Three-Roll Dice Game, Brownian Motion Exit From an Interval, and Poisoned Bottle Identification. Most of these are in the free tier, and each comes with a full worked solution, hints, and intuition.

Practice the real thing

QuantVault has 2,800+ quant interview problems with full solutions, intuition, and hints, firm-by-firm interview funnels, and an auto-graded coding judge. Start free.