CONTENTS

Change of Variables

Motivation: why this matters in quant finance

The change-of-variables formula — also called the substitution rule — is the integral counterpart of the chain rule. Where the chain rule tells you how to differentiate a composition f(g(x))f(g(x)), substitution tells you how to integrate one by converting to a simpler variable. In quant finance, change of variables appears in three essential forms:
  1. Transforming pricing integrals. Computing E[(STK)+]\mathbb{E}[(S_T - K)^+] under the log-normal distribution requires substituting s=S0e(rσ2/2)T+σTzs = S_0 e^{(r - \sigma^2/2)T + \sigma\sqrt{T}z} to convert the integral over stock prices into an integral over the standard normal variable zz. This substitution is what produces the Φ(d1)\Phi(d_1) and Φ(d2)\Phi(d_2) terms in the Black-Scholes formula.
  2. Change of density (Jacobian). When you transform a random variable Y=g(X)Y = g(X), the density of YY involves the derivative g(g1(y))1|g'(g^{-1}(y))|^{-1} — the Jacobian of the inverse transformation. This is how you derive the log-normal density from the normal density: if XN(μ,σ2)X \sim \mathcal{N}(\mu, \sigma^2) and Y=eXY = e^X, the density of YY picks up the factor 1/y1/y from the Jacobian dx/dy=1/y|dx/dy| = 1/y.
  3. Change of measure (Girsanov). The most important "change of variables" in quant finance is not a change of spatial variable but a change of probability measure — from the physical measure P\mathbb{P} to the risk-neutral measure Q\mathbb{Q}. This is accomplished by the Radon-Nikodym derivative dQdP\frac{d\mathbb{Q}}{d\mathbb{P}}, which reweights the density inside every expectation. The mathematical structure is the same as a change of variables in an integral, and understanding the deterministic version on this page is prerequisite to understanding the stochastic version in change of measure.

The deterministic substitution rule

Single-variable formula

