Skip to content

Multivariable calculus

Combine fixed-input sensitivities into joint changes, understand mixed effects, and see how multivariable calculus connects pricing, integration and optimisation.

Multivariable calculus studies change and accumulation for functions with several inputs. In quantitative finance, it lets you combine individual price sensitivities into a joint scenario, integrate payoffs over several uncertain factors, and optimise portfolios subject to constraints. A multivariable function supplies the input–output relationship; calculus supplies the methods for analysing it. MIT's multivariable calculus course covers its differential, integral and vector branches.
The practical question is often: if several inputs move together, how much does the output change? A partial derivative answers only one part of that question by varying one input and holding the others fixed.

Two inputs move, and their effects oppose

Consider the present value of a certain payment of USD 100, with continuous discounting:
V(r,T)=100e−rT.V(r,T)=100e^{-rT}.
Here rr is the annual continuously compounded discount rate, entered as a decimal, and TT is remaining time to payment, in years. This is a synthetic two-input model with a single constant discount rate. The payment amount, currency, certainty and compounding convention remain fixed; there are no coupons, credit losses or transaction costs. At a fixed valuation date, varying TT compares payment horizons. Interpreting a reduction in TT as the passage of time instead changes the valuation date for the same payment.
At r=0.04r=0.04 and T=3T=3, value is USD 88.692044. The first partial derivatives are
Vr=−TV,VT=−rV.V_r=-TV,\qquad V_T=-rV.
Local sensitivity at the starting pointValueWhat stays fixed
VrV_r−266.076131 USD per unit of decimal annual rateRemaining maturity T=3T=3 years
VTV_T−3.547682 USD per year of remaining maturityRate r=0.04r=0.04
A unit of decimal rate is much larger than a normal rate bump: one basis point is 0.0001, so a 10-basis-point rise is Δr=0.001\Delta r=0.001. It takes the quoted rate from 4% to 4.1%.

Now raise the rate by those 10 basis points and reduce remaining maturity by ΔT=−0.1\Delta T=-0.1 year. Because this function is differentiable, its gradient combines the two local effects:

ΔV≈VrΔr+VTΔT=(−266.076131…)(0.001)+(−3.547682…)(−0.1)=−0.266076…+0.354768…=USD 0.088692…\begin{aligned} \Delta V&\approx V_r\Delta r+V_T\Delta T\\ &=(-266.076131\ldots)(0.001)+(-3.547682\ldots)(-0.1)\\ &=-0.266076\ldots+0.354768\ldots\\ &=\text{USD }0.088692\ldots \end{aligned}
The higher discount rate lowers value; the shorter wait increases it. Both derivatives are evaluated at the same starting point. This linear approximation is the finite-scenario use of the total derivative; it is not an exact finite repricing. MIT's tangent-approximation material develops the geometry behind this step.

Re-evaluating the model at both new coordinates gives

ΔVexact=100e−(0.041)(2.9)−100e−(0.04)(3)=USD 0.097615…\Delta V_{\text{exact}}=100e^{-(0.041)(2.9)}-100e^{-(0.04)(3)} =\text{USD }0.097615\ldots
The new value is USD 88.789659. The first-order estimate misses USD 0.008923. That is small in dollars here, but noticeable relative to the net gain because two larger effects partly cancel.
For a synthetic USD 100 payment, first-order value changes are minus USD 0.266076 from a 10-basis-point rate rise and plus USD 0.354768 from 0.1 year less remaining maturity. Their sum is USD 0.088692; exact joint repricing gains USD 0.097615. Along the prescribed joint move, exact and linear changes start together and diverge.
For a synthetic USD 100 payment, first-order value changes are minus USD 0.266076 from a 10-basis-point rate rise and plus USD 0.354768 from 0.1 year less remaining maturity. Their sum is USD 0.088692; exact joint repricing gains USD 0.097615. Along the prescribed joint move, exact and linear changes start together and diverge.
Original synthetic example with continuous annual discounting. The right panel follows the specified rate and remaining-maturity moves together; it is not a forecast or a market time series.

Interactions live beyond first order

The Hessian matrix collects second partial derivatives. For this model,

Vrr=T2V,VTT=r2V,VrT=∂∂T(∂V∂r)=(rT−1)V.V_{rr}=T^2V,\qquad V_{TT}=r^2V,\qquad V_{rT}=\frac{\partial}{\partial T}\left(\frac{\partial V}{\partial r}\right)=(rT-1)V.
At the starting point, the mixed partial is −78.048998 USD per unit of decimal annual rate per year. It measures how the rate sensitivity changes when remaining maturity changes. Mixed partials agree in either order here because the function has continuous second derivatives.

The second-order approximation adds

12[Vrr(Δr)2+2VrTΔrΔT+VTT(ΔT)2].\frac12\left[V_{rr}(\Delta r)^2+2V_{rT}\Delta r\Delta T+V_{TT}(\Delta T)^2\right].
For this scenario, that correction is USD 0.008914, bringing the estimated change to USD 0.097606. The mixed term is positive because VrT<0V_{rT}<0 while ΔrΔT<0\Delta r\Delta T<0. The improved estimate still has a residual: a Taylor expansion truncated at second order does not capture every finite-change term.
Keep the clock explicit. VTV_T measures increasing remaining maturity. For the same fixed payment as calendar time tt advances, dT/dt=−1dT/dt=-1 when both clocks use years. At a fixed rate, the chain rule therefore gives dV/dt=−VT=rVdV/dt=-V_T=rV, the opposite sign. If the rate also follows a differentiable path, the total rate of change is Vr dr/dt−VTV_r\,dr/dt-V_T. A partial maturity sensitivity alone is not the realised change. At negative discount rates the maturity and calendar-time signs reverse; the calculus does not require a positive rate.

Sensitivities, integration and decisions

Differentiation is one branch. A double integral can aggregate a payoff against the joint density of two risk factors. Unlike the fixed scenario above, that calculation requires a probability model, including dependence, and suitable integrability. Two sensitivities alone do not supply those probabilities.
Optimisation uses derivatives to study how changing decision variables improves an objective. A zero gradient at an interior point is only a candidate condition; curvature, constraints and boundaries determine what can be concluded. A pricing input such as an interest rate is not automatically a variable the investor controls.
For a first guided treatment, the Partial Derivatives lesson develops fixed-input sensitivities, gradients and the distinction between a weight change and a fully invested reallocation. Its public preview is open; the full lesson requires membership.

Sources

Last updated
  • calculus
  • sensitivity
  • joint scenarios
  • discounting
  • mixed partials
← Back to the glossaryBack to top ↑