Trading Dev AcademyFree quant education

Free lesson · Partial derivatives

Partial derivatives: holding the other inputs fixed

Open interactive lessonPractice calculationsExplore labs

Start with the idea

  • A multivariable function depends on more than one input.
  • A partial derivative measures a change along one coordinate while the others remain fixed.
  • It answers a deliberately narrow question about the model.
Symbols, units & horizon
  • f(x,y): output depending on two inputs
  • ∂: partial differentiation, holding other coordinates fixed
  • fₓ,fᵧ: partial derivatives
  • t: path parameter, often time
  • dx/dt,dy/dt: coordinate rates along that path
  • df/dt: total output rate along the path
  • Partial units: output units divided by the chosen input units
  • V: instrument price
  • S: spot price
  • σ(S): volatility specified as a function of spot
  • V_S: spot partial at fixed volatility
  • V_σ: price change per unit volatility
  • σ′(S): volatility change per unit spot

When and why to use this

Use partial derivatives for controlled “change one input” questions, and total derivatives when the inputs are linked along a specified path.

  • For f(x,y)=x²y+3y², freeze y while differentiating with respect to x, or freeze x while differentiating with respect to y.
  • “Holding fixed” is part of the definition, not a claim that the real-world variables can never move together.
  • A total change is different.
  • If both coordinates depend on time, each changing input contributes through its own partial derivative.
  • The multivariable chain rule combines those contributions.
  • The same distinction appears between an option’s fixed-volatility spot sensitivity and its response when implied volatility changes with spot.
fx=∂f∂x=2xy,fy=∂f∂y=x2+6y,dfdt=fxdxdt+fydydt
Calculus: derivation and arithmetic

Partial derivatives: holding the other inputs fixed

  1. Treat y as a constant: derivative of x²y is 2xy, and derivative with respect to x of 3y² is zero.
  2. Treat x as a constant: derivative with respect to y of x²y is x², while derivative of 3y² is 6y.
  3. For a small time step, df≈fₓ dx+fᵧ dy. Divide by dt and take the differentiable path limit to obtain the total derivative.
Work it by hand

At x=2,y=1, fₓ=4 and fᵧ=10. Along a path with dx/dt=3 and dy/dt=−1, total rate is 4×3+10×(−1)=2 output units per time unit.

An analogy to remember

A room’s temperature depends on both location and time. Moving east at one instant measures one partial derivative; walking while the room warms involves both changes.

How this becomes a building block

Partials are individual risk sensitivities. A full scenario uses several of them together. If price V depends on spot S and volatility σ(S), total spot sensitivity includes V_S+V_σ σ′(S). This is a model chain rule, not evidence that a particular volatility–spot relationship is stable.

Further reading: OpenStax Calculus, Volume 3 — partial derivatives ↗

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

def example_partials(x,y):
    return 2*x*y,x*x+6*y

def total_rate(x,y,dx_dt,dy_dt):
    fx,fy=example_partials(x,y)
    return fx*dx_dt+fy*dy_dt

def linked_spot_sensitivity(fixed_vol_delta,vega,dvol_dspot):
    return fixed_vol_delta+vega*dvol_dspot

print(example_partials(2,1),total_rate(2,1,3,-1))

Continue learning

Multivariable Calculus & Partial Derivatives — all lessons
  1. Start with two inputs: change only one
  2. Partial derivatives: holding the other inputs fixed
  3. Gradients, directional derivatives and Jacobians
  4. Hessians, mixed derivatives and second-order scenarios
  5. Constrained optimisation and multiple integrals

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations