How to derivate the implied volatility?

45 Views Asked by At

I want to calculate $\frac {\partial w}{\partial y}$ and $\frac {\partial ^2 w}{\partial y^2}$, with $w = \hat{\sigma}^2*T$ and $y = ln(K/S)$ in order to compute the local volatility.

To get $\hat{\sigma}$ I use the inverse function of it :

$d_1 = -y/sqrt(w)+ sqrt(w)/2$

$d_2 = -y/sqrt(w) - sqrt(w)/2$

$S_{0}*(N(d1)-N(d2)*exp(y))$

So, I tried to use the finite difference (exemple page 72), but it doesn't work since I'm bad, and I don't understand how to make it works there. (I end up with $\frac {\partial ^2 w}{\partial y^2} = 1.919275e+16$ ...)

Could you give me a few tips please ?