LibraryReference articles

Stochastic calculus interview questions, and the toolkit that answers them

Reference article

Square a small move of size 0.01 and it becomes 0.0001, so ordinary calculus throws it away. A Brownian path makes so many small moves that their squares add up to the time elapsed, and they cannot be thrown away. Almost every stochastic calculus interview question tests whether you keep that one extra term. Keep it, and the questions turn into short calculations.

Stochastic calculus is calculus for quantities that move at random, such as a share price. In quantitative finance, it is the language of option pricing, so interviews for researcher, derivatives trader and pricing developer roles often include it. This page sorts the questions into five kinds, gives the six tools that answer them, and works four examples in full. Everything on this page is written in our own words; some set-ups are classic problems.

The five kinds of question

We sort the stochastic calculus questions we see in interview preparation books and in our own question bank into five kinds. This is our grouping, not a standard one.

  1. Properties of Brownian motion. What is the distribution of WtW_t? Are two increments independent? What is the covariance of the path at two times?
  2. Apply Ito's lemma. Write the dynamics of f(Wt)f(W_t) or f(t,St)f(t, S_t) for a given ff.
  3. Is it a martingale? Decide whether a process is a fair game, and fix it if it is not.
  4. Moments of a stochastic integral. Find the mean and the variance of something like ∫0TWt dWt\int_0^T W_t \, dW_t.
  5. Pricing. Derive the Black-Scholes equation, or change from the real-world measure to the risk-neutral measure.

Kinds 1 to 4 are the toolkit. Kind 5 puts the toolkit to work.

Tool 1: Brownian motion, in four properties

A standard Brownian motion WW starts at zero and has three more properties: its increments over time windows that do not overlap are independent; an increment over a window of length t−st - s has the normal distribution with mean 0 and variance t−st - s; and the path is continuous. The full treatment, with the properties that surprise people, is on our free Brownian motion page.

Two facts follow and come up again and again:

Tool 2: (dW)2=dt(dW)^2 = dt

Cut [0,T][0, T] into nn equal steps. Each squared increment has mean T/nT/n. There are nn of them, so their sum has mean TT. Its variance shrinks to zero as the steps shrink. So the sum of squared increments is not random in the limit: it is exactly TT. This sum is called the quadratic variation.

In shorthand, (dW)2=dt(dW)^2 = dt. The other products vanish: dt⋅dW=0dt \cdot dW = 0 and (dt)2=0(dt)^2 = 0, because they shrink faster than dtdt. This multiplication table is the whole difference between ordinary calculus and stochastic calculus.

Tool 3: Ito's lemma

Let XX follow dXt=μt dt+σt dWtdX_t = \mu_t \, dt + \sigma_t \, dW_t, and let f(t,x)f(t, x) be smooth. Expand ff to second order and apply the table above:

df=(∂f∂t+μt∂f∂x+12σt2∂2f∂x2)dt+σt∂f∂x dWtdf = \left( \frac{\partial f}{\partial t} + \mu_t \frac{\partial f}{\partial x} + \frac{1}{2} \sigma_t^2 \frac{\partial^2 f}{\partial x^2} \right) dt + \sigma_t \frac{\partial f}{\partial x} \, dW_t

The term with 12σt2\tfrac12 \sigma_t^2 is the one ordinary calculus does not have. It comes from (dX)2=σt2 dt(dX)^2 = \sigma_t^2 \, dt. The full statement and its proof sketch are on our Ito's lemma page.

For two processes, the product rule gains the same kind of extra term: d(XY)=X dY+Y dX+dX dYd(XY) = X \, dY + Y \, dX + dX \, dY.

Tool 4: the zero-drift test for a martingale

A martingale is a process whose best forecast of its future value is its value now. For an Ito process the test is short: write its dtdt term. If the dtdt term is not zero, the process is not a martingale. If it is zero, the process is a local martingale, and it is a true martingale under a mild size condition, for example E∫0Tσt2 dt<∞\mathbb{E} \int_0^T \sigma_t^2 \, dt < \infty.

Interviewers often want both halves: the drift calculation, and a sentence on the condition.

Tool 5: the Ito isometry