Let g:[a,b]Rg: [a, b] \to \mathbb{R} be continuously differentiable, and let ff be continuous on the range of gg. Then:
abf(g(x))g(x)dx=g(a)g(b)f(u)du\boxed{\int_a^b f(g(x))\,g'(x)\,dx = \int_{g(a)}^{g(b)} f(u)\,du}

where u=g(x)u = g(x) and du=g(x)dxdu = g'(x)\,dx.

How to use it:
  1. Identify a composition f(g(x))f(g(x)) in the integrand.
  2. Set u=g(x)u = g(x), compute du=g(x)dxdu = g'(x)\,dx.
  3. Check that g(x)dxg'(x)\,dx appears in the integrand (or can be arranged to appear).
  4. Change the limits: x=au=g(a)x = a \mapsto u = g(a), x=bu=g(b)x = b \mapsto u = g(b).
  5. Evaluate the simpler integral in uu.

Inverse substitution

Sometimes it is easier to substitute x=h(u)x = h(u) (express the old variable as a function of the new one):

abf(x)dx=h1(a)h1(b)f(h(u))h(u)du\int_a^b f(x)\,dx = \int_{h^{-1}(a)}^{h^{-1}(b)} f(h(u))\,h'(u)\,du

This is used when the integrand has a form like a2x2\sqrt{a^2 - x^2} (trigonometric substitution) or when transforming from price space to log-price space.

Change of density (the Jacobian formula)

Transforming random variables

If XX is a continuous random variable with density fX(x)f_X(x) and Y=g(X)Y = g(X) where gg is monotone and differentiable with inverse g1g^{-1}, then the density of YY is:

fY(y)=fX(g1(y))ddyg1(y)f_Y(y) = f_X(g^{-1}(y))\,\left|\frac{d}{dy}g^{-1}(y)\right|
The absolute value of the derivative of the inverse — the Jacobian — accounts for the "stretching" or "compression" of the probability mass under the transformation.

Derivation

For monotone increasing gg:

P(Yy)=P(g(X)y)=P(Xg1(y))=FX(g1(y))\mathbb{P}(Y \leq y) = \mathbb{P}(g(X) \leq y) = \mathbb{P}(X \leq g^{-1}(y)) = F_X(g^{-1}(y))
Differentiate with respect to yy using the chain rule:
fY(y)=fX(g1(y))ddyg1(y)f_Y(y) = f_X(g^{-1}(y)) \cdot \frac{d}{dy}g^{-1}(y)

For decreasing gg, the inequality reverses and you get a minus sign, which the absolute value handles.

The log-normal density derived from the normal

This is the canonical example. Let XN(μ,σ2)X \sim \mathcal{N}(\mu, \sigma^2) and Y=eXY = e^X. Then g(x)=exg(x) = e^x, g1(y)=lnyg^{-1}(y) = \ln y, and ddylny=1/y\frac{d}{dy}\ln y = 1/y.

fY(y)=fX(lny)1y=1yσ2πexp((lnyμ)22σ2),y>0f_Y(y) = f_X(\ln y) \cdot \frac{1}{y} = \frac{1}{y\,\sigma\sqrt{2\pi}}\exp\left(-\frac{(\ln y - \mu)^2}{2\sigma^2}\right), \quad y > 0
This is precisely the log-normal density. The factor 1/y1/y is the Jacobian, and it is what makes the distribution right-skewed (the exponential transformation stretches the right tail and compresses the left).

Multivariable Jacobian

For a transformation (X1,,Xn)(Y1,,Yn)=g(X1,,Xn)(X_1, \ldots, X_n) \mapsto (Y_1, \ldots, Y_n) = \mathbf{g}(X_1, \ldots, X_n), the density transforms as:

fY(y)=fX(g1(y))detJg1(y)f_{\mathbf{Y}}(\mathbf{y}) = f_{\mathbf{X}}(\mathbf{g}^{-1}(\mathbf{y}))\,\left|\det\,J_{\mathbf{g}^{-1}}(\mathbf{y})\right|

where Jg1J_{\mathbf{g}^{-1}} is the Jacobian matrix (gi1/yj)(\partial g_i^{-1}/\partial y_j). This is used in multivariate finance when transforming between correlated normals and independent normals (via the Cholesky decomposition), or when switching between Cartesian and polar coordinates in copula models.

Change of measure: the probability version

The Radon-Nikodym derivative

The deepest "change of variables" in quant finance is the change from one probability measure to another. If P\mathbb{P} and Q\mathbb{Q} are two probability measures on the same space, with Q\mathbb{Q} absolutely continuous with respect to P\mathbb{P}, then there exists a non-negative random variable L=dQdPL = \frac{d\mathbb{Q}}{d\mathbb{P}} (the Radon-Nikodym derivative) such that:
EQ[f(X)]=EP[f(X)dQdP]\mathbb{E}^{\mathbb{Q}}[f(X)] = \mathbb{E}^{\mathbb{P}}\left[f(X)\,\frac{d\mathbb{Q}}{d\mathbb{P}}\right]

In integral form:

f(x)q(x)dx=f(x)L(x)p(x)dx\int f(x)\,q(x)\,dx = \int f(x)\,L(x)\,p(x)\,dx

where pp and qq are the densities under P\mathbb{P} and Q\mathbb{Q}. The Radon-Nikodym derivative L(x)=q(x)/p(x)L(x) = q(x)/p(x) reweights the density, converting expectations under one measure to expectations under another.

Connection to risk-neutral pricing

Under the physical measure P\mathbb{P}, the stock has drift μ\mu. Under the risk-neutral measure Q\mathbb{Q}, the drift is rr (the risk-free rate). The change of measure from P\mathbb{P} to Q\mathbb{Q} is accomplished by the Radon-Nikodym derivative:
dQdP=exp(θWTPθ22T)\frac{d\mathbb{Q}}{d\mathbb{P}} = \exp\left(-\theta W_T^{\mathbb{P}} - \frac{\theta^2}{2}T\right)
where θ=(μr)/σ\theta = (\mu - r)/\sigma is the market price of risk (Sharpe ratio). This exponential martingale reweights the probability of each path: upward paths (where WTPW_T^{\mathbb{P}} is large and positive) get down-weighted, and downward paths get up-weighted, until the expected return under Q\mathbb{Q} equals the risk-free rate.
By Girsanov's theorem, under Q\mathbb{Q}, the process WtQ=WtP+θtW_t^{\mathbb{Q}} = W_t^{\mathbb{P}} + \theta t is a standard Brownian motion. This means the stock dynamics become dSt=rStdt+σStdWtQdS_t = rS_t\,dt + \sigma S_t\,dW_t^{\mathbb{Q}} — the same SDE but with drift rr instead of μ\mu.
The entire risk-neutral pricing framework — V0=erTEQ[payoff]V_0 = e^{-rT}\mathbb{E}^{\mathbb{Q}}[\text{payoff}] — is a change-of-measure statement. The option price is computed by changing the integrating measure from P\mathbb{P} (where we observe the world) to Q\mathbb{Q} (where discounted prices are martingales), using the Radon-Nikodym derivative as the conversion factor.

Numéraire change

More generally, any positive traded asset NtN_t can serve as a numéraire, and there is a measure QN\mathbb{Q}^N under which all prices expressed in units of NtN_t are martingales. The change from one numéraire measure to another is:
dQN2dQN1=N2(T)/N2(0)N1(T)/N1(0)\frac{d\mathbb{Q}^{N_2}}{d\mathbb{Q}^{N_1}} = \frac{N_2(T)/N_2(0)}{N_1(T)/N_1(0)}

This is used extensively in interest rate modelling (the forward measure, the swap measure) and in FX option pricing. Each numéraire choice corresponds to a change of variables in the pricing integral, selecting the measure that makes the computation simplest.

Examples and applications

Example 1: substitution in the Black-Scholes integral

The call price under Q\mathbb{Q} is:

C=erTK(sK)fST(s)dsC = e^{-rT}\int_K^{\infty}(s - K)\,f_{S_T}(s)\,ds
where fSTf_{S_T} is the log-normal density. Substitute s=S0e(rσ2/2)T+σTzs = S_0 e^{(r - \sigma^2/2)T + \sigma\sqrt{T}z}, so ds=sσTdzds = s\,\sigma\sqrt{T}\,dz and the density factor becomes ϕ(z)/sσT\phi(z)/s\sigma\sqrt{T} (the normal density in zz):
C=erTd2(S0e(rσ2/2)T+σTzK)ϕ(z)dzC = e^{-rT}\int_{-d_2}^{\infty}\left(S_0 e^{(r-\sigma^2/2)T + \sigma\sqrt{T}z} - K\right)\phi(z)\,dz

where d2-d_2 is the value of zz at which s=Ks = K. This integral splits into two standard normal integrals, giving C=S0Φ(d1)KerTΦ(d2)C = S_0\Phi(d_1) - Ke^{-rT}\Phi(d_2).

The substitution from price space (ss) to standard normal space (zz) is what makes the integral tractable. Without it, the log-normal density makes direct integration unwieldy.

Example 2: deriving the density of log-returns

If ST=S0e(μσ2/2)T+σTZS_T = S_0 e^{(\mu - \sigma^2/2)T + \sigma\sqrt{T}Z} where ZN(0,1)Z \sim \mathcal{N}(0,1), then the log-return R=ln(ST/S0)R = \ln(S_T/S_0) is:

R=(μσ2/2)T+σTZR = (\mu - \sigma^2/2)T + \sigma\sqrt{T}\,Z

This is a linear transformation of ZZ, so the change-of-variables formula gives:

fR(r)=fZ(r(μσ2/2)TσT)1σTf_R(r) = f_Z\left(\frac{r - (\mu - \sigma^2/2)T}{\sigma\sqrt{T}}\right) \cdot \frac{1}{\sigma\sqrt{T}}

which is a N((μσ2/2)T,  σ2T)\mathcal{N}((\mu - \sigma^2/2)T, \; \sigma^2 T) density. The Jacobian is 1/σT1/\sigma\sqrt{T}, which is the reciprocal of the scaling factor.

Example 3: from physical to risk-neutral expectations

Suppose you observe that the stock has physical drift μ=12%\mu = 12\% and volatility σ=20%\sigma = 20\%, with r=5%r = 5\%. The market price of risk is θ=(0.120.05)/0.20=0.35\theta = (0.12 - 0.05)/0.20 = 0.35.

Under P\mathbb{P}, the expected stock price is EP[ST]=S0eμT\mathbb{E}^{\mathbb{P}}[S_T] = S_0 e^{\mu T}.

Under Q\mathbb{Q}, the expected stock price is EQ[ST]=S0erT\mathbb{E}^{\mathbb{Q}}[S_T] = S_0 e^{rT}.

The Radon-Nikodym derivative converts between them:

EQ[f(ST)]=EP[f(ST)exp(0.35WT0.3522T)]\mathbb{E}^{\mathbb{Q}}[f(S_T)] = \mathbb{E}^{\mathbb{P}}\left[f(S_T) \cdot \exp\left(-0.35\,W_T - \frac{0.35^2}{2}T\right)\right]

In Monte Carlo simulation, this means you can either simulate under Q\mathbb{Q} directly (with drift rr) or simulate under P\mathbb{P} (with drift μ\mu) and reweight each path by the Radon-Nikodym factor. The former is simpler; the latter is useful when you need expectations under both measures.

Common confusions and pitfalls

Forgetting to change the limits of integration. When substituting u=g(x)u = g(x), the limits must change from [a,b][a, b] to [g(a),g(b)][g(a), g(b)]. If gg is decreasing, g(a)>g(b)g(a) > g(b) and the limits reverse, which introduces a minus sign (or you can swap them and take the absolute value of the Jacobian).
Confusing the Jacobian direction. When deriving the density of Y=g(X)Y = g(X), the Jacobian is (g1)(y)|(g^{-1})'(y)| — the derivative of the inverse with respect to the new variable. Computing g(x)|g'(x)| instead is the wrong derivative (it's the Jacobian in the opposite direction).
Applying change of measure without checking absolute continuity. The Radon-Nikodym derivative dQ/dPd\mathbb{Q}/d\mathbb{P} exists only if Q\mathbb{Q} is absolutely continuous with respect to P\mathbb{P} (every P\mathbb{P}-null set is also Q\mathbb{Q}-null). If the measures are not equivalent (e.g., one assigns probability to events the other deems impossible), the change of measure fails. In the Black-Scholes framework, P\mathbb{P} and Q\mathbb{Q} are equivalent (same null sets), but in models with constraints (e.g., absorbing barriers), care is needed.
Thinking change of measure changes the model. The change from P\mathbb{P} to Q\mathbb{Q} changes the drift but not the volatility and not the calculus rules. Itô's Lemma applies identically under both measures. The σ2/2-\sigma^2/2 correction in the log-return drift is a consequence of Itô calculus, not of the choice of measure.

Where this goes next

Change of variables connects the integration section to the stochastic calculus and pricing sections:

  • Chain Rule: Substitution is the integral version of the chain rule, just as integration by parts is the integral version of the product rule.
  • Change of Measure: The probabilistic change of variables — changing the density inside an expectation via the Radon-Nikodym derivative — is the foundation of risk-neutral pricing.
  • Log-Normal Distribution: The density is derived from the normal density by the Jacobian formula on this page.
  • Brownian Motion: Girsanov's theorem is the stochastic version of change of variables applied to the drift of a Brownian motion, converting WtPW_t^{\mathbb{P}} to WtQW_t^{\mathbb{Q}}.

References

  • Stewart, J. (2008). Single Variable Calculus: Early Transcendentals (6th ed.). Thomson Brooks/Cole. Ch. 5 Section 5.5 and Ch. 7 substitution material for change of variables in definite integrals.