CONTENTS

Product Rule

Motivation: why this matters in quant finance

The product rule tells you how to differentiate the product of two functions. In quantitative finance, products of functions are ubiquitous: a discounted asset price is the product of a discount factor and a price process (ertSte^{-rt}S_t); a self-financing portfolio value is a sum of products of holdings and prices (ϕiSi\sum \phi_i S_i); the P&L of a hedged position is the product of a position size and a price change.

In the stochastic setting, the product rule has a direct analogue — the Itô product rule (also called the stochastic product rule or integration by parts for semimartingales). When you differentiate d(XtYt)d(X_t Y_t) where XtX_t and YtY_t are Itô processes, you get an extra cross-variation term dXtdYtdX_t \cdot dY_t that vanishes in the deterministic case but survives when Brownian motion is present. Understanding the deterministic product rule first makes this extension natural.
The product rule also appears directly in computing Greeks. For instance, the vega of a portfolio is often a product of partial derivatives, and the chain rule and product rule are used together to decompose complex sensitivities into manageable pieces.

Definition and setup

The rule

Let f(x)f(x) and g(x)g(x) be differentiable functions. The derivative of their product h(x)=f(x)g(x)h(x) = f(x) \cdot g(x) is:

h(x)=f(x)g(x)+f(x)g(x)h'(x) = f'(x) \cdot g(x) + f(x) \cdot g'(x)

In Leibniz notation:

ddx[f(x)g(x)]=dfdxg+fdgdx\frac{d}{dx}[f(x)g(x)] = \frac{df}{dx} \cdot g + f \cdot \frac{dg}{dx}

Or in differential form, which is closer to the notation used in stochastic calculus:

d(fg)=gdf+fdgd(fg) = g\,df + f\,dg

The idea: when a product changes, the change comes from two sources — ff changes while gg stays (approximately) fixed, and gg changes while ff stays (approximately) fixed.

Proof sketch from first principles

The proof follows directly from the definition of the derivative and the limit of a difference quotient:
ddx[fg]=limΔx0f(x+Δx)g(x+Δx)f(x)g(x)Δx\frac{d}{dx}[fg] = \lim_{\Delta x \to 0} \frac{f(x + \Delta x)g(x + \Delta x) - f(x)g(x)}{\Delta x}

Add and subtract f(x)g(x+Δx)f(x)g(x + \Delta x) in the numerator:

=limΔx0[f(x+Δx)f(x)Δxg(x+Δx)+f(x)g(x+Δx)g(x)Δx]= \lim_{\Delta x \to 0} \left[\frac{f(x + \Delta x) - f(x)}{\Delta x} \cdot g(x + \Delta x) + f(x) \cdot \frac{g(x + \Delta x) - g(x)}{\Delta x}\right]
As Δx0\Delta x \to 0, the first factor gives f(x)g(x)f'(x) \cdot g(x) (using continuity of gg) and the second gives f(x)g(x)f(x) \cdot g'(x).
The key step is that the "cross term" ΔfΔg\Delta f \cdot \Delta g vanishes because ΔfΔg=O(Δx2)\Delta f \cdot \Delta g = O(\Delta x^2) when both functions are smooth. In stochastic calculus, this cross term is dXdYdX \cdot dY and it does not vanish when XX and YY are driven by Brownian motion — this is where the Itô product rule differs from the deterministic one.

Key results and properties

Differential form and the stochastic extension

In differential notation the product rule reads:

d(fg)=gdf+fdgd(fg) = g\,df + f\,dg

This is the deterministic version. The stochastic (Itô) product rule for two Itô processes XtX_t and YtY_t is:

