# Numerical example of how to calculate local vol surface from IV surface

I'm looking for an excel example (not a copy of Dupire's eqn) of how to convert an IV surface to a local vol surface. If unsuccessful I'll work through Dupire's eqn but would be helpful to look at an example first.

• I have same problem as you faced. I just wanted to know were you able to solve this issue. If yes can you please share your feedback and let me know if you have practically implemented something with real data. Thanks
Commented Apr 24, 2019 at 10:02
• @Add I got lazy and for an expiry I calculated the option IV at discrete underlying prices/option delta i.e. 10 points, delta (-10,...,10). I could then fit a polynomial curve to approximate the IV curve. Fyi on a daily this curve tends to move vertically up and down proportional to underling vol, rather than changing the shape of the curve. As days to expiry reduce, the curve becomes more concave. You can model this, but I haven't done so yet.
– Zeus
Commented Apr 25, 2019 at 23:05
• Thanks for your reply but given I am also at a phase where I feel I need to do the same thing. If you wont mind can you share your example what exactly you have done so that I can implement in my case. FYI...I am doing it for SPX volatility +- 20 moneyness.
I know one article (download) that explaining how to calculate local vol surface from IV surface and also chapter 18 of this book is very good In this context. However you know that Dupire’s (1994) formula for local volatility is \begin{align} \sigma_L(k,T)=\sqrt\frac{\frac{\partial C}{\partial T}}{\frac{1}{2}K^2\frac{\partial^2 C}{\partial K^2}} \end{align} where $C = C(K,T)$ is the time-$t$ call price with strike $K$ and maturity $T$ when the spot price is $S_t$.The analytic expressions for the derivatives required of the Dupire (1994) local volatility formula require extensive coding From a coding point of view, it is simpler to approximate the derivatives using finite differences. Write $C(K) = C(K,T)$ to emphasize the dependence of the European call price on the maturity T. We use a small time increment $\Delta t$ and approximate the time derivative as the central difference
\begin{align} \frac{\partial C}{\partial T}\approx\frac{C(K,T+\Delta T)-C(K,T-\Delta T)}{2\Delta t} \end{align} Similarly, we can use a small strike increment $\Delta K$ and approximate the second order strike derivative as the central difference \begin{align} \frac{\partial^2 C}{\partial K^2}\approx\frac{C(K-\Delta K,T)-2C(K,T)+C(K+\Delta K,T)}{(\Delta K )^2} \end{align}