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))