|
From: Goutham M. <gou...@gm...> - 2022-02-16 09:25:00
|
Hi all, I am pricing FX options and was going through the Quantlib Python Guide to assist me. I came to this section on DeltaVolQuotes: deltaType = ql.DeltaVolQuote.Fwd # Also supports: Spot, PaSpot, PaFwd atmType = ql.DeltaVolQuote.AtmFwd # Also supports: AtmSpot, AtmDeltaNeutral, AtmVegaMax, AtmGammaMax,␣ ˓→AtmPutCall50 maturity = 1.0 volAtm, vol25DeltaCall, vol25DeltaPut = 0.08, 0.075, 0.095 atmDeltaQuote = ql.DeltaVolQuote(ql.QuoteHandle(ql.SimpleQuote(volAtm)), deltaType, maturity, atmType) vol25DeltaPutQuote = ql.DeltaVolQuote(-0.25, ql.QuoteHandle(ql.SimpleQuote(vol25DeltaPut)), maturity,␣ ˓→deltaType) vol25DeltaCallQuote = ql.DeltaVolQuote(0.25, ql.QuoteHandle(ql.SimpleQuote(vol25DeltaCall)), maturity,␣ ˓→deltaType) I have the ATMf and 25DRR and 25D Fly quotes for various tenors as attached in the table below. My doubt is using the code above, is there any way I can construct the volatility smile curve using QuantLib to derive the implied volatility of an option. Vol Table: ATMF Vol 25D RR 25D Std 10D RR 10 Std Bid Ask 1m 6.1 6.45 0.25 0.5 0.05 0.15 0.45 0.9 0.16 0.48 2m 6.05 6.4 0.3 0.55 0.1 0.25 0.54 0.99 0.32 0.8 3m 6.05 6.3 0.35 0.6 0.15 0.35 0.63 1.08 0.48 1.12 6m 5.9 6.1 0.45 0.65 0.2 0.35 0.81 1.17 0.64 1.12 9m 5.9 6.1 0.45 0.7 0.2 0.35 0.81 1.26 0.64 1.12 1y 5.9 6.1 0.5 0.7 0.2 0.4 0.9 1.26 0.64 1.28 2y 5.5 6 0.3 0.7 0.25 0.55 0.54 1.26 0.8 1.76 3y 5.2 5.7 0.3 0.7 0.3 0.7 0.54 1.26 0.96 2.24 4y 5.1 5.6 0.1 0.7 0.35 0.85 0.18 1.26 1.12 2.72 5y 5 5.5 -0.1 0.4 0.5 0.9 -0.18 0.72 1.6 2.88 Thank You, Best, Goutham |