d(XtYt)=YtdXt+XtdYt+dXtdYtd(X_t Y_t) = Y_t\,dX_t + X_t\,dY_t + dX_t\,dY_t
The extra term dXtdYtdX_t\,dY_t is the cross-variation or covariation of XX and YY. It is computed using the multiplication rules from Itô's Lemma: (dWt)2=dt(dW_t)^2 = dt, dtdWt=0dt\,dW_t = 0, (dt)2=0(dt)^2 = 0. If dXt=a1dt+b1dWtdX_t = a_1\,dt + b_1\,dW_t and dYt=a2dt+b2dWtdY_t = a_2\,dt + b_2\,dW_t, then dXtdYt=b1b2dtdX_t\,dY_t = b_1 b_2\,dt. In the deterministic case (b1=b2=0b_1 = b_2 = 0), the cross-variation vanishes and you recover the ordinary product rule.

Product rule for nn functions

For three functions:

ddx[fgh]=fgh+fgh+fgh\frac{d}{dx}[fgh] = f'gh + fg'h + fgh'

The pattern generalises: differentiate one factor at a time, holding all others fixed, and sum. For nn factors f1f2fnf_1 f_2 \cdots f_n:

ddxi=1nfi=i=1n(jifj)fi\frac{d}{dx}\prod_{i=1}^{n} f_i = \sum_{i=1}^{n} \left(\prod_{j \neq i} f_j\right) f_i'

Logarithmic differentiation

A powerful technique, especially when dealing with products of many functions, is to take logarithms first:

lnh=lnf+lng    hh=ff+gg\ln h = \ln f + \ln g \implies \frac{h'}{h} = \frac{f'}{f} + \frac{g'}{g}
This converts a product rule problem into a sum, which is often easier to handle. In quant finance, logarithmic differentiation is natural because log-returns are additive: ln(ST/S0)=ln(Sti+1/Sti)\ln(S_T/S_0) = \sum \ln(S_{t_{i+1}}/S_{t_i}). The connection between the product rule and the chain rule applied to ln\ln is direct.
Note that this technique relies on the ordinary chain rule applied to ln\ln. In the stochastic case, applying the chain rule to lnSt\ln S_t requires Itô's Lemma and produces the 12σ2-\frac{1}{2}\sigma^2 correction discussed in Brownian Motion.

Examples and applications

Example 1: Differentiating a discounted cash flow

A zero-coupon bond paying $1 at maturity TT has present value P(t)=er(Tt)P(t) = e^{-r(T-t)}, where rr is the constant risk-free rate. But suppose we write this as the product of two pieces: the "accumulation factor" A(t)=ertA(t) = e^{rt} and the "fixed discount" D=erTD = e^{-rT} (a constant). Then P(t)=A(t)DP(t) = A(t) \cdot D.

P(t)=A(t)D+A(t)DP'(t) = A'(t) \cdot D + A(t) \cdot D'

Since DD is a constant, D=0D' = 0, so:

P(t)=rerterT=rer(Tt)=rP(t)P'(t) = r e^{rt} \cdot e^{-rT} = r e^{-r(T-t)}= rP(t)

This confirms that the bond value grows at rate rr — a sanity check. The product rule trivially handles the case where one factor is constant, but the structure becomes useful when both factors are time-dependent.

Example 2: Differentiating a hedged portfolio value

Consider a portfolio Π(t)=ϕ(t)S(t)\Pi(t) = \phi(t) \cdot S(t) where ϕ(t)\phi(t) is the number of shares held (the hedge ratio) and S(t)S(t) is the stock price. If both are smooth deterministic functions of time:

dΠdt=dϕdtS+ϕdSdt\frac{d\Pi}{dt} = \frac{d\phi}{dt} \cdot S + \phi \cdot \frac{dS}{dt}

The first term is the cost of rebalancing (changing the position), and the second is the P&L from holding the position. In a self-financing portfolio, you require that any rebalancing is funded by selling other assets, which constrains dϕSd\phi \cdot S to cancel against other terms. This is the deterministic sketch of the self-financing condition.

In stochastic form, the Itô product rule gives:

d(ϕtSt)=Stdϕt+ϕtdSt+dϕtdStd(\phi_t S_t) = S_t\,d\phi_t + \phi_t\,dS_t + d\phi_t\,dS_t

The self-financing condition says dΠt=ϕtdStd\Pi_t = \phi_t\,dS_t (no external injection of cash), which constrains Stdϕt+dϕtdSt=0S_t\,d\phi_t + d\phi_t\,dS_t = 0. The cross-variation term matters here when ϕt\phi_t is adapted to the filtration and StS_t has a Brownian component.

Example 3: Deriving the quotient rule from the product rule

The quotient rule is actually a consequence of the product rule combined with the chain rule. Write f/g=fg1f/g = f \cdot g^{-1} and apply the product rule:
ddx[fg]=ddx[fg1]=fg1+fddx[g1]\frac{d}{dx}\left[\frac{f}{g}\right] = \frac{d}{dx}[f \cdot g^{-1}] = f' \cdot g^{-1} + f \cdot \frac{d}{dx}[g^{-1}]

Now apply the chain rule to g1g^{-1}: ddx[g1]=g2g\frac{d}{dx}[g^{-1}] = -g^{-2} \cdot g'. Substituting:

=fgfgg2=fgfgg2= \frac{f'}{g} - \frac{f g'}{g^2} = \frac{f'g - fg'}{g^2}

This is the quotient rule. This derivation shows that the product rule and the chain rule are the two fundamental rules; the quotient rule is a derived consequence.

Common confusions and pitfalls

Forgetting the second term. The most common error is writing d(fg)=gdfd(fg) = g\,df and forgetting fdgf\,dg. Both factors contribute to the change. In stochastic calculus, the analogous (and even more common) error is forgetting the cross-variation term dXdYdX\,dY.
Sign errors in the stochastic product rule. When computing d(ertSt)d(e^{-rt}S_t) — the discounted stock price — students sometimes apply Itô's Lemma to f(t,S)=ertSf(t, S) = e^{-rt}S as a single function (which is correct and gives the right answer), but others try the product rule with Xt=ertX_t = e^{-rt} and Yt=StY_t = S_t. The product rule approach also works: dXt=rertdtdX_t = -re^{-rt}\,dt (deterministic), dYt=μStdt+σStdWtdY_t = \mu S_t\,dt + \sigma S_t\,dW_t, and dXtdYt=0dX_t\,dY_t = 0 because XtX_t has no Brownian component. So d(ertSt)=St(rert)dt+ert(μStdt+σStdWt)=ertSt[(μr)dt+σdWt]d(e^{-rt}S_t) = S_t(-re^{-rt})\,dt + e^{-rt}(\mu S_t\,dt + \sigma S_t\,dW_t) = e^{-rt}S_t[(\mu - r)\,dt + \sigma\,dW_t]. The discounted stock drifts at rate μr\mu - r, which is zero under the risk-neutral measure Q\mathbb{Q} — confirming the martingale property of discounted prices.
Confusing the product rule with the chain rule. The product rule handles f(x)g(x)f(x) \cdot g(x) (two functions multiplied). The chain rule handles f(g(x))f(g(x)) (two functions composed). They are different operations. However, many real problems require both: for instance, differentiating ertv(S(t),t)e^{-rt} \cdot v(S(t), t) uses the product rule to split the discount factor from the option price, and then the chain rule (or Itô's Lemma) to differentiate v(S(t),t)v(S(t), t).

Where this goes next

Together with the chain rule and the quotient rule, the product rule completes the toolkit for differentiating combinations of smooth functions. The stochastic extension of the product rule is the Itô product rule, which adds the cross-variation term dXdYdX\,dY. This extension is used throughout stochastic calculus: in proving properties of Itô integrals, in verifying self-financing conditions for portfolios, and in deriving the dynamics of discounted prices — a key step in the Black-Scholes derivation and in risk-neutral pricing.

References

  • Stewart, J. (2008). Single Variable Calculus: Early Transcendentals (6th ed.). Thomson Brooks/Cole. Ch. 3 Section 3.2 (The Product and Quotient Rules) for the deterministic product rule.
Product Rule | q4quant.studio