Delta of options : A mathematical explanation

Assume we are long a call option, $C$. If the price of the asset, $S$, underlying it declines, the value of $C$ decreases and the long position loses money. To counter the decline in price of the underlying we want to short $\Delta$ units of the underlying asset. What this looks like is if $\Pi$ is the value of the portfolio of long one call option and short $\Delta$ units we have

$$\Pi = C - \Delta S$$

We want $\Pi$ to be insensitive to small changes in the price of the underlying, $S$. That is we want

$$\frac{\partial \Pi}{\partial S} = \frac{\partial C}{\partial S} - \Delta\frac{\partial S}{\partial S} = 0.$$

Solving for $\Delta$ gives

$$\Delta = \frac{\partial C}{\partial S}$$

We can also see this from a Taylor series approximation. If we let $V(S, t)$ be the value at time $t$ of a European option on an underlying with spot price $S$, and no dividend. $V(S, t)$ is infinity many times differentiable in both $S$ and $t$. We now expand $V$ around $(S, t)$

$$V(S + dS, t + dt) = V(S, t) + dS\frac{\partial V}{\partial S} + dt\frac{\partial V}{\partial t} + \frac{(dS)^2}{2}\frac{\partial^2 V}{\partial S^2} + \frac{(dt)^2}{2}\frac{\partial^2 V}{\partial t^2} + dSdt\frac{\partial^2 V}{\partial S \partial t} $$

We approximate $(dS)^2 \approx \sigma^2S^2dt$ and say that $dV = V(S + ds, t + dt) - V(S, t)$ we have

$$dV \approx \frac{\partial V}{\partial S}dS + \frac{\partial V}{\partial t}dt + \frac{\sigma^2S^2}{2}\frac{\partial^2 V}{\partial S^2}dt $$

We can recognize the terms on the right as the options Delta, Theta, and Gamma. Now using this in a portfolio $\Pi$ we have

$$\Pi = V - \Delta S$$ $$d\Pi = dV - \Delta dS$$

Which is approximatly

$$d\Pi \approx \frac{\partial V}{\partial S}dS + \frac{\partial V}{\partial t}dt + \frac{\sigma^2S^2}{2}\frac{\partial^2 V}{\partial S^2}dt - \Delta dS $$

So to remove the sensitivity to price we have $$\Delta = \frac{\partial V}{\partial S}$$

Leaving only Theta and Gamma sensitivity

$$d\Pi \approx \frac{\partial V}{\partial t}dt + \frac{\sigma^2S^2}{2}\frac{\partial^2 V}{\partial S^2}dt$$