Skip to content
All library documents

Dupire Local Volatility Requires an Implied Volatility Surface

Article Quant Q&A · Author: Add

Summary

The document concerns estimating local volatility with Dupire's formula using finite differences. The question supplies a spot price, strike, rate, maturity, and a single implied volatility, then attempts to approximate derivatives of option prices with respect to time and strike. An answer points to an external worked example, but does not explain its steps in the document itself, so the finite-difference implementation and its numerical details remain unresolved.

A second answer highlights a central input issue: a constant implied volatility does not provide the surface variation needed to infer a meaningful local-volatility function. Dupire's calculation depends on the shape of option prices across strikes and maturities; using a flat volatility can produce unstable or implausible local volatility, including problems around butterfly curvature. The suggested direction is to derive local variance from an actual implied-volatility surface. No corrected code, diagnostics, or quantitative results are supplied.

Key ideas

  • Dupire local volatility is inferred from option prices across strikes and maturities, not from one isolated volatility quote.
  • Finite-difference estimates of time and strike derivatives depend on the option-price surface and numerical implementation.
  • A constant implied volatility input undermines the purpose of deriving a varying local-volatility model.
  • The document recommends using the actual implied-volatility surface but does not provide a complete implementation.

Tags

Full text
# Local Volatility calculation in Python


# Local Volatility calculation in Python












I am trying to price Local Volatility in Python using Dupire (Finite Difference Method).

I have following set of information

Spot: 770.05, Strike: 850, Type: 'C', rfr: 0.0066, time to maturity = 25/365 days, IV: 0.19468.

In order to solve using FDM we need to find

I have used following code in python, can you please let me know what is missing here.

deltat = 0.00071 delta = 1.5

```
dc_by_dt = ((bsm_price('c',0.1946811865981668,770.05,850,0.0066,25.55/365)+deltat,0)) -(bsm_price('c',0.1946811865981668,770.05,850,0.0066,deltat-(25.55/365),0))) / (2 * delta)

dc2_by_dk2 = ((bsm_price('c',0.1946811865981668,770.05,(850-delta),0.0066,25.55/365,0)) - 2 * (bsm_price('c',0.1946811865981668,770.05,850,0.0066,25.55/365,0)) + (bsm_price('c',0.1946811865981668,770.05,(850 + delta),0.0066,25.55/365,0))) / (delta*delta)

local = np.sqrt((dc_by_dt)/(0.5*(850*850)*dc2_by_dk2))
```

## Answer by Vincent C. (score 2)

https://quant.stackexchange.com/a/45406

Unfortunately not written in Python, but in R. If you have experience with R this real life example posted on an underground quant blog has step by step what you may be looking for: (Scroll down to conclusion)

https://quantipy.wordpress.com/2017/08/21/implementation-of-dupires-formula-for-local-volatilities/

(I do not take credit for this persons work), but it's intuition has helped me greatly when I was tackling a similar volatility model problem.

I hope it helps.

## Answer by Dmitry (score 0)

https://quant.stackexchange.com/a/45558

By having constant implied volatility as an input you defeat the purpose of using local vol plus think about your butterfly value. I will venture to say your local vol may blow up.

A better way is to compute local variance of the actual implied vol surface.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.