# what is the formula for local vol , as a function of implied vol, AND why am i getting a negative denominator?

i am seeing different formulas at different places on stack exchange, so not sure! eg if denominator has a term y^2/w^2, or y/w^2 or 1/w or -1/w

and also, whatever formula i use, i get a negative denominator for the following (which has no arbitrage), so i wonder why it doesnt work? T=1,F=100,K1=95,K2=100,VOL1=27%,VOL2=22% and i am evaluating local vol at K1,T (ie so the 2nd derivative term is zero)

i guess AFK's answer at Local volatility surface corresponding to the implied volatility surface may be correct, as for his, it does not fail in my above example! i wonder why this derivation would be wrong! https://www.frouah.com/finance%20notes/Dupire%20Local%20Volatility.pdf • The expression below seems correct, based on another unrelated source having the same result (I can't spot any cross referencing) in the lecture notes by Jim Gatheral, although the derivation in @AFK's answer skips a lot of steps, so it's not unrealistic there is a typo. – oliversm Apr 23 at 15:58
• your formula is in fact a THIRD formula!!!! :( – Randor Apr 23 at 20:53