Skip to content

Partial derivative

Understand partial derivatives as fixed-input sensitivities, calculate portfolio variance changes, and distinguish an allocation partial from a total derivative.

A partial derivative measures how a function changes with one input while its other independent inputs are held fixed. For a portfolio risk model, it can answer “how sensitive is variance to correlation at these weights?” For an option price, delta asks the corresponding question about the underlying price.
The phrase held fixed is part of the definition. A partial derivative describes a controlled change in a model; it does not predict that other market inputs will stay unchanged.

Turn a surface into a curve

For a multivariable function f(x,y)f(x,y), the partial derivative with respect to xx at (a,b)(a,b) is
∂f∂x(a,b)=lim⁡h→0f(a+h,b)−f(a,b)h,\frac{\partial f}{\partial x}(a,b) =\lim_{h\to0}\frac{f(a+h,b)-f(a,b)}{h},
provided the limit exists. The second coordinate stays at bb throughout. Fixing it gives an ordinary function of one variable, x↦f(x,b)x\mapsto f(x,b), and the partial derivative is that curve's derivative.

The notation fxf_x means the same thing as ∂f/∂x\partial f/\partial x. To compute it, apply the usual differentiation rules while treating yy as constant. For example, if f(x,y)=x2y+3yf(x,y)=x^2y+3y, then fx=2xyf_x=2xy whereas fy=x2+3f_y=x^2+3. A term constant in one calculation can vary in the other.

Two levers on the same portfolio

Consider a synthetic portfolio held over one period. Its two assets have simple returns measured as decimals, with standard deviations 0.200.20 and 0.100.10 over that same period. Let ww be the initial weight in asset A and 1−w1-w the initial weight in asset B. Assume no interim rebalancing, and write their return correlation as ρ\rho.
With both standard deviations fixed, portfolio variance is
v(w,ρ)=w2(0.20)2+(1−w)2(0.10)2+2w(1−w)ρ(0.20)(0.10)=0.04w2+0.01(1−w)2+0.04w(1−w)ρ.\begin{aligned} v(w,\rho) &=w^2(0.20)^2+(1-w)^2(0.10)^2 +2w(1-w)\rho(0.20)(0.10)\\ &=0.04w^2+0.01(1-w)^2+0.04w(1-w)\rho. \end{aligned}
The covariance is ρ(0.20)(0.10)\rho(0.20)(0.10). For this long-only illustration, 0≤w≤10\le w\le1 and −1≤ρ≤1-1\le\rho\le1. The inputs are stipulated scenarios, rather than estimates or investment recommendations.

There are two different sensitivities:

vw(w,ρ)=0.08w−0.02(1−w)+0.04(1−2w)ρ,vρ(w,ρ)=0.04w(1−w).\begin{aligned} v_w(w,\rho) &=0.08w-0.02(1-w)+0.04(1-2w)\rho,\\ v_\rho(w,\rho) &=0.04w(1-w). \end{aligned}

At the equal-weight point w=0.50w=0.50, with ρ=0.25\rho=0.25,

v=0.015,vw=0.03,vρ=0.01.v=0.015,\qquad v_w=0.03,\qquad v_\rho=0.01.
Here vwv_w changes the allocation while holding correlation fixed: increasing ww automatically reduces B's weight. It does not hold B's weight fixed. We already built the fully invested budget into the coordinates by substituting wB=1−ww_B=1-w. Differentiating a model with separate independent coordinates wA,wBw_A,w_B would answer a different question.
Two slices of the synthetic portfolio variance model. With correlation fixed at 0.25, varying weight gives a curved slice with slope 0.03 at weight 0.50. With weight fixed at 0.50, varying correlation gives a straight line of slope 0.01. Both selected points have variance 0.015.
Two slices of the synthetic portfolio variance model. With correlation fixed at 0.25, varying weight gives a curved slice with slope 0.03 at weight 0.50. With weight fixed at 0.50, varying correlation gives a straight line of slope 0.01. Both selected points have variance 0.015.
Original synthetic one-period model. The output is variance of decimal returns. The two dots represent the same input pair; each curve changes only one coordinate.

