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 (e−rtSt); a self-financing portfolio value is a sum of products of holdings and prices (∑ϕiSi); 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) where Xt and Yt are Itô processes, you get an extra cross-variation term dXt⋅dYt 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) and g(x) be differentiable functions. The derivative of their product h(x)=f(x)⋅g(x) is:
h′(x)=f′(x)⋅g(x)+f(x)⋅g′(x)
In Leibniz notation:
dxd[f(x)g(x)]=dxdf⋅g+f⋅dxdg
Or in differential form, which is closer to the notation used in stochastic calculus:
d(fg)=gdf+fdg
The idea: when a product changes, the change comes from two sources — f changes while g stays (approximately) fixed, and g changes while f 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:
As Δx→0, the first factor gives f′(x)⋅g(x) (using continuity of g) and the second gives f(x)⋅g′(x).
The key step is that the "cross term" Δf⋅Δg vanishes because Δf⋅Δg=O(Δx2) when both functions are smooth. In stochastic calculus, this cross term is dX⋅dY and it does not vanish when X and Y 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+fdg
This is the deterministic version. The stochastic (Itô) product rule for two Itô processes Xt and Yt is:
d(XtYt)=YtdXt+XtdYt+dXtdYt
The extra term dXtdYt is the cross-variation or covariation of X and Y. It is computed using the multiplication rules from Itô's Lemma: (dWt)2=dt, dtdWt=0, (dt)2=0. If dXt=a1dt+b1dWt and dYt=a2dt+b2dWt, then dXtdYt=b1b2dt. In the deterministic case (b1=b2=0), the cross-variation vanishes and you recover the ordinary product rule.
Product rule for n functions
For three functions:
dxd[fgh]=f′gh+fg′h+fgh′
The pattern generalises: differentiate one factor at a time, holding all others fixed, and sum. For n factors f1f2⋯fn:
dxdi=1∏nfi=i=1∑nj=i∏fjfi′
Logarithmic differentiation
A powerful technique, especially when dealing with products of many functions, is to take logarithms first:
lnh=lnf+lng⟹hh′=ff′+gg′
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). The connection between the product rule and the chain rule applied to ln is direct.
Note that this technique relies on the ordinary chain rule applied to ln. In the stochastic case, applying the chain rule to lnSt requires Itô's Lemma and produces the −21σ2 correction discussed in Brownian Motion.
Examples and applications
Example 1: Differentiating a discounted cash flow
A zero-coupon bond paying $1 at maturity T has present value P(t)=e−r(T−t), where r is the constant risk-free rate. But suppose we write this as the product of two pieces: the "accumulation factor" A(t)=ert and the "fixed discount" D=e−rT (a constant). Then P(t)=A(t)⋅D.
P′(t)=A′(t)⋅D+A(t)⋅D′
Since D is a constant, D′=0, so:
P′(t)=rert⋅e−rT=re−r(T−t)=rP(t)
This confirms that the bond value grows at rate r — 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) where ϕ(t) is the number of shares held (the hedge ratio) and S(t) is the stock price. If both are smooth deterministic functions of time:
dtdΠ=dtdϕ⋅S+ϕ⋅dtdS
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ϕ⋅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ϕtdSt
The self-financing condition says dΠt=ϕtdSt (no external injection of cash), which constrains Stdϕt+dϕtdSt=0. The cross-variation term matters here when ϕt is adapted to the filtration and St 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=f⋅g−1 and apply the product rule:
dxd[gf]=dxd[f⋅g−1]=f′⋅g−1+f⋅dxd[g−1]
Now apply the chain rule to g−1: dxd[g−1]=−g−2⋅g′. Substituting:
=gf′−g2fg′=g2f′g−fg′
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)=gdf and forgetting fdg. Both factors contribute to the change. In stochastic calculus, the analogous (and even more common) error is forgetting the cross-variation term dXdY.
Sign errors in the stochastic product rule. When computing d(e−rtSt) — the discounted stock price — students sometimes apply Itô's Lemma to f(t,S)=e−rtS as a single function (which is correct and gives the right answer), but others try the product rule with Xt=e−rt and Yt=St. The product rule approach also works: dXt=−re−rtdt (deterministic), dYt=μStdt+σStdWt, and dXtdYt=0 because Xt has no Brownian component. So d(e−rtSt)=St(−re−rt)dt+e−rt(μStdt+σStdWt)=e−rtSt[(μ−r)dt+σdWt]. The discounted stock drifts at rate μ−r, which is zero under the risk-neutral measure Q — confirming the martingale property of discounted prices.
Confusing the product rule with the chain rule. The product rule handles f(x)⋅g(x) (two functions multiplied). The chain rule handles f(g(x)) (two functions composed). They are different operations. However, many real problems require both: for instance, differentiating e−rt⋅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).
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 dXdY. 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.