|
From: Al C. <aca...@al...> - 2026-02-16 19:53:46
|
Hi, I am using QuantLib and a few my calculations using QuantLib doesn't match with what Bloomberg has. For example, Delta or implied Vol not matching Where can I post my questions? My Best -Al Cell # 917-603-8000 www.AlphaAnalitica.com This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please notify us immediately (646-205-3213 or in...@Al...) and destroy the original message and all copies. -----Original Message----- From: qua...@li... <qua...@li...> Sent: Monday, February 16, 2026 2:38 PM To: Al Cabrini <aca...@al...> Subject: Welcome to the "QuantLib-dev" mailing list Welcome to the Qua...@li... mailing list! Mailing list for QuantLib developers. It's assumed that if you're a QuantLib developer you're also subscribed to <a href="http://lists.sourceforge.net/mailman/listinfo/quantlib-users">quantlib-users</a>. So far quantlib-dev is a low volume mailing list. To post to this list, send your message to: qua...@li... General information about the mailing list is at: https://lists.sourceforge.net/lists/listinfo/quantlib-dev If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at: https://lists.sourceforge.net/lists/options/quantlib-dev/acabrini%40alphaanalitica.com You can also make such adjustments via email by sending a message to: Qua...@li... with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions. You must know your password to change your options (including changing the password, itself) or to unsubscribe without confirmation. It is: erowzaik Normally, Mailman will remind you of your lists.sourceforge.net mailing list passwords once every month, although you can disable this if you prefer. This reminder will also include instructions on how to unsubscribe or change your account options. There is also a button on your options page that will email your current password to you. |
|
From: Dirk E. <ed...@de...> - 2026-02-16 22:00:41
|
On 16 February 2026 at 19:40, Al Cabrini via QuantLib-dev wrote: | I am using QuantLib and a few my calculations using QuantLib doesn't match with what Bloomberg has. | For example, Delta or implied Vol not matching | | Where can I post my questions? It would appear you already cross-posted on Quant StatExchange it seems but in neither post did you provide a _minimally complete verifiable example_. Please do so. Post spot, strike, rate, yield, time to expiry etc to allow us to reproduce and then give you comments. Otherwise you can also take an existing QuantLib example (from the docs, or the unit tests) and see about valuating it at a Bbg terminal (if you have access to one). Dirk -- dirk.eddelbuettel.com | @eddelbuettel | ed...@de... |
|
From: Al C. <aca...@al...> - 2026-02-16 22:02:22
|
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 My Best -Al Cell # 917-603-8000 www.AlphaAnalitica.com This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please notify us immediately (646-205-3213 or in...@Al...) and destroy the original message and all copies. -----Original Message----- From: Dirk Eddelbuettel <ed...@de...> Sent: Monday, February 16, 2026 4:27 PM To: Al Cabrini <aca...@al...> Cc: qua...@li... Subject: Re: [Quantlib-dev] FW: Welcome to the "QuantLib-dev" mailing list On 16 February 2026 at 19:40, Al Cabrini via QuantLib-dev wrote: | I am using QuantLib and a few my calculations using QuantLib doesn't match with what Bloomberg has. | For example, Delta or implied Vol not matching | | Where can I post my questions? It would appear you already cross-posted on Quant StatExchange it seems but in neither post did you provide a _minimally complete verifiable example_. Please do so. Post spot, strike, rate, yield, time to expiry etc to allow us to reproduce and then give you comments. Otherwise you can also take an existing QuantLib example (from the docs, or the unit tests) and see about valuating it at a Bbg terminal (if you have access to one). Dirk -- dirk.eddelbuettel.com | @eddelbuettel | ed...@de... |
|
From: Dirk E. <ed...@de...> - 2026-02-16 22:12:10
|
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. Dirk -- dirk.eddelbuettel.com | @eddelbuettel | ed...@de... |
|
From: Dirk E. <ed...@de...> - 2026-02-17 00:04:36
|
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... |
|
From: Al C. <aca...@al...> - 2026-02-17 17:02:26
|
Hi Dirk,
This is our code:
def calc_option_implied_vol(self, instrument_model: BaseModel, parameter_model: BaseModel = None,
market_data_model: BaseModel = None):
equity_option_instrument = self.get_equity_option_instrument(instrument_model)
evaluationDate = Utils.extract_input_model("evaluationDate", parameter_model)
optionPrice = Utils.extract_input_model("optionPrice", parameter_model)
spotPrice = Utils.extract_input_model("spotPrice", parameter_model)
dayCounter = Utils.extract_input_model("dayCounter", parameter_model)
calendar = Utils.extract_input_model("calendar", market_data_model)
irCurveTenors = Utils.extract_input_model("irCurveTenors", market_data_model)
irCurveZeroRates = Utils.extract_input_model("irCurveZeroRates", market_data_model)
dividendYield = Utils.extract_input_model("dividendYield", market_data_model)
exerciseType = Utils.extract_input_model("exerciseType", instrument_model)
dummyVolatility = 0.2
volQuote = ql.SimpleQuote(dummyVolatility)
dividendCurve = self._buildDividendCurve(evaluationDate, dividendYield, dayCounter)
irCurve = self._buildInterestCurve(evaluationDate, calendar, dayCounter, irCurveTenors, irCurveZeroRates)
volTS = self._buildVol(evaluationDate, calendar, dayCounter, volQuote)
bsmProcess = ql.BlackScholesMertonProcess(
ql.QuoteHandle(ql.SimpleQuote(spotPrice)),
ql.YieldTermStructureHandle(dividendCurve),
ql.YieldTermStructureHandle(irCurve),
ql.BlackVolTermStructureHandle(volTS))
ql.Settings.instance().evaluationDate = evaluationDate
if exerciseType == "European":
equity_option_instrument.setPricingEngine(ql.AnalyticEuropeanEngine(bsmProcess))
elif exerciseType == "American":
if self.americanEngine == "FdBlackScholesVanillaEngine":
aEngine = ql.FdBlackScholesVanillaEngine(bsmProcess, 100, 100)
elif self.americanEngine == "BinomialVanillaEngine":
aEngine = ql.BinomialVanillaEngine(bsmProcess, "crr", 400)
else:
raise MMException(f"Unsupported americanEngine {self.americanEngine}")
equity_option_instrument.setPricingEngine(aEngine)
else:
raise MMException(f"Unsupported exercise type {exerciseType}")
impliedVol = equity_option_instrument.impliedVolatility(optionPrice, bsmProcess, 1e-6, 1000, 0.001, 4.0)
return impliedVol
My Best
-Al
Cell # 917-603-8000
www.AlphaAnalitica.com
This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please notify us immediately (646-205-3213 or in...@Al...) and destroy the original message and all copies.
-----Original Message-----
From: Dirk Eddelbuettel <ed...@de...>
Sent: Monday, February 16, 2026 6:13 PM
To: Dirk Eddelbuettel <ed...@de...>
Cc: Al Cabrini <aca...@al...>; qua...@li...
Subject: RE: [Quantlib-dev] FW: Welcome to the "QuantLib-dev" mailing list
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...
|
|
From: Dirk E. <ed...@de...> - 2026-02-27 03:26:18
|
On 16 February 2026 at 17:12, Dirk Eddelbuettel wrote: | FWIW I cannot make heads or tails of that example. I came up with implied vol | below either 116 or 141%. I had promised myself to revisit this, and I finally did. It turns out I had a parameter entry error. Once I adjust that I am right where Luigi had his results, i.e. difference decimals past 115% depending on daycounter convention used. This also made me realize that instead of maturity as the usual 'fractional part of a year' I should alternatively pass the expiry date down. Which I have now done, as well as the dayCounter convention. With that the R results match the Python results as they should as both go to the same C++ library. Dirk -- dirk.eddelbuettel.com | @eddelbuettel | ed...@de... |
|
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
>
|
|
From: Al C. <aca...@al...> - 2026-02-17 11:41:51
Attachments:
iv_calc_py.txt
|
Hi Luigi, I got this (see attached) from someone on the net. Is this correct? My Best -Al Cell # 917-603-8000 www.AlphaAnalitica.com<http://www.conformity360.com/> This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please notify us immediately (646-205-3213 or in...@Al...<mailto:in...@Al...>) and destroy the original message and all copies. From: Luigi Ballabio <lui...@gm...> Sent: Tuesday, February 17, 2026 4:01 AM To: Dirk Eddelbuettel <ed...@de...> Cc: qua...@li... Subject: Re: [Quantlib-dev] FW: Welcome to the "QuantLib-dev" mailing list 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...<mailto: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<http://dirk.eddelbuettel.com> | @eddelbuettel | ed...@de...<mailto:ed...@de...> _______________________________________________ QuantLib-dev mailing list Qua...@li...<mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Luigi B. <lui...@gm...> - 2026-02-17 13:48:45
|
It looks plausible. Do you have the time information as well? (e.g. the expiry at 16:00) On Tue, Feb 17, 2026 at 12:41 PM Al Cabrini <aca...@al...> wrote: > Hi Luigi, > > > > I got this (see attached) from someone on the net. > > > > Is this correct? > > > > > > My Best > > -Al > > Cell # 917-603-8000 > > www.AlphaAnalitica.com <http://www.conformity360.com/> > > > > This e-mail is intended only for the person or entity to which it is > addressed and may contain information that is privileged, confidential or > otherwise protected from disclosure. Dissemination, distribution or copying > of this e-mail or the information herein by anyone other than the intended > recipient, or an employee or agent responsible for delivering the message > to the intended recipient, is prohibited. If you have received this e-mail > in error, please notify us immediately (646-205-3213 or > in...@Al...) and destroy the original message and all copies. > > > > > > *From:* Luigi Ballabio <lui...@gm...> > *Sent:* Tuesday, February 17, 2026 4:01 AM > *To:* Dirk Eddelbuettel <ed...@de...> > *Cc:* qua...@li... > *Subject:* Re: [Quantlib-dev] FW: Welcome to the "QuantLib-dev" mailing > list > > > > 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 > > |
|
From: Al C. <aca...@al...> - 2026-02-17 13:59:51
|
They all expire at 4pm new York time My Best -Al Cell # 917-603-8000 www.AlphaAnalitica.com<http://www.conformity360.com/> This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please notify us immediately (646-205-3213 or in...@Al...<mailto:in...@Al...>) and destroy the original message and all copies. From: Luigi Ballabio <lui...@gm...> Sent: Tuesday, February 17, 2026 8:48 AM To: Al Cabrini <aca...@al...> Cc: Dirk Eddelbuettel <ed...@de...>; qua...@li... Subject: Re: [Quantlib-dev] FW: Welcome to the "QuantLib-dev" mailing list It looks plausible. Do you have the time information as well? (e.g. the expiry at 16:00) On Tue, Feb 17, 2026 at 12:41 PM Al Cabrini <aca...@al...<mailto:aca...@al...>> wrote: Hi Luigi, I got this (see attached) from someone on the net. Is this correct? My Best -Al Cell # 917-603-8000 www.AlphaAnalitica.com<http://www.conformity360.com/> This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please notify us immediately (646-205-3213 or in...@Al...<mailto:in...@Al...>) and destroy the original message and all copies. From: Luigi Ballabio <lui...@gm...<mailto:lui...@gm...>> Sent: Tuesday, February 17, 2026 4:01 AM To: Dirk Eddelbuettel <ed...@de...<mailto:ed...@de...>> Cc: qua...@li...<mailto:qua...@li...> Subject: Re: [Quantlib-dev] FW: Welcome to the "QuantLib-dev" mailing list 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...<mailto: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<http://dirk.eddelbuettel.com> | @eddelbuettel | ed...@de...<mailto:ed...@de...> _______________________________________________ QuantLib-dev mailing list Qua...@li...<mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Luigi B. <lui...@gm...> - 2026-02-16 21:36:44
|
Hello Al — either here or quantlib-users are ok. quantlib-users might have a bit more people on it. Luigi On Mon, Feb 16, 2026 at 8:59 PM Al Cabrini via QuantLib-dev < qua...@li...> wrote: > Hi, > > I am using QuantLib and a few my calculations using QuantLib doesn't match > with what Bloomberg has. > For example, Delta or implied Vol not matching > > Where can I post my questions? > > > My Best > -Al > Cell # 917-603-8000 > www.AlphaAnalitica.com > > This e-mail is intended only for the person or entity to which it is > addressed and may contain information that is privileged, confidential or > otherwise protected from disclosure. Dissemination, distribution or copying > of this e-mail or the information herein by anyone other than the intended > recipient, or an employee or agent responsible for delivering the message > to the intended recipient, is prohibited. If you have received this e-mail > in error, please notify us immediately (646-205-3213 or > in...@Al...) and destroy the original message and all copies. > > > -----Original Message----- > From: qua...@li... < > qua...@li...> > Sent: Monday, February 16, 2026 2:38 PM > To: Al Cabrini <aca...@al...> > Subject: Welcome to the "QuantLib-dev" mailing list > > Welcome to the Qua...@li... mailing list! > Mailing list for QuantLib developers. > > It's assumed that if you're a QuantLib developer you're also subscribed to > <a href="http://lists.sourceforge.net/mailman/listinfo/quantlib-users">quantlib-users</a>. > > So far quantlib-dev is a low volume mailing list. > > To post to this list, send your message to: > > qua...@li... > > General information about the mailing list is at: > > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > If you ever want to unsubscribe or change your options (eg, switch to or > from digest mode, change your password, etc.), visit your subscription page > at: > > > https://lists.sourceforge.net/lists/options/quantlib-dev/acabrini%40alphaanalitica.com > > > You can also make such adjustments via email by sending a message to: > > Qua...@li... > > with the word `help' in the subject or body (don't include the quotes), > and you will get back a message with instructions. > > You must know your password to change your options (including changing the > password, itself) or to unsubscribe without confirmation. It is: > > erowzaik > > Normally, Mailman will remind you of your lists.sourceforge.net mailing > list passwords once every month, although you can disable this if you > prefer. This reminder will also include instructions on how to unsubscribe > or change your account options. There is also a button on your options > page that will email your current password to you. > > > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > |