|
From: Luigi B. <lui...@gm...> - 2026-02-17 09:00:54
|
Hi, here is how I would calculate it:
import QuantLib as ql
today = ql.Date(13, 2, 2026)
ql.Settings.instance().evaluationDate = today
option = ql.VanillaOption(
ql.PlainVanillaPayoff(ql.Option.Call, 155),
ql.AmericanExercise(today, ql.Date(6,3,2026)),
)
calendar = ql.UnitedStates(ql.UnitedStates.GovernmentBond)
day_counter = ql.Actual365Fixed()
u = ql.QuoteHandle(ql.SimpleQuote(138.75))
q = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0, day_counter))
r = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.0366, day_counter))
vol_s = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(today, calendar,
1.112938, day_counter))
p = ql.GeneralizedBlackScholesProcess(u, q, r, vol_s)
print(100 * option.impliedVolatility(9.475, p))
This prints 115.899, not quite the same as Bloomberg's 116.124 but a lot
closer than your 141. As Dirk says, you might have some problem in the way
you're calling the library.
(Also, changing day_counter to Act/360 prints 115.092, and changing it to
Business252(calendar) prints 117.971, so it's worth trying to figure out
from the BBG docs—if you have any—which one is correct.)
Hope this helps,
Luigi
On Tue, Feb 17, 2026 at 1:05 AM Dirk Eddelbuettel <ed...@de...> wrote:
>
> On 16 February 2026 at 16:11, Dirk Eddelbuettel wrote:
> |
> | On 16 February 2026 at 22:02, Al Cabrini wrote:
> | | Thank you Dirk,
> | |
> | | I added comment below
> | |
> | | Ticker = BE 03/06/26 C155 Equity
> | | OPT_PUT_CALL = Call
> | | OPT_STRIKE_PX = 155
> | | OPT_EXER_TYP = American
> | | OPT_EXERCISE_DT = Mar-20-2026
> | | OPT_UNDL_PX = 138.75
> | | Option Price MID = 9.475
> | | evaluation date = Feb-13-2026
> | |
> | | Here is the Bloomberg value for implied Vol is 116.124 but my Quantlib
> calculatin is 141.3
> |
> | Show as your call to quantlib, please. The issue will likely be that you
> | transcribed parameters the wrong way. Sometimes it is daysdifference/365
> | instead of over 252 or vice versa. It all depends. And it is good
> practice to
> | calibrate so I would start with spot = strike = 100, t_to_mat = 1 year,
> vol =
> | 25%, r = 0.04 etc and see if I can start aligning call or put prices.
> |
> | This library is well known, and had a million eyes on it. It is not
> likely
> | that the code is off. That leaves ... the invocation.
> |
> | So show us what you did.
>
> FWIW I cannot make heads or tails of that example. I came up with implied
> vol
> below either 116 or 141%.
>
> To reset, consider a posted example for a European call option posted here:
> https://en.wikipedia.org/wiki/Implied_volatility
>
> This recomputes for me (using RQuantLib)
>
> > EuropeanOptionImpliedVolatility(type="call", value=2,
> underlying=51.25, strike=50, dividendYield=0.00, riskFreeRate=0.05,
> maturity=32/365, volatility=0.4)
> [1] 0.186925
> attr(,"class")
> [1] "EuropeanOptionImpliedVolatility" "ImpliedVolatility"
> >
>
> matching the stipulated 18.7% on the wikipedia page.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | ed...@de...
>
>
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
|