# Calculus for Traders

> Calculus describes how quantities change. Learn derivatives, integrals and Taylor approximations, and how they underpin Greeks, duration and optimisation.

Source: https://learn.tradelabsai.com/math/calculus-for-traders/  
Track: Math and Statistics · Level: Advanced · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "Calculus for Traders", https://learn.tradelabsai.com/math/calculus-for-traders/

Calculus is the mathematics of change. In trading, many key ideas are calculus in disguise: an option's delta is a derivative of its price with respect to the underlying, a bond's duration is a derivative of its price with respect to yield, and portfolio optimisation finds where derivatives equal zero. You do not need to solve equations by hand to trade, but understanding what derivatives mean makes Greeks, duration, convexity and many models much clearer.

## Derivatives: rates of change

A derivative measures how fast one quantity changes when another changes slightly.

```
dy/dx ≈ change in y / change in x, for a very small change in x
```

| Financial measure | Derivative of | With respect to | Lesson |
|---|---|---|---|
| Delta | Option price | Underlying price | [Delta](https://learn.tradelabsai.com/options/delta/) |
| Gamma | Delta (second derivative of price) | Underlying price | [Gamma](https://learn.tradelabsai.com/options/gamma/) |
| Theta | Option price | Time | [Theta](https://learn.tradelabsai.com/options/theta/) |
| Vega | Option price | Volatility | [Vega](https://learn.tradelabsai.com/options/vega/) |
| Rho | Option price | Interest rate | [Rho](https://learn.tradelabsai.com/options/rho/) |
| Duration | Bond price (scaled) | Yield | [Duration](https://learn.tradelabsai.com/bonds-credit/duration/) |
| Convexity | Duration (second derivative) | Yield | [Convexity](https://learn.tradelabsai.com/bonds-credit/convexity/) |

## Taylor approximations

Calculus lets traders approximate how a value changes for a small move using derivatives:

```
change in value ≈ first derivative × Δx + ½ × second derivative × (Δx)²
```

**Example: Approximating an option price change**
A call has delta 0.50 and gamma 0.04, and the stock rises $3.

Change ≈ 0.50 × 3 + ½ × 0.04 × 3² = 1.50 + 0.18 = $1.68.

Delta alone would estimate $1.50; adding gamma improves the estimate. The same structure gives bond price changes from duration and convexity. See [Gamma](https://learn.tradelabsai.com/options/gamma/) and [Convexity](https://learn.tradelabsai.com/bonds-credit/convexity/).

## Numerical derivatives

When there is no formula, traders estimate derivatives by "bumping" inputs:

```
derivative ≈ [f(x + h) - f(x - h)] / (2h)
```

Risk systems compute Greeks and DV01 this way for complex positions. See [DV01](https://learn.tradelabsai.com/bonds-credit/dv01/) and [Managing Portfolio Greeks](https://learn.tradelabsai.com/options/managing-portfolio-greeks/).

## Integrals: adding up continuous changes

Integration is the reverse of differentiation: it adds up small pieces. In finance:

- **Expected values of continuous variables** are integrals over probability densities. See [Random Variables](https://learn.tradelabsai.com/math/random-variables/).
- **Option prices** are discounted integrals of payoffs over the probability distribution of the underlying. See [Black-Scholes Model](https://learn.tradelabsai.com/options/black-scholes-model/).
- **Continuous compounding** comes from integrating a constant growth rate. See [Compounding and Geometric vs Arithmetic Returns](https://learn.tradelabsai.com/math/compounding/).

## Optimisation

At a maximum or minimum, the derivative equals zero. This idea is used to:

- **Find the Kelly bet size** that maximises expected log growth. See [Kelly Criterion](https://learn.tradelabsai.com/risk/kelly-criterion/).
- **Fit models** by maximising likelihood or minimising errors. See [Maximum Likelihood](https://learn.tradelabsai.com/math/maximum-likelihood/).
- **Optimise portfolios** subject to constraints. See [Optimization](https://learn.tradelabsai.com/math/optimization/).

**Example: Deriving the Kelly fraction**
For an even money bet with win probability p, expected log growth is G(f) = p ln(1 + f) + (1 minus p) ln(1 minus f). Setting the derivative to zero, p / (1 + f) minus (1 minus p) / (1 minus f) = 0, gives f = 2p minus 1. For p = 0.55, the optimal fraction is 10%.

## Stochastic calculus

Prices move randomly, so ordinary calculus is not enough for continuous time models. Stochastic calculus, including Itô's lemma, handles functions of random processes and is the foundation of the Black Scholes model and modern derivatives pricing. It explains, for example, why the drift of log prices is μ minus σ²/2. See [Lognormal Distribution](https://learn.tradelabsai.com/math/lognormal-distribution/).

## Gradients and machine learning

Many machine learning models are trained by gradient descent: the model's error is treated as a function of its parameters, the derivative (gradient) shows which direction reduces the error, and the parameters move a small step in that direction, repeatedly. Neural networks used in trading research rely on this. See [Neural Networks and Deep Learning](https://learn.tradelabsai.com/machine-learning/neural-networks/).

Alongside calculus, the other mathematical toolkit quants rely on is [Linear Algebra for Traders](https://learn.tradelabsai.com/math/linear-algebra-for-traders/), used for portfolios, factor models and regression.

## Frequently asked questions

### Why do traders need calculus?

Because key measures such as option Greeks, bond duration and convexity are derivatives, and optimisation relies on calculus.

### What is a derivative in mathematics?

The rate at which one quantity changes when another changes by a very small amount.

### What is stochastic calculus?

Calculus for random processes, used to model prices in continuous time and to derive option pricing models like Black Scholes.

Next, learn how to find the best parameters in [Optimization](https://learn.tradelabsai.com/math/optimization/).

## Continue learning

- Next lesson: [Optimization](https://learn.tradelabsai.com/math/optimization/)
- Previous lesson: [Linear Algebra for Traders](https://learn.tradelabsai.com/math/linear-algebra-for-traders/)
- Related: [Linear Algebra for Traders](https://learn.tradelabsai.com/math/linear-algebra-for-traders/): Linear algebra handles many assets at once using vectors and matrices. Learn portfolio variance with covariance matrices, PCA, regressions and the Python tools.
- Related: [The Option Greeks Explained](https://learn.tradelabsai.com/options/the-option-greeks-explained/): The option Greeks measure how an option's price responds to price, time, volatility and rates. Learn what each Greek means and how traders use them together.
- Related: [Duration](https://learn.tradelabsai.com/bonds-credit/duration/): Duration measures how sensitive a bond's price is to interest rate changes. Learn Macaulay, modified and effective duration, how to calculate them and their uses.
- Related: [Convexity](https://learn.tradelabsai.com/bonds-credit/convexity/): Convexity measures how a bond's duration changes as yields move, refining price estimates for big moves. Learn the formula, positive and negative convexity and uses.
- Related: [Optimization](https://learn.tradelabsai.com/math/optimization/): Optimisation finds inputs that maximise or minimise an objective, from portfolio weights to strategy settings. Learn the methods and how to avoid overfitting.
- Related: [Black-Scholes Model](https://learn.tradelabsai.com/options/black-scholes-model/): The Black Scholes model prices European options from five inputs. Learn the formula, its assumptions, a step by step example and where the model breaks down.