A sensitivity is not a finite change

A derivative must be multiplied by an input change. Raising A's weight from 50% to 51% is Δw=0.01\Delta w=0.01, not 1. Raising correlation from 0.25 to 0.35 is Δρ=0.10\Delta\rho=0.10. At the baseline above:

Controlled changeFirst-order variance changeExact variance changeNew variance
w:0.50→0.51w:0.50\to0.51, correlation fixed0.03(0.01)=0.0003000.03(0.01)=0.0003000.0003040.015304
ρ:0.25→0.35\rho:0.25\to0.35, weights fixed0.01(0.10)=0.0010000.01(0.10)=0.0010000.0010000.016000

The allocation slice curves, so its tangent estimate has a small error. The correlation slice is linear at fixed weights, so that estimate is exact throughout the allowed correlation interval. At w=0w=0 or w=1w=1, vρ=0v_\rho=0: correlation cannot change the variance of a portfolio holding just one asset.

The derivative's units are output units per input unit. Here they are decimal-return squared per unit of weight or correlation. Neither 0.03 nor 0.01 is itself a percentage change in portfolio risk.

If both inputs move, specify the path

Suppose a stress scenario explicitly makes correlation depend on the allocation: ρ=ρ(w)\rho=\rho(w). The chain rule gives a total derivative along that path:
ddwv(w,ρ(w))=vw(w,ρ(w))+vρ(w,ρ(w))ρ′(w).\frac{d}{dw}v(w,\rho(w)) =v_w(w,\rho(w))+v_\rho(w,\rho(w))\rho'(w).

For the chosen local path ρ(w)=0.25+2(w−0.50)\rho(w)=0.25+2(w-0.50), the slope at w=0.50w=0.50 is

0.03+0.01(2)=0.05.0.03+0.01(2)=0.05.

Use this path only where both inputs remain within their stated domains. It is an imposed scenario relationship, not a claim that trading a weight causes market correlation to change. The partial derivative remains 0.03 at the baseline; 0.05 answers the different question in which correlation moves too.

More generally, for small independently specified bumps, differentiability gives

Δv≈vwΔw+vρΔρ.\Delta v\approx v_w\Delta w+v_\rho\Delta\rho.

The gradient collects those partials. If both table changes occur together, the estimate is 0.001300, while direct evaluation gives 0.0013036. Curvature and interaction terms explain the residual. A full scenario recalculation retains them.

Variance sensitivity and volatility sensitivity differ

Standard deviation is s=vs=\sqrt{v}, so whenever v>0v>0,
∂s∂w=12v∂v∂w.\frac{\partial s}{\partial w} =\frac{1}{2\sqrt{v}}\frac{\partial v}{\partial w}.
At our baseline, s=0.015≈0.122474s=\sqrt{0.015}\approx0.122474, or 12.2474% over the specified period. Its weight sensitivity is approximately 0.122474 decimal-return units per unit weight. A one-percentage-point increase in A's weight therefore raises standard deviation by approximately 0.1225 percentage points locally. This is different from the variance change of 0.000300.

At zero variance, the division above is unavailable; differentiability of the square root composite needs separate analysis. At domain boundaries, two-sided bumps may also be infeasible: use admissible one-sided comparisons rather than evaluating invalid correlations or forbidden weights. The polynomial's formula can exist outside a portfolio model's economically allowed domain without making those scenarios permissible.

The Partial Derivatives lesson develops fixed-input sensitivities, gradients and higher partials with worked examples. Its public page is a preview; the full lesson requires membership.

Sources

Last updated
  • partial derivatives
  • calculus
  • portfolio risk
  • sensitivity
  • multivariable functions
← Back to the glossaryBack to top ↑