For a process HH that does not look into the future,

E[(∫0THt dWt)2]=E∫0THt2 dt.\mathbb{E}\left[ \left( \int_0^T H_t \, dW_t \right)^2 \right] = \mathbb{E} \int_0^T H_t^2 \, dt .

The stochastic integral also has mean zero under the same size condition. Together these two facts turn a variance question about an integral into an ordinary integral.

Tool 6: Girsanov, the change of drift

Girsanov's theorem says that you can change the probability weights so that a Brownian motion with a drift becomes one without a drift. Under the new weights, W~t=Wt+θt\widetilde W_t = W_t + \theta t is a standard Brownian motion, for a constant θ\theta, when the new measure has density exp⁡(−θWT−12θ2T)\exp(-\theta W_T - \tfrac12 \theta^2 T) with respect to the old one on [0,T][0, T]. The volatility does not change. Only the drift does. Our Girsanov theorem page gives the general statement.

Four worked examples

These four are written by us to show the tools in use. Try each one before you read the answer.

Example 1. Is Wt2−tW_t^2 - t a martingale?

Apply Ito's lemma to f(x)=x2f(x) = x^2 with X=WX = W: f′=2xf' = 2x, f′′=2f'' = 2, so d(Wt2)=2Wt dWt+dtd(W_t^2) = 2 W_t \, dW_t + dt. Then d(Wt2−t)=2Wt dWtd(W_t^2 - t) = 2 W_t \, dW_t. The dtdt term is zero. The size condition holds because E∫0T4Wt2 dt=2T2\mathbb{E}\int_0^T 4 W_t^2 \, dt = 2T^2 is finite. So yes, it is a martingale. Note what this says about Wt2W_t^2 alone: its drift is 11, so it is not one.

Example 2. Solve geometric Brownian motion.

A share price in the Black-Scholes model follows dSt=μSt dt+σSt dWtdS_t = \mu S_t \, dt + \sigma S_t \, dW_t. Take f(x)=ln⁡xf(x) = \ln x, so f′=1/xf' = 1/x and f′′=−1/x2f'' = -1/x^2. Ito's lemma gives

dln⁡St=(μ−12σ2)dt+σ dWt,d \ln S_t = \left( \mu - \tfrac12 \sigma^2 \right) dt + \sigma \, dW_t ,

so ST=S0exp⁡((μ−12σ2)T+σWT)S_T = S_0 \exp\left( (\mu - \tfrac12 \sigma^2) T + \sigma W_T \right). The −12σ2-\tfrac12\sigma^2 is the Ito term at work. A candidate who writes ST=S0eμT+σWTS_T = S_0 e^{\mu T + \sigma W_T} has dropped it, and in our view that is the slip to guard against first.

One consequence worth saying: the median of STS_T is S0e(μ−σ2/2)TS_0 e^{(\mu - \sigma^2/2) T}, because WTW_T has median zero. The median sits below S0eμTS_0 e^{\mu T} whenever σ>0\sigma > 0.

Example 3. The mean and variance of ∫0TWt dWt\int_0^T W_t \, dW_t.

The mean is zero, because the integral is a stochastic integral and the size condition holds. For the variance, use the isometry: E[(∫0TWt dWt)2]=∫0TE[Wt2] dt=∫0Tt dt=T2/2\mathbb{E}\left[ \left(\int_0^T W_t \, dW_t\right)^2 \right] = \int_0^T \mathbb{E}[W_t^2] \, dt = \int_0^T t \, dt = T^2/2.

Check it a second way. Example 1 gives ∫0TWt dWt=12(WT2−T)\int_0^T W_t \, dW_t = \tfrac12 (W_T^2 - T). Since WT2/TW_T^2 / T is chi-squared with one degree of freedom, Var⁡(WT2)=2T2\operatorname{Var}(W_T^2) = 2T^2, so the variance is 14⋅2T2=T2/2\tfrac14 \cdot 2T^2 = T^2/2. Two routes agree, which is what an interviewer hopes to see.

Example 4. What is P(W1>0 and W2>0)P(W_1 > 0 \text{ and } W_2 > 0)?

