CONTENTS

Introduction to Differentiation

Motivation: why this matters in quant finance

Differentiation is the mathematical operation that answers the question: how does one quantity change when another changes by a small amount? In quantitative finance, that question is asked constantly. How does an option price change when the underlying stock moves by $1? How does a bond's value change when the yield shifts by one basis point? How does a portfolio's P&L change over the next instant of time? Each of these is a derivative — in the calculus sense — and the entire apparatus of Greeks (delta, gamma, theta, vega, rho) is nothing more than a catalogue of partial derivatives of a pricing function with respect to its inputs.
More deeply, differentiation is the operation that makes continuous-time finance possible. The Black-Scholes derivation is, at its core, a differential argument: write down how the option value v(S,t)v(S, t) changes over an infinitesimal time step dtdt, construct a hedge that cancels the random part, and set the riskless remainder equal to the risk-free return. Every step requires differentiation — the chain rule to expand dvdv, the product rule to handle the hedged portfolio, and the quotient rule when dealing with ratios like the hedge ratio itself.
Finally, differentiation is the prerequisite for understanding why stochastic calculus differs from ordinary calculus. Itô's Lemma — the chain rule of stochastic calculus — is defined precisely by specifying how and where it corrects the ordinary chain rule. Without a solid grasp of the deterministic rules, the stochastic corrections appear arbitrary rather than necessary.

The derivative: definition and geometric meaning

The limit definition

Let ff be a real-valued function defined on an open interval containing xx. The derivative of ff at xx is:
f(x)=limΔx0f(x+Δx)f(x)Δxf'(x) = \lim_{\Delta x \to 0} \frac{f(x + \Delta x) - f(x)}{\Delta x}
provided the limit exists and is finite. The quantity inside the limit is called the difference quotient: it measures the average rate of change of ff over the interval [x,x+Δx][x, \, x + \Delta x]. The derivative is the instantaneous rate of change — the limit as the interval shrinks to zero.

Equivalent notations in common use:

f(x)=dfdx=ddxf(x)=Df(x)=f˙(x) (when the variable is time)f'(x) = \frac{df}{dx} = \frac{d}{dx}f(x) = Df(x) = \dot{f}(x) \text{ (when the variable is time)}
In quant finance, the Leibniz notation df/dxdf/dx is preferred in most analytical work because it makes the chain rule and differential notation (df=fdxdf = f'\,dx) natural.

Geometric interpretation

Geometrically, f(x)f'(x) is the slope of the tangent line to the graph of ff at the point (x,f(x))(x, f(x)). The tangent line itself is:
L(x+Δx)=f(x)+f(x)ΔxL(x + \Delta x) = f(x) + f'(x) \cdot \Delta x
This is the best linear approximation to ff near xx. It is also the first-order Taylor expansion, which generalises to higher orders:
f(x+Δx)=f(x)+f(x)Δx+12f(x)(Δx)2+f(x + \Delta x) = f(x) + f'(x)\Delta x + \frac{1}{2}f''(x)(\Delta x)^2 + \cdots
In the deterministic setting, the linear term dominates because (Δx)2(\Delta x)^2 is negligibly small. In the stochastic setting — specifically when Δx\Delta x is a Brownian motion increment ΔWΔt\Delta W \sim \sqrt{\Delta t} — the second-order term does not vanish, and this is exactly why Itô's Lemma retains the 12f\frac{1}{2}f'' correction.

The finance interpretation: sensitivity

In quant finance, the derivative v/x\partial v / \partial x is always interpreted as a sensitivity: how much does the output (price, P&L, risk measure) change per unit change in the input (spot, rate, vol, time)?
GreekSymbolDefinitionWhat it measures
DeltaΔ\Deltav/S\partial v / \partial SPrice sensitivity to spot
GammaΓ\Gamma2v/S2\partial^2 v / \partial S^2Curvature of price w.r.t. spot
ThetaΘ\Thetav/t\partial v / \partial tTime decay
VegaV\mathcal{V}v/σ\partial v / \partial \sigmaVolatility sensitivity
Rhoρ\rhov/r\partial v / \partial rInterest rate sensitivity
Every entry in this table is a partial derivative of the option pricing function v(S,t,σ,r,)v(S, t, \sigma, r, \ldots). The Greeks are not a separate topic from differentiation — they are differentiation, applied to a specific function.

Differentiability: what must be true for the derivative to exist

Not every function has a derivative. The limit in the definition must exist and be finite, which requires the function to be "smooth enough" at the point in question. There are three important failure modes:

1. Discontinuity (jumps). If ff has a jump at xx, the difference quotient blows up or oscillates, and no limit exists. In finance, this corresponds to a price gap — an earnings announcement that sends a stock from $100 to $85 overnight. Models built on Brownian motion assume continuous paths and therefore assume no jumps; jump-diffusion models relax this.
2. Corners (kinks). The function may be continuous but have different slopes from the left and right. The classic financial example is the call option payoff (SK)+(S - K)^+: it has slope 0 for S<KS < K and slope 1 for S>KS > K, with a kink at S=KS = K. The derivative does not exist at the kink. In practice, the delta of a call transitions smoothly from 0 to 1 before expiration (because of time value), but at expiration the transition is discontinuous.
3. Infinite oscillation or vertical tangent. The function may oscillate infinitely fast (like sin(1/x)\sin(1/x) near zero) or have a vertical tangent (like x\sqrt{x} at the origin). These are less common in finance but the principle matters: for the derivative to exist, the function must have a well-defined, finite slope.
The most dramatic failure of differentiability in quant finance is Brownian motion itself: it is continuous everywhere but differentiable nowhere. The path oscillates so violently at every scale that ΔW/Δt\Delta W / \Delta t \to \infty as Δt0\Delta t \to 0. This is not an edge case — it is the central reason why stochastic calculus exists as a separate discipline.

Elementary differentiation rules

Before the chain rule, product rule, and quotient rule, there are a handful of elementary results that follow directly from the limit definition.

Power rule

For any real constant nn:

ddxxn=nxn1\frac{d}{dx} x^n = n x^{n-1}
Example in finance: The delta of a power payoff H(S)=SnH(S) = S^n is nSn1nS^{n-1}. For a standard stock (n=1n = 1), delta is 1. For a squared payoff (n=2n = 2), delta is 2S2S — it increases linearly with the spot, meaning the position becomes harder to hedge as the stock moves.

Exponential rule

ddxex=ex\frac{d}{dx} e^x = e^x
The exponential function is its own derivative — the unique function (up to scaling) with this property. This is why continuous compounding uses erte^{rt}: the rate of growth of erte^{rt} is rertr \cdot e^{rt}, which is proportional to the current value. The discount factor erTe^{-rT} and the log-normal stock price model both rely on this property.

Logarithm rule

ddxlnx=1x,x>0\frac{d}{dx} \ln x = \frac{1}{x}, \quad x > 0
This is why log-returns are fundamental in finance. If StS_t is a stock price, then d(lnS)=dS/Sd(\ln S) = dS / S (in the deterministic case), which is precisely the percentage return. The logarithm converts multiplicative changes into additive ones, and its derivative 1/x1/x is the conversion factor. In the stochastic case, Itô's Lemma adds the correction 12σ2dt-\frac{1}{2}\sigma^2\,dt because d2dS2lnS=1/S20\frac{d^2}{dS^2}\ln S = -1/S^2 \neq 0.

Linearity of differentiation

Differentiation is a linear operator: for any constants a,ba, b and differentiable functions f,gf, g:
ddx[af(x)+bg(x)]=af(x)+bg(x)\frac{d}{dx}[af(x) + bg(x)] = a f'(x) + b g'(x)

This means the derivative of a portfolio is the (weighted) sum of the derivatives of its components. If a portfolio holds aa units of asset ff and bb units of asset gg, the portfolio delta is aΔf+bΔga\Delta_f + b\Delta_g. Linearity is so natural that it is easy to take for granted, but it is a genuine theorem (following from the linearity of limits) and it fails for some nonlinear risk measures.

Partial derivatives and the total differential

When a function depends on multiple variables — as option prices depend on SS, tt, σ\sigma, rr — we need partial derivatives. The partial derivative f/xi\partial f / \partial x_i measures the rate of change of ff with respect to xix_i, holding all other variables fixed.
The total differential combines all partial derivatives into a single expression for the infinitesimal change in ff:
df=fx1dx1+fx2dx2++fxndxn=i=1nfxidxidf = \frac{\partial f}{\partial x_1}\,dx_1 + \frac{\partial f}{\partial x_2}\,dx_2 + \cdots + \frac{\partial f}{\partial x_n}\,dx_n = \sum_{i=1}^{n} \frac{\partial f}{\partial x_i}\,dx_i

For an option value v(S,t)v(S, t):

dv=vSdS+vtdt=ΔdS+Θdtdv = \frac{\partial v}{\partial S}\,dS + \frac{\partial v}{\partial t}\,dt = \Delta\,dS + \Theta\,dt
This is the multivariable chain rule in differential form. It is the deterministic skeleton of the stochastic expansion used in the Black-Scholes derivation. The stochastic version, via Itô's Lemma, adds:
dv=ΔdS+Θdt+12Γσ2S2dtdv = \Delta\,dS + \Theta\,dt + \frac{1}{2}\Gamma\,\sigma^2 S^2\,dt

The extra gamma term is absent in ordinary calculus and is the hallmark of the Itô correction.

Higher-order derivatives

The second derivative f(x)=d2f/dx2f''(x) = d^2f/dx^2 measures the rate of change of the rate of change — geometrically, the curvature of the graph. In quant finance:
  • Γ=vSS=2v/S2\Gamma = v_{SS} = \partial^2 v / \partial S^2 is the option's gamma. It measures how delta itself changes with the stock price. A large gamma means the hedge needs frequent rebalancing.
  • The Itô correction term 12f(x)(dx)2\frac{1}{2}f''(x)\,(dx)^2 is proportional to the second derivative. Functions with zero second derivative (linear functions) receive no Itô correction — they obey the ordinary chain rule even in the stochastic setting.
  • Taylor expansions are built from successive derivatives: f(x+Δx)=f(x)+f(x)Δx+12f(x)(Δx)2+f(x + \Delta x) = f(x) + f'(x)\Delta x + \frac{1}{2}f''(x)(\Delta x)^2 + \cdots. The second-order term is exactly the one that Itô's Lemma keeps and ordinary calculus discards.

The general nnth derivative f(n)(x)=dnf/dxnf^{(n)}(x) = d^n f / dx^n exists when the function is sufficiently smooth (at least nn times differentiable). In practice, most pricing functions in quant finance are smooth enough for as many derivatives as you need — the notable exception being payoff functions at expiration, where kinks and discontinuities appear.

A worked example: sensitivity of the Black-Scholes price

To tie the ideas together, consider the Black-Scholes price of a European call option:

C(S,t)=SΦ(d1)Ker(Tt)Φ(d2)C(S, t) = S\,\Phi(d_1) - Ke^{-r(T-t)}\Phi(d_2)
where Φ\Phi is the standard normal CDF, and d1,d2d_1, d_2 are functions of S,t,σ,r,K,TS, t, \sigma, r, K, T.

Computing the delta Δ=C/S\Delta = \partial C / \partial S requires:

  1. The product rule to differentiate SΦ(d1)S \cdot \Phi(d_1) — a product of SS and a function of SS.
  2. The chain rule to differentiate Φ(d1)\Phi(d_1) — a composition of Φ\Phi with d1(S,t,)d_1(S, t, \ldots).
  3. The derivative of Φ\Phi itself, which is the standard normal density ϕ(d1)\phi(d_1).

The result is the famously clean Δ=Φ(d1)\Delta = \Phi(d_1). This simplicity is not an accident — it follows from a careful cancellation between the product rule and chain rule terms. But the point is: you need the differentiation rules from this section to derive and verify it.

Computing the gamma Γ=Δ/S=2C/S2\Gamma = \partial \Delta / \partial S = \partial^2 C / \partial S^2 requires differentiating Φ(d1)\Phi(d_1) again with respect to SS, using the chain rule:

Γ=ϕ(d1)d1S=ϕ(d1)SσTt\Gamma = \phi(d_1) \cdot \frac{\partial d_1}{\partial S} = \frac{\phi(d_1)}{S\sigma\sqrt{T-t}}

Gamma is always positive for a vanilla option (the delta curve is always increasing), peaks near the money, and increases as expiration approaches. All of this comes from elementary differentiation applied to a specific function.

Common confusions and pitfalls

Confusing the derivative with the difference. The derivative f(x)f'(x) is a rate (change per unit input), not a change (absolute amount). The change is approximately Δff(x)Δx\Delta f \approx f'(x) \cdot \Delta x. In finance, delta Δ\Delta is the rate (dollars of option value per dollar of stock), and the P&L is approximately ΔΔS\Delta \cdot \Delta S. Forgetting the Δx\Delta x factor leads to unit errors.
Treating partial derivatives as total derivatives. When vv depends on SS and tt, and SS itself depends on tt, the partial derivative v/t\partial v / \partial t (holding SS fixed) is not the same as the total derivative dv/dtdv/dt (allowing SS to change with tt). The total derivative includes the ΔdS/dt\Delta \cdot dS/dt term via the chain rule. This distinction is critical in the Black-Scholes derivation: Θ=vt\Theta = v_t is the partial derivative, but the total change in option value also includes the ΔdS\Delta\,dS and 12Γ(dS)2\frac{1}{2}\Gamma(dS)^2 terms.
Assuming everything is differentiable. Many functions in finance are not differentiable everywhere: payoff functions have kinks, indicator functions have jumps, and Brownian paths are nowhere differentiable. The derivative is a powerful tool, but it only works where the function is smooth. Recognising the points of non-differentiability is just as important as being able to differentiate where it is smooth.

Where this goes next

This introduction has laid out what differentiation is, why it matters in finance, and the elementary rules that follow directly from the limit definition. The three core rules for combining differentiable functions are:
  1. Chain Rule — for compositions f(g(x))f(g(x)). The most important rule in quant finance because it is the deterministic ancestor of Itô's Lemma.
  2. Product Rule — for products f(x)g(x)f(x) \cdot g(x). Essential for hedged portfolios, discounted prices, and self-financing conditions.
  3. Quotient Rule — for ratios f(x)/g(x)f(x)/g(x). A consequence of the product and chain rules, useful for hedge ratios and numéraire-relative pricing.
Beyond these, the Taylor series generalises the linear approximation f(x)+f(x)Δxf(x) + f'(x)\Delta x to arbitrarily high order, and is the bridge between differentiation and the Itô expansion used in the derivation of the Black-Scholes formula.
The deep lesson of this section, which becomes explicit in stochastic calculus, is that differentiation is really about local linear approximation. The derivative f(x)f'(x) gives the best linear approximation to ff near xx. Ordinary calculus works whenever linear approximation is good enough — that is, whenever the second-order term 12f(Δx)2\frac{1}{2}f''(\Delta x)^2 is negligible. When it is not negligible — as happens with Brownian motion, where (ΔW)2Δt(\Delta W)^2 \sim \Delta t — the linear approximation breaks down, and Itô's Lemma extends differentiation to account for the curvature that ordinary calculus ignores.

Exercises

Test your understanding with 3 exercises for this lesson.