Quant Memo
Foundational

Derivatives and Differentiation Rules

The precise measure of a function's instantaneous rate of change — the mathematical object behind every 'sensitivity' a quant computes, like an option's delta or a bond's duration.

Prerequisites: Limits and Continuity

An option's delta tells you how much its price moves for a tiny move in the underlying. That's not an average over some range of prices — it's the instantaneous rate of change, right at the current price. Average rate of change over a big move is easy: divide the total price change by the total underlying move. But "instantaneous" — shrinking that move down to essentially nothing while still getting a meaningful number out — needs a precise definition, and that's exactly what the derivative provides.

An analogy: a speedometer versus a trip odometer

A car's average speed over a trip is just total distance divided by total time — easy, but it tells you nothing about how fast the car was going at any particular instant, especially if it sped up and slowed down along the way. A speedometer reads something different: the speed right now, at this exact moment. The derivative is the mathematical speedometer — it takes the same "distance over time" idea used for averages and shrinks the time window down toward zero, until what's left is a genuine instantaneous rate rather than an average over some stretch.

The math, one symbol at a time

The derivative of ff at a point xx is defined as the limit

f(x)=limh0f(x+h)f(x)h.f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}.

In words: take the average rate of change between xx and a nearby point x+hx+h — exactly "change in output over change in input" — and see what value that average settles down to as the gap hh shrinks toward zero. A handful of rules let you compute derivatives without ever using this limit directly: the power rule ddxxn=nxn1\frac{d}{dx}x^n = nx^{n-1}; the product rule ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x)\frac{d}{dx}[f(x)g(x)] = f'(x)g(x) + f(x)g'(x); and the chain rule ddxf(g(x))=f(g(x))g(x)\frac{d}{dx}f(g(x)) = f'(g(x))\,g'(x), which handles a function nested inside another — differentiate the outer function, then multiply by the derivative of what's inside.

Worked example 1: bond price sensitivity by the power rule

A simplified bond price as a function of yield yy is P(y)=1000(1+y)10P(y) = \frac{1000}{(1+y)^{10}} (a 10-year zero paying $1,000 at maturity). Rewriting as P(y)=1000(1+y)10P(y) = 1000(1+y)^{-10} and applying the power rule (with the chain rule, since the inside is 1+y1+y, whose derivative is 1): P(y)=1000×(10)(1+y)11×1=10000(1+y)11P'(y) = 1000 \times (-10)(1+y)^{-11} \times 1 = -10000(1+y)^{-11}. At y=0.05y = 0.05: P(0.05)=10000(1.05)1110000×0.58475847P'(0.05) = -10000(1.05)^{-11} \approx -10000 \times 0.5847 \approx -5847. This says: for a small increase in yield, the price falls by roughly $58.47 per 1% (0.01) move in yield — exactly the intuition behind bond duration, computed directly from the power and chain rules.

Worked example 2: differentiating a product

A trading strategy's daily P&L is modeled as f(t)=te0.1tf(t) = t \cdot e^{-0.1t} (a signal that grows linearly but decays exponentially over time tt, in days). By the product rule, with u=tu=t (u=1u'=1) and v=e0.1tv=e^{-0.1t} (v=0.1e0.1tv' = -0.1e^{-0.1t} by the chain rule): f(t)=1e0.1t+t(0.1e0.1t)=e0.1t(10.1t)f'(t) = 1 \cdot e^{-0.1t} + t \cdot (-0.1 e^{-0.1t}) = e^{-0.1t}(1 - 0.1t). Setting f(t)=0f'(t)=0 gives t=10t=10 — the signal's strength peaks at day 10, after which the exponential decay dominates the linear growth and P&L starts falling. Finding that peak took differentiating a product and solving for where the rate of change crosses zero, without ever plotting the function.

Function explorer
-224.4
x = 1.00f(x) = 1.000

Adjust the exponent and watch how the curve's steepness (its derivative) changes at each point — the tangent line's slope at any point is exactly what f(x)f'(x) computes there.

secant (average rate, far point) tangent (h → 0, the derivative)
As the second point slides closer and closer along the curve, the secant line's slope (average rate of change) settles onto the tangent line's slope — the instantaneous derivative.

What this means in practice

Every "Greek" in options trading — delta, gamma, vega, theta — is a derivative of the option price with respect to some input (underlying price, volatility, time). Bond duration and convexity are the first and second derivatives of price with respect to yield. Anywhere a quant asks "how sensitive is this to a small change in that," the answer is a derivative, computed using exactly these rules chained together for however complicated the pricing formula is.

The derivative f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h\to0} \frac{f(x+h)-f(x)}{h} is the instantaneous rate of change of ff at xx — and the power, product, and chain rules let you compute it for almost any formula built from simpler pieces, without ever evaluating that limit by hand.

The chain rule is the single most commonly botched rule in practice: differentiating f(g(x))f(g(x)) and forgetting to multiply by g(x)g'(x) (the derivative of the inner function) gives a wrong answer that often still looks plausible. In the bond example above, forgetting the inner derivative of (1+y)(1+y) wouldn't have changed the number (since d(1+y)/dy=1d(1+y)/dy=1), which is precisely why this mistake goes unnoticed so often — but the moment the inside is anything other than "input plus a constant" (an exponential decay rate, a volatility term), skipping the chain rule's inner-derivative factor produces a genuinely wrong sensitivity.

Related concepts

Practice in interviews

Further reading

  • Spivak, Calculus, ch. 9
ShareTwitterLinkedIn