Use the split from Tool 1. W1W_1 and W2W_2 are jointly normal, each with mean zero, with Cov⁡(W1,W2)=Var⁡(W1)=1\operatorname{Cov}(W_1, W_2) = \operatorname{Var}(W_1) = 1, so the correlation is ρ=1/2\rho = 1/\sqrt{2}. For two standard normals with correlation ρ\rho, the chance that both are positive is 14+arcsin⁡(ρ)/(2π)\tfrac14 + \arcsin(\rho) / (2\pi). Here arcsin⁡(1/2)=π/4\arcsin(1/\sqrt2) = \pi/4, so the answer is 14+18=38\tfrac14 + \tfrac18 = \tfrac38.

A sanity check: if the two values were independent the answer would be 14\tfrac14. They are positively linked, so the answer must be above 14\tfrac14, and it is.

From the toolkit to pricing

The Black-Scholes equation is the toolkit in one argument. Hold one option worth V(t,S)V(t, S) and sell Δ\Delta shares. Ito's lemma gives the change in this portfolio as

(∂V∂t+12σ2S2∂2V∂S2)dt+(∂V∂S−Δ)dS.\left( \frac{\partial V}{\partial t} + \tfrac12 \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} \right) dt + \left( \frac{\partial V}{\partial S} - \Delta \right) dS .

Choose Δ=∂V/∂S\Delta = \partial V / \partial S and the random part vanishes. A portfolio with no risk must earn the risk-free rate rr, or there is a free profit. Setting the change equal to r(V−ΔS) dtr (V - \Delta S) \, dt gives

∂V∂t+12σ2S2∂2V∂S2+rS∂V∂S−rV=0.\frac{\partial V}{\partial t} + \tfrac12 \sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + r S \frac{\partial V}{\partial S} - r V = 0 .

The real-world drift μ\mu does not appear. Girsanov explains why: with θ=(μ−r)/σ\theta = (\mu - r)/\sigma, the share price follows dSt=rSt dt+σSt dW~tdS_t = r S_t \, dt + \sigma S_t \, d\widetilde W_t under the risk-neutral measure, and prices are expectations under that measure. Our Black-Scholes equation and risk-neutral valuation pages take this further.

The slips that cost the most

In our view, these five slips cost the most marks.

How to practise

  1. Rebuild the six tools on paper, without notes, until each takes under a minute.
  2. Redo the four examples above, saying each step out loud.
  3. Work the module Brownian motion and Ito calculus in Thuztra Learn, which is our product. Its free pages are Brownian motion and this one; the rest of the module is not free. Two textbook companions are listed in it: Oksendal, Stochastic Differential Equations and Williams, Probability with Martingales.
  4. For the probability that sits underneath all of this, see the best books for quantitative finance interviews.

Membership is a paid subscription: see what Thuztra Learn is and what it costs. Nothing on this page promises an interview result or a job. Education only, not advice.

In short

Learn six tools: the properties of Brownian motion, the rule that dW squared is dt, Ito's lemma, the zero-drift test for a martingale, the Ito isometry, and the change of drift from Girsanov. Then practise saying each step out loud, because the interviewer marks the reasoning as well as the answer.

Terms used here

Related

Brownian motion

The four defining properties, the three that catch people out, and why the one about squared increments is the one every pricing model actually rests on.

Ito's lemma

The chain rule for processes with non-zero quadratic variation, why the second derivative appears at first order, and the four places the theorem stops applying.

Stochastic differential equations

What an SDE actually asserts, when it has a solution, and the difference between solving it for a given noise path and only pinning down the law it produces.

Quadratic variation

Earn the squared-increment limit properly, then watch Ito's lemma fall out of an exact algebraic identity. The second-order term is not a correction to anything.

Martingales

The property is one line and the consequences run through every pricing result we have. Also the three ways the word gets used to mean something it does not.

The Girsanov theorem

How a change of probability measure moves drift without touching volatility, the exact density that does it, and the conditions under which it quietly fails.

The best books for quantitative finance interviews

Nine books for quant interviews, grouped by the stage they help with, plus what the Green Book and Heard on the Street each are, from the author and catalogue records. No book problems copied.

More on these topics

Topics

Also in the library