You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(60) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(18) |
Feb
(4) |
Mar
(6) |
Apr
(2) |
May
|
Jun
(12) |
Jul
(48) |
Aug
(6) |
Sep
(3) |
Oct
(24) |
Nov
(15) |
Dec
(18) |
| 2002 |
Jan
(39) |
Feb
(12) |
Mar
(80) |
Apr
(72) |
May
(46) |
Jun
(27) |
Jul
(23) |
Aug
(34) |
Sep
(65) |
Oct
(71) |
Nov
(19) |
Dec
(14) |
| 2003 |
Jan
(44) |
Feb
(59) |
Mar
(18) |
Apr
(62) |
May
(54) |
Jun
(27) |
Jul
(46) |
Aug
(15) |
Sep
(44) |
Oct
(36) |
Nov
(19) |
Dec
(12) |
| 2004 |
Jan
(26) |
Feb
(33) |
Mar
(47) |
Apr
(63) |
May
(36) |
Jun
(65) |
Jul
(80) |
Aug
(163) |
Sep
(65) |
Oct
(39) |
Nov
(36) |
Dec
(39) |
| 2005 |
Jan
(97) |
Feb
(78) |
Mar
(64) |
Apr
(64) |
May
(48) |
Jun
(55) |
Jul
(89) |
Aug
(57) |
Sep
(51) |
Oct
(111) |
Nov
(86) |
Dec
(76) |
| 2006 |
Jan
(84) |
Feb
(103) |
Mar
(143) |
Apr
(92) |
May
(55) |
Jun
(58) |
Jul
(71) |
Aug
(57) |
Sep
(74) |
Oct
(59) |
Nov
(8) |
Dec
(32) |
| 2007 |
Jan
(60) |
Feb
(40) |
Mar
(50) |
Apr
(26) |
May
(61) |
Jun
(120) |
Jul
(119) |
Aug
(48) |
Sep
(121) |
Oct
(66) |
Nov
(103) |
Dec
(43) |
| 2008 |
Jan
(60) |
Feb
(109) |
Mar
(92) |
Apr
(106) |
May
(82) |
Jun
(59) |
Jul
(67) |
Aug
(118) |
Sep
(131) |
Oct
(56) |
Nov
(37) |
Dec
(69) |
| 2009 |
Jan
(75) |
Feb
(76) |
Mar
(103) |
Apr
(78) |
May
(61) |
Jun
(35) |
Jul
(66) |
Aug
(69) |
Sep
(166) |
Oct
(46) |
Nov
(72) |
Dec
(65) |
| 2010 |
Jan
(48) |
Feb
(57) |
Mar
(93) |
Apr
(85) |
May
(123) |
Jun
(82) |
Jul
(98) |
Aug
(121) |
Sep
(146) |
Oct
(86) |
Nov
(72) |
Dec
(34) |
| 2011 |
Jan
(96) |
Feb
(55) |
Mar
(73) |
Apr
(57) |
May
(33) |
Jun
(74) |
Jul
(89) |
Aug
(71) |
Sep
(103) |
Oct
(76) |
Nov
(52) |
Dec
(61) |
| 2012 |
Jan
(48) |
Feb
(54) |
Mar
(78) |
Apr
(60) |
May
(75) |
Jun
(59) |
Jul
(33) |
Aug
(66) |
Sep
(43) |
Oct
(46) |
Nov
(75) |
Dec
(51) |
| 2013 |
Jan
(112) |
Feb
(72) |
Mar
(49) |
Apr
(48) |
May
(42) |
Jun
(44) |
Jul
(80) |
Aug
(19) |
Sep
(33) |
Oct
(37) |
Nov
(38) |
Dec
(98) |
| 2014 |
Jan
(113) |
Feb
(93) |
Mar
(49) |
Apr
(106) |
May
(97) |
Jun
(155) |
Jul
(87) |
Aug
(127) |
Sep
(85) |
Oct
(48) |
Nov
(41) |
Dec
(37) |
| 2015 |
Jan
(34) |
Feb
(50) |
Mar
(104) |
Apr
(80) |
May
(82) |
Jun
(66) |
Jul
(41) |
Aug
(84) |
Sep
(37) |
Oct
(65) |
Nov
(83) |
Dec
(52) |
| 2016 |
Jan
(68) |
Feb
(35) |
Mar
(42) |
Apr
(35) |
May
(54) |
Jun
(75) |
Jul
(45) |
Aug
(52) |
Sep
(60) |
Oct
(52) |
Nov
(36) |
Dec
(64) |
| 2017 |
Jan
(92) |
Feb
(59) |
Mar
(35) |
Apr
(53) |
May
(83) |
Jun
(43) |
Jul
(65) |
Aug
(68) |
Sep
(46) |
Oct
(75) |
Nov
(40) |
Dec
(49) |
| 2018 |
Jan
(68) |
Feb
(54) |
Mar
(48) |
Apr
(58) |
May
(51) |
Jun
(44) |
Jul
(40) |
Aug
(68) |
Sep
(35) |
Oct
(15) |
Nov
(7) |
Dec
(37) |
| 2019 |
Jan
(43) |
Feb
(7) |
Mar
(22) |
Apr
(21) |
May
(31) |
Jun
(39) |
Jul
(73) |
Aug
(45) |
Sep
(47) |
Oct
(89) |
Nov
(19) |
Dec
(69) |
| 2020 |
Jan
(52) |
Feb
(63) |
Mar
(45) |
Apr
(59) |
May
(42) |
Jun
(57) |
Jul
(30) |
Aug
(29) |
Sep
(75) |
Oct
(64) |
Nov
(96) |
Dec
(22) |
| 2021 |
Jan
(14) |
Feb
(24) |
Mar
(35) |
Apr
(58) |
May
(36) |
Jun
(15) |
Jul
(18) |
Aug
(31) |
Sep
(30) |
Oct
(33) |
Nov
(27) |
Dec
(16) |
| 2022 |
Jan
(35) |
Feb
(22) |
Mar
(14) |
Apr
(20) |
May
(44) |
Jun
(53) |
Jul
(25) |
Aug
(56) |
Sep
(11) |
Oct
(47) |
Nov
(22) |
Dec
(36) |
| 2023 |
Jan
(30) |
Feb
(17) |
Mar
(31) |
Apr
(48) |
May
(31) |
Jun
(7) |
Jul
(25) |
Aug
(26) |
Sep
(61) |
Oct
(66) |
Nov
(19) |
Dec
(21) |
| 2024 |
Jan
(37) |
Feb
(29) |
Mar
(26) |
Apr
(26) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(13) |
Sep
(15) |
Oct
(25) |
Nov
(13) |
Dec
(8) |
| 2025 |
Jan
(13) |
Feb
(1) |
Mar
(16) |
Apr
(17) |
May
(8) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(6) |
Oct
(15) |
Nov
(6) |
Dec
|
| 2026 |
Jan
(6) |
Feb
(4) |
Mar
(20) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ashish B. <ash...@gm...> - 2022-06-28 09:49:15
|
Thanks all for the detailed explanation. Jack, I am also interested in getting the spot Delta & Gamma. Would be good if this could be included in the engine itself. Till then we will use the bumping approach as suggested by Jonathan and Luigi. Just to confirm, will the TW engine, which is part of 1.27, be exposed in SWIG in the same release? Thanks Ashish On Tue, 28 Jun 2022 at 14:54, Jack G <jac...@gm...> wrote: > For asian options it's not exactly obvious what forward delta means as > there are several fixing dates, but spot delta should be straightforward > enough. > > Moment matching uses an analytic black formula ( > https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/pricingengines/asian/turnbullwakemanasianengine.cpp#L118) > and everything is linear in spot so spot delta should be as easy as > evaluating the black calculator delta at the same time as calling the price. > > There are a few edge cases (eg. if prior fixings mean it's already > in-the-money) that need to be considered. > > I'm doing some experiments now to confirm this, I can look at implementing > this and exposing them in SWIG but can't really commit to a timeline for it > right now. > > On Tue, Jun 28, 2022 at 3:27 PM Luigi Ballabio <lui...@gm...> > wrote: > >> In the FD case, the solver doesn't bump and reprice; at the end of the >> roll-back calculation, the result is a grid of values at different values >> of the underlying. When the delta and gamma call `valueAt` repeatedly, >> they're only interpolating at different points on that grid. Compared to >> the FD simulation the engine just did, it doesn't give a noticeable >> overhead. >> >> However, this is specific to a FD simulation, so it can't be applied to >> `TurnbullWakemanAsianEngine` which uses an analytic approximation. In >> principle, it might be possible to differentiate it, but it's probably >> easier to bump and reprice as Jonathan said. >> >> Luigi >> >> >> On Tue, Jun 28, 2022 at 12:50 AM Jonathan Sweemer <sw...@gm...> >> wrote: >> >>> Hi Ashish, >>> >>> The FdBlackScholesAsianEngine calculates greeks by bumping the spot and >>> repricing[1] so you should be able to do the same in your code. >>> >>> I’m actually not convinced it’s a good idea to always include the greeks >>> in the result. In the case of FdBlackScholesAsianEngine it means the solver >>> is called six times - once for the price, twice for the delta, and three >>> times for the gamma. Perhaps there should be a way to tell the engine only >>> to return the price to avoid the overhead of calculating the greeks for >>> people who don’t need them. >>> >>> [1] >>> https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/methods/finitedifferences/solvers/fdmsimple2dbssolver.cpp#L53 >>> >>> 2022년 6월 27일 (월) 21:54, Ashish Bansal <ash...@gm...>님이 작성: >>> >>>> Hi >>>> >>>> Including Partha from my team who is trying to install it and test >>>> 1.27. >>>> >>>> Luigi, >>>> >>>> I looked at the code and noticed that the >>>> *turnbullwakemanasianengine.cpp* doesn't include the Delta or Gamma in >>>> the results. Could including the solver for Delta and Gamma work, how it is >>>> included in fdblackscholesasianengine.cpp? >>>> results_.delta = solver->deltaAt(spot, avg, spot*0.01); >>>> results_.gamma = solver->gammaAt(spot, avg, spot*0.01); >>>> >>>> Regards, >>>> Ashish >>>> >>>> On Fri, 24 Jun 2022 at 11:38, Ashish Bansal <ash...@gm...> >>>> wrote: >>>> >>>>> I can understand. You are doing great work for the community by >>>>> maintaining this library. Thanks for it. >>>>> >>>>> Let me try building using SWIG as per instructions on this page. >>>>> Thanks again for info. >>>>> >>>>> Regards, >>>>> Ashish >>>>> >>>>> On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...> >>>>> wrote: >>>>> >>>>>> Hello Ansish, >>>>>> no, I can not commit to a date for the release. Other issues at >>>>>> my job might take priority over the release. >>>>>> >>>>>> You can try the changes before the release by checking out the code >>>>>> from GitHub and following the instructions at < >>>>>> https://www.quantlib.org/install.shtml> to compile it. >>>>>> >>>>>> Hope this helps, >>>>>> Luigi >>>>>> >>>>>> >>>>>> On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal < >>>>>> ash...@gm...> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> We want to test the TurnbullWakemanAsianEngine using Python. How can >>>>>>> we test the new changes through Python SWIG? >>>>>>> >>>>>>> Could v1.27 be released a little early, say by 10th July, if >>>>>>> possible? >>>>>>> >>>>>>> Regards >>>>>>> Ashish Bansal >>>>>>> _______________________________________________ >>>>>>> QuantLib-users mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>>> >>>>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Jack G <jac...@gm...> - 2022-06-28 09:23:52
|
For asian options it's not exactly obvious what forward delta means as there are several fixing dates, but spot delta should be straightforward enough. Moment matching uses an analytic black formula ( https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/pricingengines/asian/turnbullwakemanasianengine.cpp#L118) and everything is linear in spot so spot delta should be as easy as evaluating the black calculator delta at the same time as calling the price. There are a few edge cases (eg. if prior fixings mean it's already in-the-money) that need to be considered. I'm doing some experiments now to confirm this, I can look at implementing this and exposing them in SWIG but can't really commit to a timeline for it right now. On Tue, Jun 28, 2022 at 3:27 PM Luigi Ballabio <lui...@gm...> wrote: > In the FD case, the solver doesn't bump and reprice; at the end of the > roll-back calculation, the result is a grid of values at different values > of the underlying. When the delta and gamma call `valueAt` repeatedly, > they're only interpolating at different points on that grid. Compared to > the FD simulation the engine just did, it doesn't give a noticeable > overhead. > > However, this is specific to a FD simulation, so it can't be applied to > `TurnbullWakemanAsianEngine` which uses an analytic approximation. In > principle, it might be possible to differentiate it, but it's probably > easier to bump and reprice as Jonathan said. > > Luigi > > > On Tue, Jun 28, 2022 at 12:50 AM Jonathan Sweemer <sw...@gm...> > wrote: > >> Hi Ashish, >> >> The FdBlackScholesAsianEngine calculates greeks by bumping the spot and >> repricing[1] so you should be able to do the same in your code. >> >> I’m actually not convinced it’s a good idea to always include the greeks >> in the result. In the case of FdBlackScholesAsianEngine it means the solver >> is called six times - once for the price, twice for the delta, and three >> times for the gamma. Perhaps there should be a way to tell the engine only >> to return the price to avoid the overhead of calculating the greeks for >> people who don’t need them. >> >> [1] >> https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/methods/finitedifferences/solvers/fdmsimple2dbssolver.cpp#L53 >> >> 2022년 6월 27일 (월) 21:54, Ashish Bansal <ash...@gm...>님이 작성: >> >>> Hi >>> >>> Including Partha from my team who is trying to install it and test 1.27. >>> >>> Luigi, >>> >>> I looked at the code and noticed that the >>> *turnbullwakemanasianengine.cpp* doesn't include the Delta or Gamma in >>> the results. Could including the solver for Delta and Gamma work, how it is >>> included in fdblackscholesasianengine.cpp? >>> results_.delta = solver->deltaAt(spot, avg, spot*0.01); >>> results_.gamma = solver->gammaAt(spot, avg, spot*0.01); >>> >>> Regards, >>> Ashish >>> >>> On Fri, 24 Jun 2022 at 11:38, Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> I can understand. You are doing great work for the community by >>>> maintaining this library. Thanks for it. >>>> >>>> Let me try building using SWIG as per instructions on this page. Thanks >>>> again for info. >>>> >>>> Regards, >>>> Ashish >>>> >>>> On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...> >>>> wrote: >>>> >>>>> Hello Ansish, >>>>> no, I can not commit to a date for the release. Other issues at >>>>> my job might take priority over the release. >>>>> >>>>> You can try the changes before the release by checking out the code >>>>> from GitHub and following the instructions at < >>>>> https://www.quantlib.org/install.shtml> to compile it. >>>>> >>>>> Hope this helps, >>>>> Luigi >>>>> >>>>> >>>>> On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal < >>>>> ash...@gm...> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> We want to test the TurnbullWakemanAsianEngine using Python. How can >>>>>> we test the new changes through Python SWIG? >>>>>> >>>>>> Could v1.27 be released a little early, say by 10th July, if possible? >>>>>> >>>>>> Regards >>>>>> Ashish Bansal >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>>>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Ben W. <ben...@ma...> - 2022-06-28 08:35:06
|
Hi Luigi – that works… thank you From: Luigi Ballabio <lui...@gm...> Sent: Tuesday, 28 June 2022 6:03 PM To: Ben Watson <ben...@ma...> Cc: QuantLib users <qua...@li...> Subject: Re: [Quantlib-users] Schedule from vector of dates in Python You should be able to use the constructor defined at <https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/scheduler.i#L65>. Please let me know if that doesn't work. Luigi On Tue, Jun 28, 2022 at 9:39 AM Ben Watson <ben...@ma... <mailto:ben...@ma...> > wrote: Hi, I suspect that the answer is no, but I am trying to build in QL Python a bond from a given schedule of dates (provided from another system). Is this possible?? I believe that it is possible in C++ and QuantlibXL. Regards Ben _______________________________________________ QuantLib-users mailing list Qua...@li... <mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Luigi B. <lui...@gm...> - 2022-06-28 08:02:54
|
You should be able to use the constructor defined at < https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/scheduler.i#L65 >. Please let me know if that doesn't work. Luigi On Tue, Jun 28, 2022 at 9:39 AM Ben Watson <ben...@ma...> wrote: > > > Hi, > > > > I suspect that the answer is no, but I am trying to build in QL Python a > bond from a given schedule of dates (provided from another system). Is > this possible?? > > > > I believe that it is possible in C++ and QuantlibXL. > > > > Regards > > > > Ben > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Ben W. <ben...@ma...> - 2022-06-28 07:37:14
|
Hi, I suspect that the answer is no, but I am trying to build in QL Python a bond from a given schedule of dates (provided from another system). Is this possible?? I believe that it is possible in C++ and QuantlibXL. Regards Ben |
|
From: Luigi B. <lui...@gm...> - 2022-06-28 07:27:23
|
In the FD case, the solver doesn't bump and reprice; at the end of the roll-back calculation, the result is a grid of values at different values of the underlying. When the delta and gamma call `valueAt` repeatedly, they're only interpolating at different points on that grid. Compared to the FD simulation the engine just did, it doesn't give a noticeable overhead. However, this is specific to a FD simulation, so it can't be applied to `TurnbullWakemanAsianEngine` which uses an analytic approximation. In principle, it might be possible to differentiate it, but it's probably easier to bump and reprice as Jonathan said. Luigi On Tue, Jun 28, 2022 at 12:50 AM Jonathan Sweemer <sw...@gm...> wrote: > Hi Ashish, > > The FdBlackScholesAsianEngine calculates greeks by bumping the spot and > repricing[1] so you should be able to do the same in your code. > > I’m actually not convinced it’s a good idea to always include the greeks > in the result. In the case of FdBlackScholesAsianEngine it means the solver > is called six times - once for the price, twice for the delta, and three > times for the gamma. Perhaps there should be a way to tell the engine only > to return the price to avoid the overhead of calculating the greeks for > people who don’t need them. > > [1] > https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/methods/finitedifferences/solvers/fdmsimple2dbssolver.cpp#L53 > > 2022년 6월 27일 (월) 21:54, Ashish Bansal <ash...@gm...>님이 작성: > >> Hi >> >> Including Partha from my team who is trying to install it and test 1.27. >> >> Luigi, >> >> I looked at the code and noticed that the >> *turnbullwakemanasianengine.cpp* doesn't include the Delta or Gamma in >> the results. Could including the solver for Delta and Gamma work, how it is >> included in fdblackscholesasianengine.cpp? >> results_.delta = solver->deltaAt(spot, avg, spot*0.01); >> results_.gamma = solver->gammaAt(spot, avg, spot*0.01); >> >> Regards, >> Ashish >> >> On Fri, 24 Jun 2022 at 11:38, Ashish Bansal <ash...@gm...> >> wrote: >> >>> I can understand. You are doing great work for the community by >>> maintaining this library. Thanks for it. >>> >>> Let me try building using SWIG as per instructions on this page. Thanks >>> again for info. >>> >>> Regards, >>> Ashish >>> >>> On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...> >>> wrote: >>> >>>> Hello Ansish, >>>> no, I can not commit to a date for the release. Other issues at my >>>> job might take priority over the release. >>>> >>>> You can try the changes before the release by checking out the code >>>> from GitHub and following the instructions at < >>>> https://www.quantlib.org/install.shtml> to compile it. >>>> >>>> Hope this helps, >>>> Luigi >>>> >>>> >>>> On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal <ash...@gm...> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> We want to test the TurnbullWakemanAsianEngine using Python. How can >>>>> we test the new changes through Python SWIG? >>>>> >>>>> Could v1.27 be released a little early, say by 10th July, if possible? >>>>> >>>>> Regards >>>>> Ashish Bansal >>>>> _______________________________________________ >>>>> QuantLib-users mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>> >>>> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Jonathan S. <sw...@gm...> - 2022-06-27 22:50:32
|
Hi Ashish, The FdBlackScholesAsianEngine calculates greeks by bumping the spot and repricing[1] so you should be able to do the same in your code. I’m actually not convinced it’s a good idea to always include the greeks in the result. In the case of FdBlackScholesAsianEngine it means the solver is called six times - once for the price, twice for the delta, and three times for the gamma. Perhaps there should be a way to tell the engine only to return the price to avoid the overhead of calculating the greeks for people who don’t need them. [1] https://github.com/lballabio/QuantLib/blob/cf8524b6d4004cb08fc5468524769e37984d8047/ql/methods/finitedifferences/solvers/fdmsimple2dbssolver.cpp#L53 2022년 6월 27일 (월) 21:54, Ashish Bansal <ash...@gm...>님이 작성: > Hi > > Including Partha from my team who is trying to install it and test 1.27. > > Luigi, > > I looked at the code and noticed that the *turnbullwakemanasianengine.cpp* > doesn't include the Delta or Gamma in the results. Could including the > solver for Delta and Gamma work, how it is included > in fdblackscholesasianengine.cpp? > results_.delta = solver->deltaAt(spot, avg, spot*0.01); > results_.gamma = solver->gammaAt(spot, avg, spot*0.01); > > Regards, > Ashish > > On Fri, 24 Jun 2022 at 11:38, Ashish Bansal <ash...@gm...> > wrote: > >> I can understand. You are doing great work for the community by >> maintaining this library. Thanks for it. >> >> Let me try building using SWIG as per instructions on this page. Thanks >> again for info. >> >> Regards, >> Ashish >> >> On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello Ansish, >>> no, I can not commit to a date for the release. Other issues at my >>> job might take priority over the release. >>> >>> You can try the changes before the release by checking out the code from >>> GitHub and following the instructions at < >>> https://www.quantlib.org/install.shtml> to compile it. >>> >>> Hope this helps, >>> Luigi >>> >>> >>> On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> Hi, >>>> >>>> We want to test the TurnbullWakemanAsianEngine using Python. How can we >>>> test the new changes through Python SWIG? >>>> >>>> Could v1.27 be released a little early, say by 10th July, if possible? >>>> >>>> Regards >>>> Ashish Bansal >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Ashish B. <ash...@gm...> - 2022-06-27 12:51:40
|
Hi
Including Partha from my team who is trying to install it and test 1.27.
Luigi,
I looked at the code and noticed that the *turnbullwakemanasianengine.cpp*
doesn't include the Delta or Gamma in the results. Could including the
solver for Delta and Gamma work, how it is included
in fdblackscholesasianengine.cpp?
results_.delta = solver->deltaAt(spot, avg, spot*0.01);
results_.gamma = solver->gammaAt(spot, avg, spot*0.01);
Regards,
Ashish
On Fri, 24 Jun 2022 at 11:38, Ashish Bansal <ash...@gm...> wrote:
> I can understand. You are doing great work for the community by
> maintaining this library. Thanks for it.
>
> Let me try building using SWIG as per instructions on this page. Thanks
> again for info.
>
> Regards,
> Ashish
>
> On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...>
> wrote:
>
>> Hello Ansish,
>> no, I can not commit to a date for the release. Other issues at my
>> job might take priority over the release.
>>
>> You can try the changes before the release by checking out the code from
>> GitHub and following the instructions at <
>> https://www.quantlib.org/install.shtml> to compile it.
>>
>> Hope this helps,
>> Luigi
>>
>>
>> On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal <ash...@gm...>
>> wrote:
>>
>>> Hi,
>>>
>>> We want to test the TurnbullWakemanAsianEngine using Python. How can we
>>> test the new changes through Python SWIG?
>>>
>>> Could v1.27 be released a little early, say by 10th July, if possible?
>>>
>>> Regards
>>> Ashish Bansal
>>> _______________________________________________
>>> QuantLib-users mailing list
>>> Qua...@li...
>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>
>>
|
|
From: Ashish B. <ash...@gm...> - 2022-06-24 06:08:00
|
I can understand. You are doing great work for the community by maintaining this library. Thanks for it. Let me try building using SWIG as per instructions on this page. Thanks again for info. Regards, Ashish On Thu, 23 Jun 2022 at 19:36, Luigi Ballabio <lui...@gm...> wrote: > Hello Ansish, > no, I can not commit to a date for the release. Other issues at my > job might take priority over the release. > > You can try the changes before the release by checking out the code from > GitHub and following the instructions at < > https://www.quantlib.org/install.shtml> to compile it. > > Hope this helps, > Luigi > > > On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal <ash...@gm...> > wrote: > >> Hi, >> >> We want to test the TurnbullWakemanAsianEngine using Python. How can we >> test the new changes through Python SWIG? >> >> Could v1.27 be released a little early, say by 10th July, if possible? >> >> Regards >> Ashish Bansal >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-06-23 15:45:47
|
Hi Ben, Not as far as I know, no I don't think so. regards, Mo On Thu, Jun 23, 2022 at 9:34 AM Ben Watson <ben...@ma...> wrote: > I have been looking at some applications where AAD might be applicable. I > found some stuff for C++ Quantlib it was implemented by operator overlading > (not sure about this last bit!). > > > > My question is… has any of the functionality of AAD been ported to > Quantlib Python? If so – is there an example could be followed?? > > > > Regards > > > > Ben > > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > -- Mohammad Shojatalab |
|
From: El Y. F. <fah...@gm...> - 2022-06-23 14:16:13
|
Hi, now i am using swaption volatilities to calibrate HW 1 factor short rate model. but i am getting these data from a service provider and swaptions and swaps are OTC so getting these type of data kinda hard. I want to know if there is a way to generate swaption volatilities (something like pricing swaps then swaption in quantlib and getting the volatilities) or that's kind ambitious ? Thank you. |
|
From: Luigi B. <lui...@gm...> - 2022-06-23 14:06:17
|
Hello Ansish,
no, I can not commit to a date for the release. Other issues at my job
might take priority over the release.
You can try the changes before the release by checking out the code from
GitHub and following the instructions at <
https://www.quantlib.org/install.shtml> to compile it.
Hope this helps,
Luigi
On Thu, Jun 23, 2022 at 11:17 AM Ashish Bansal <ash...@gm...>
wrote:
> Hi,
>
> We want to test the TurnbullWakemanAsianEngine using Python. How can we
> test the new changes through Python SWIG?
>
> Could v1.27 be released a little early, say by 10th July, if possible?
>
> Regards
> Ashish Bansal
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Andrea P. <and...@so...> - 2022-06-23 09:32:20
|
Hello group! We're looking for a shot-term consultancy on integrating Nelson-Siegel-Svensson fitting model (C++ QuantLib libraries) in a java pricing engine, already using C++ QuantLib libraries. Please contact me if some of you has the potential skill for this small project. Kind regards, Andrea ************************************************** Andrea Palermo Head of BA and...@so... Via S. Francesco d'Assisi, 3b, 24121 Bergamo (BG) Italia Tel: +39 035-22714-45 Fax: +39 035 1990 6390 http://www.softsolutions.it Follow us on LinkedIn and Twitter ************************************************** This document is strictly confidential and is intended for use by the addressee unless otherwise indicated. If you have received this e-mail in error we would be very grateful if you could please notify us immediately at mailto:in...@so... and delete this e-mail from your system. SoftSolutions! in its role as Controller of personal data processing, is compliant with the Regulation (EU) 2016/679. For more information please consult the privacy policy available at https://www.softsolutions.it/en/gdpr/ SoftSolutions! reserves the right to monitor all email communications through its internal and external networks. SoftSolutions! S.r.l. Please don't print this e-mail unless you really need to. |
|
From: Ashish B. <ash...@gm...> - 2022-06-23 09:14:48
|
Hi, We want to test the TurnbullWakemanAsianEngine using Python. How can we test the new changes through Python SWIG? Could v1.27 be released a little early, say by 10th July, if possible? Regards Ashish Bansal |
|
From: Ben W. <ben...@ma...> - 2022-06-23 08:31:07
|
I have been looking at some applications where AAD might be applicable. I found some stuff for C++ Quantlib it was implemented by operator overlading (not sure about this last bit!). My question is. has any of the functionality of AAD been ported to Quantlib Python? If so - is there an example could be followed?? Regards Ben |
|
From: Josh C. <jo...@rq...> - 2022-06-22 12:21:00
|
Hi El Yousfi, Just for #1. You can take look at below link. http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html On Wed, Jun 22, 2022, at 18:20, El Yousfi Fahd wrote: > Hello, > I am new to Quantlib, and I am trying to evaluate callable bonds and I am using the HW 1 factor model for short rates. > for now i calibrate the model using swaptions volatilities > and I have some questions: > 1 - can I calibrate the model using swaption prices? If yes can you show me an example or guide me? I'm using python > 2 - is the HW model good in this case or should i switch to another model? I tried the 2 factor model but for some reason it gives me an error when I use the Function callableBond.OAS() > any kind of help would be appreciated > thank you > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > Josh Chien Einstein's law of modeling says "Make it as simple as possible, but not simpler." |
|
From: El Y. F. <fah...@gm...> - 2022-06-22 10:20:57
|
Hello, I am new to Quantlib, and I am trying to evaluate callable bonds and I am using the HW 1 factor model for short rates. for now i calibrate the model using swaptions volatilities and I have some questions: 1 - can I calibrate the model using swaption prices? If yes can you show me an example or guide me? I'm using python 2 - is the HW model good in this case or should i switch to another model? I tried the 2 factor model but for some reason it gives me an error when I use the Function callableBond.OAS() any kind of help would be appreciated thank you |
|
From: Ashish B. <ash...@gm...> - 2022-06-21 06:31:03
|
I was thinking to handle the same way but wanted confirmation from some expert. Thanks a lot for help. I will open an issue in the github so that some code expert can fix it in future. Regards, Ashish On Tue, 21 Jun 2022 at 02:36, Jonathan Sweemer <sw...@gm...> wrote: > If the product knocks in or out during its lifetime then it is no longer > the same product - in the case of the knock-out it becomes nothing and in > the case of the knock-in it becomes a regular option and should be priced > as such. Your position management system should be able to handle these > lifecycle events so that you see the right positions in your book. > > Having said that, I still think it could make sense to improve the > validations on these barrier products to provide better error messages in > case of invalid inputs. > > > 2022년 6월 20일 (월) 22:50, Ashish Bansal <ash...@gm...>님이 작성: > >> I am not pricing with barrier breach on the inception day. >> >> Assuming the trade started out of barrier limit, i.e. higher than barrier >> for DI and DO type, I am pricing during the life of trade. During life the >> underlying could move knocking the barrier. The code starts showing error >> after the breach. >> >> I am looking to improve code so that during life of trade it shows right >> price output instead of error. >> >> Ashish >> >> On Mon, Jun 20, 2022, 4:16 PM Jonathan Sweemer <sw...@gm...> wrote: >> >>> I can reproduce the exception that you're seeing. As for the >>> explanation, I'm not an expert in this code, but here's my take on it: >>> >>> 1. for Down-Out, when I pass the spot less than the barrier, I get >>>> RunTimeerror for interpolation range. Should I block the pricing at all in >>>> this case? Can't the engine handle it? >>> >>> Generally you'd expect a down-and-out call to be quoted with spot above >>> the barrier, so starting with spot below the barrier is kind of a >>> degenerate case, as the product knocks out before it even starts, so I >>> believe the exception is warranted (though perhaps not as informative as it >>> could be). >>> >>> 2. For Down-in, I am getting the same error whereas the option gets >>>> activated and is still live then why is this not priced by the engine? Am >>>> I doing something wrong? >>> >>> Similar to question 1, you'd expect a down-and-in call to be quoted with >>> spot above the barrier, but in this case I agree that a case can be made >>> for the product to be live (i.e. knocked-in at inception), although it >>> would probably depend on the specific deal terms how to handle this case. >>> If you have any such deal terms to refer to, then you might want to submit >>> a pull request to handle them accordingly in the code. >>> >>> >>> >>> On Mon, Jun 20, 2022 at 5:11 PM Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> Following is the code that I am using to evaluate the barrier option. >>>> Here if I pass the spot which has crossed the barrier for knock-in or >>>> knock-out options, I get an error. The down-out is in the code and for >>>> down-in, I took the example given in row# 266 of with spot price as 94 from: >>>> >>>> https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp >>>> >>>> My python code: >>>> >>>> ############################################################################ >>>> import QuantLib as ql >>>> >>>> # Setting Barrier option parameters >>>> calculation_date = ql.Date(1, 6, 2021) >>>> maturity_date = ql.Date(25, 11, 2021) >>>> spot_price = 577.0 >>>> strike_price = 770.0 >>>> volatility = 43.56/100 >>>> option_type = ql.Option.Call >>>> risk_free_rate = 0.175/100 >>>> barrier_price = 400.0 >>>> barrier_type = ql.Barrier.DownOut >>>> rebate = 0 # no rebate >>>> day_count = ql.Actual365Fixed() >>>> calendar = ql.TARGET() >>>> >>>> >>>> marketpremium = 18.64 >>>> >>>> ql.Settings.instance().evaluationDate = calculation_date >>>> >>>> # Constructing the EU option in QL >>>> payoff = ql.PlainVanillaPayoff(option_type, strike_price) >>>> eu_exercise = ql.EuropeanExercise(maturity_date) >>>> barrier_eu_option = >>>> ql.BarrierOption(barrier_type,barrier_price,rebate,payoff, eu_exercise) >>>> >>>> # The Black-Scholes-Merton process is constructed >>>> spot_handle = ql.QuoteHandle( >>>> ql.SimpleQuote(spot_price) >>>> ) >>>> flat_rate_ts = ql.YieldTermStructureHandle( >>>> ql.FlatForward(calculation_date, >>>> risk_free_rate, >>>> day_count) >>>> ) >>>> flat_vol_ts = ql.BlackVolTermStructureHandle( >>>> ql.BlackConstantVol(calculation_date, >>>> calendar, >>>> volatility, >>>> day_count) >>>> ) >>>> bs_process = ql.BlackScholesProcess(spot_handle, >>>> flat_rate_ts, >>>> flat_vol_ts) >>>> >>>> # compute the theoretical price using the AnalyticEuropeanEngine >>>> >>>> barrier_eu_option.setPricingEngine(ql.FdBlackScholesBarrierEngine(bs_process)) >>>> br_eu_price = barrier_eu_option.NPV() >>>> print("The theoretical price for EU barrier is %lf" % br_eu_price) >>>> >>>> ############################################################################ >>>> >>>> Regards, >>>> Ashish >>>> >>>> On Fri, 17 Jun 2022 at 02:40, Jonathan Sweemer <sw...@gm...> >>>> wrote: >>>> >>>>> Hi Ashish, can you share your code or a link to it? >>>>> >>>>> 2022년 6월 17일 (금) 03:35, Ashish Bansal <ash...@gm...>님이 작성: >>>>> >>>>>> Hi, >>>>>> >>>>>> Any guidance on this error in barriers? >>>>>> >>>>>> Regards, >>>>>> Ashish >>>>>> >>>>>> On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> >>>>>> wrote: >>>>>> >>>>>>> Dear team, >>>>>>> >>>>>>> I need some guidance on the pricing of the barrier option using >>>>>>> the FdBlackScholesBarrierEngine in the event that the barrier is hit: >>>>>>> 1. for Down-Out, when I pass the spot less than the barrier, I get >>>>>>> RunTimeerror for interpolation range. Should I block the pricing at all in >>>>>>> this case? Can't the engine handle it? >>>>>>> 2. For Down-in, I am getting the same error whereas the option gets >>>>>>> activated and is still live then why is this not priced by the engine? Am >>>>>>> I doing something wrong? >>>>>>> >>>>>>> What is the difference between FdBlackScholesBarrierEngine >>>>>>> and AnalyticBarrierEngine? I compared a few results and found a slight >>>>>>> difference in values. Any suggestion on which one to use? >>>>>>> >>>>>>> Any help would be appreciated. >>>>>>> >>>>>>> Thanks >>>>>>> Ashish >>>>>>> >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>>>> |
|
From: Jonathan S. <sw...@gm...> - 2022-06-20 21:06:25
|
If the product knocks in or out during its lifetime then it is no longer the same product - in the case of the knock-out it becomes nothing and in the case of the knock-in it becomes a regular option and should be priced as such. Your position management system should be able to handle these lifecycle events so that you see the right positions in your book. Having said that, I still think it could make sense to improve the validations on these barrier products to provide better error messages in case of invalid inputs. 2022년 6월 20일 (월) 22:50, Ashish Bansal <ash...@gm...>님이 작성: > I am not pricing with barrier breach on the inception day. > > Assuming the trade started out of barrier limit, i.e. higher than barrier > for DI and DO type, I am pricing during the life of trade. During life the > underlying could move knocking the barrier. The code starts showing error > after the breach. > > I am looking to improve code so that during life of trade it shows right > price output instead of error. > > Ashish > > On Mon, Jun 20, 2022, 4:16 PM Jonathan Sweemer <sw...@gm...> wrote: > >> I can reproduce the exception that you're seeing. As for the explanation, >> I'm not an expert in this code, but here's my take on it: >> >> 1. for Down-Out, when I pass the spot less than the barrier, I get >>> RunTimeerror for interpolation range. Should I block the pricing at all in >>> this case? Can't the engine handle it? >> >> Generally you'd expect a down-and-out call to be quoted with spot above >> the barrier, so starting with spot below the barrier is kind of a >> degenerate case, as the product knocks out before it even starts, so I >> believe the exception is warranted (though perhaps not as informative as it >> could be). >> >> 2. For Down-in, I am getting the same error whereas the option gets >>> activated and is still live then why is this not priced by the engine? Am >>> I doing something wrong? >> >> Similar to question 1, you'd expect a down-and-in call to be quoted with >> spot above the barrier, but in this case I agree that a case can be made >> for the product to be live (i.e. knocked-in at inception), although it >> would probably depend on the specific deal terms how to handle this case. >> If you have any such deal terms to refer to, then you might want to submit >> a pull request to handle them accordingly in the code. >> >> >> >> On Mon, Jun 20, 2022 at 5:11 PM Ashish Bansal <ash...@gm...> >> wrote: >> >>> Following is the code that I am using to evaluate the barrier option. >>> Here if I pass the spot which has crossed the barrier for knock-in or >>> knock-out options, I get an error. The down-out is in the code and for >>> down-in, I took the example given in row# 266 of with spot price as 94 from: >>> >>> https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp >>> >>> My python code: >>> >>> ############################################################################ >>> import QuantLib as ql >>> >>> # Setting Barrier option parameters >>> calculation_date = ql.Date(1, 6, 2021) >>> maturity_date = ql.Date(25, 11, 2021) >>> spot_price = 577.0 >>> strike_price = 770.0 >>> volatility = 43.56/100 >>> option_type = ql.Option.Call >>> risk_free_rate = 0.175/100 >>> barrier_price = 400.0 >>> barrier_type = ql.Barrier.DownOut >>> rebate = 0 # no rebate >>> day_count = ql.Actual365Fixed() >>> calendar = ql.TARGET() >>> >>> >>> marketpremium = 18.64 >>> >>> ql.Settings.instance().evaluationDate = calculation_date >>> >>> # Constructing the EU option in QL >>> payoff = ql.PlainVanillaPayoff(option_type, strike_price) >>> eu_exercise = ql.EuropeanExercise(maturity_date) >>> barrier_eu_option = >>> ql.BarrierOption(barrier_type,barrier_price,rebate,payoff, eu_exercise) >>> >>> # The Black-Scholes-Merton process is constructed >>> spot_handle = ql.QuoteHandle( >>> ql.SimpleQuote(spot_price) >>> ) >>> flat_rate_ts = ql.YieldTermStructureHandle( >>> ql.FlatForward(calculation_date, >>> risk_free_rate, >>> day_count) >>> ) >>> flat_vol_ts = ql.BlackVolTermStructureHandle( >>> ql.BlackConstantVol(calculation_date, >>> calendar, >>> volatility, >>> day_count) >>> ) >>> bs_process = ql.BlackScholesProcess(spot_handle, >>> flat_rate_ts, >>> flat_vol_ts) >>> >>> # compute the theoretical price using the AnalyticEuropeanEngine >>> >>> barrier_eu_option.setPricingEngine(ql.FdBlackScholesBarrierEngine(bs_process)) >>> br_eu_price = barrier_eu_option.NPV() >>> print("The theoretical price for EU barrier is %lf" % br_eu_price) >>> >>> ############################################################################ >>> >>> Regards, >>> Ashish >>> >>> On Fri, 17 Jun 2022 at 02:40, Jonathan Sweemer <sw...@gm...> >>> wrote: >>> >>>> Hi Ashish, can you share your code or a link to it? >>>> >>>> 2022년 6월 17일 (금) 03:35, Ashish Bansal <ash...@gm...>님이 작성: >>>> >>>>> Hi, >>>>> >>>>> Any guidance on this error in barriers? >>>>> >>>>> Regards, >>>>> Ashish >>>>> >>>>> On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> >>>>> wrote: >>>>> >>>>>> Dear team, >>>>>> >>>>>> I need some guidance on the pricing of the barrier option using >>>>>> the FdBlackScholesBarrierEngine in the event that the barrier is hit: >>>>>> 1. for Down-Out, when I pass the spot less than the barrier, I get >>>>>> RunTimeerror for interpolation range. Should I block the pricing at all in >>>>>> this case? Can't the engine handle it? >>>>>> 2. For Down-in, I am getting the same error whereas the option gets >>>>>> activated and is still live then why is this not priced by the engine? Am >>>>>> I doing something wrong? >>>>>> >>>>>> What is the difference between FdBlackScholesBarrierEngine >>>>>> and AnalyticBarrierEngine? I compared a few results and found a slight >>>>>> difference in values. Any suggestion on which one to use? >>>>>> >>>>>> Any help would be appreciated. >>>>>> >>>>>> Thanks >>>>>> Ashish >>>>>> >>>>> _______________________________________________ >>>>> QuantLib-users mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>> >>>> |
|
From: Ashish B. <ash...@gm...> - 2022-06-20 13:50:58
|
I am not pricing with barrier breach on the inception day. Assuming the trade started out of barrier limit, i.e. higher than barrier for DI and DO type, I am pricing during the life of trade. During life the underlying could move knocking the barrier. The code starts showing error after the breach. I am looking to improve code so that during life of trade it shows right price output instead of error. Ashish On Mon, Jun 20, 2022, 4:16 PM Jonathan Sweemer <sw...@gm...> wrote: > I can reproduce the exception that you're seeing. As for the explanation, > I'm not an expert in this code, but here's my take on it: > > 1. for Down-Out, when I pass the spot less than the barrier, I get >> RunTimeerror for interpolation range. Should I block the pricing at all in >> this case? Can't the engine handle it? > > Generally you'd expect a down-and-out call to be quoted with spot above > the barrier, so starting with spot below the barrier is kind of a > degenerate case, as the product knocks out before it even starts, so I > believe the exception is warranted (though perhaps not as informative as it > could be). > > 2. For Down-in, I am getting the same error whereas the option gets >> activated and is still live then why is this not priced by the engine? Am >> I doing something wrong? > > Similar to question 1, you'd expect a down-and-in call to be quoted with > spot above the barrier, but in this case I agree that a case can be made > for the product to be live (i.e. knocked-in at inception), although it > would probably depend on the specific deal terms how to handle this case. > If you have any such deal terms to refer to, then you might want to submit > a pull request to handle them accordingly in the code. > > > > On Mon, Jun 20, 2022 at 5:11 PM Ashish Bansal <ash...@gm...> > wrote: > >> Following is the code that I am using to evaluate the barrier option. >> Here if I pass the spot which has crossed the barrier for knock-in or >> knock-out options, I get an error. The down-out is in the code and for >> down-in, I took the example given in row# 266 of with spot price as 94 from: >> >> https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp >> >> My python code: >> >> ############################################################################ >> import QuantLib as ql >> >> # Setting Barrier option parameters >> calculation_date = ql.Date(1, 6, 2021) >> maturity_date = ql.Date(25, 11, 2021) >> spot_price = 577.0 >> strike_price = 770.0 >> volatility = 43.56/100 >> option_type = ql.Option.Call >> risk_free_rate = 0.175/100 >> barrier_price = 400.0 >> barrier_type = ql.Barrier.DownOut >> rebate = 0 # no rebate >> day_count = ql.Actual365Fixed() >> calendar = ql.TARGET() >> >> >> marketpremium = 18.64 >> >> ql.Settings.instance().evaluationDate = calculation_date >> >> # Constructing the EU option in QL >> payoff = ql.PlainVanillaPayoff(option_type, strike_price) >> eu_exercise = ql.EuropeanExercise(maturity_date) >> barrier_eu_option = >> ql.BarrierOption(barrier_type,barrier_price,rebate,payoff, eu_exercise) >> >> # The Black-Scholes-Merton process is constructed >> spot_handle = ql.QuoteHandle( >> ql.SimpleQuote(spot_price) >> ) >> flat_rate_ts = ql.YieldTermStructureHandle( >> ql.FlatForward(calculation_date, >> risk_free_rate, >> day_count) >> ) >> flat_vol_ts = ql.BlackVolTermStructureHandle( >> ql.BlackConstantVol(calculation_date, >> calendar, >> volatility, >> day_count) >> ) >> bs_process = ql.BlackScholesProcess(spot_handle, >> flat_rate_ts, >> flat_vol_ts) >> >> # compute the theoretical price using the AnalyticEuropeanEngine >> >> barrier_eu_option.setPricingEngine(ql.FdBlackScholesBarrierEngine(bs_process)) >> br_eu_price = barrier_eu_option.NPV() >> print("The theoretical price for EU barrier is %lf" % br_eu_price) >> >> ############################################################################ >> >> Regards, >> Ashish >> >> On Fri, 17 Jun 2022 at 02:40, Jonathan Sweemer <sw...@gm...> wrote: >> >>> Hi Ashish, can you share your code or a link to it? >>> >>> 2022년 6월 17일 (금) 03:35, Ashish Bansal <ash...@gm...>님이 작성: >>> >>>> Hi, >>>> >>>> Any guidance on this error in barriers? >>>> >>>> Regards, >>>> Ashish >>>> >>>> On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> >>>> wrote: >>>> >>>>> Dear team, >>>>> >>>>> I need some guidance on the pricing of the barrier option using >>>>> the FdBlackScholesBarrierEngine in the event that the barrier is hit: >>>>> 1. for Down-Out, when I pass the spot less than the barrier, I get >>>>> RunTimeerror for interpolation range. Should I block the pricing at all in >>>>> this case? Can't the engine handle it? >>>>> 2. For Down-in, I am getting the same error whereas the option gets >>>>> activated and is still live then why is this not priced by the engine? Am >>>>> I doing something wrong? >>>>> >>>>> What is the difference between FdBlackScholesBarrierEngine >>>>> and AnalyticBarrierEngine? I compared a few results and found a slight >>>>> difference in values. Any suggestion on which one to use? >>>>> >>>>> Any help would be appreciated. >>>>> >>>>> Thanks >>>>> Ashish >>>>> >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> |
|
From: Jonathan S. <sw...@gm...> - 2022-06-20 10:46:52
|
I can reproduce the exception that you're seeing. As for the explanation, I'm not an expert in this code, but here's my take on it: 1. for Down-Out, when I pass the spot less than the barrier, I get > RunTimeerror for interpolation range. Should I block the pricing at all in > this case? Can't the engine handle it? Generally you'd expect a down-and-out call to be quoted with spot above the barrier, so starting with spot below the barrier is kind of a degenerate case, as the product knocks out before it even starts, so I believe the exception is warranted (though perhaps not as informative as it could be). 2. For Down-in, I am getting the same error whereas the option gets > activated and is still live then why is this not priced by the engine? Am > I doing something wrong? Similar to question 1, you'd expect a down-and-in call to be quoted with spot above the barrier, but in this case I agree that a case can be made for the product to be live (i.e. knocked-in at inception), although it would probably depend on the specific deal terms how to handle this case. If you have any such deal terms to refer to, then you might want to submit a pull request to handle them accordingly in the code. On Mon, Jun 20, 2022 at 5:11 PM Ashish Bansal <ash...@gm...> wrote: > Following is the code that I am using to evaluate the barrier option. Here > if I pass the spot which has crossed the barrier for knock-in or knock-out > options, I get an error. The down-out is in the code and for down-in, I > took the example given in row# 266 of with spot price as 94 from: > > https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp > > My python code: > > ############################################################################ > import QuantLib as ql > > # Setting Barrier option parameters > calculation_date = ql.Date(1, 6, 2021) > maturity_date = ql.Date(25, 11, 2021) > spot_price = 577.0 > strike_price = 770.0 > volatility = 43.56/100 > option_type = ql.Option.Call > risk_free_rate = 0.175/100 > barrier_price = 400.0 > barrier_type = ql.Barrier.DownOut > rebate = 0 # no rebate > day_count = ql.Actual365Fixed() > calendar = ql.TARGET() > > > marketpremium = 18.64 > > ql.Settings.instance().evaluationDate = calculation_date > > # Constructing the EU option in QL > payoff = ql.PlainVanillaPayoff(option_type, strike_price) > eu_exercise = ql.EuropeanExercise(maturity_date) > barrier_eu_option = > ql.BarrierOption(barrier_type,barrier_price,rebate,payoff, eu_exercise) > > # The Black-Scholes-Merton process is constructed > spot_handle = ql.QuoteHandle( > ql.SimpleQuote(spot_price) > ) > flat_rate_ts = ql.YieldTermStructureHandle( > ql.FlatForward(calculation_date, > risk_free_rate, > day_count) > ) > flat_vol_ts = ql.BlackVolTermStructureHandle( > ql.BlackConstantVol(calculation_date, > calendar, > volatility, > day_count) > ) > bs_process = ql.BlackScholesProcess(spot_handle, > flat_rate_ts, > flat_vol_ts) > > # compute the theoretical price using the AnalyticEuropeanEngine > > barrier_eu_option.setPricingEngine(ql.FdBlackScholesBarrierEngine(bs_process)) > br_eu_price = barrier_eu_option.NPV() > print("The theoretical price for EU barrier is %lf" % br_eu_price) > > ############################################################################ > > Regards, > Ashish > > On Fri, 17 Jun 2022 at 02:40, Jonathan Sweemer <sw...@gm...> wrote: > >> Hi Ashish, can you share your code or a link to it? >> >> 2022년 6월 17일 (금) 03:35, Ashish Bansal <ash...@gm...>님이 작성: >> >>> Hi, >>> >>> Any guidance on this error in barriers? >>> >>> Regards, >>> Ashish >>> >>> On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> Dear team, >>>> >>>> I need some guidance on the pricing of the barrier option using >>>> the FdBlackScholesBarrierEngine in the event that the barrier is hit: >>>> 1. for Down-Out, when I pass the spot less than the barrier, I get >>>> RunTimeerror for interpolation range. Should I block the pricing at all in >>>> this case? Can't the engine handle it? >>>> 2. For Down-in, I am getting the same error whereas the option gets >>>> activated and is still live then why is this not priced by the engine? Am >>>> I doing something wrong? >>>> >>>> What is the difference between FdBlackScholesBarrierEngine >>>> and AnalyticBarrierEngine? I compared a few results and found a slight >>>> difference in values. Any suggestion on which one to use? >>>> >>>> Any help would be appreciated. >>>> >>>> Thanks >>>> Ashish >>>> >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Ashish B. <ash...@gm...> - 2022-06-20 08:11:50
|
Following is the code that I am using to evaluate the barrier option. Here if I pass the spot which has crossed the barrier for knock-in or knock-out options, I get an error. The down-out is in the code and for down-in, I took the example given in row# 266 of with spot price as 94 from: https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp My python code: ############################################################################ import QuantLib as ql # Setting Barrier option parameters calculation_date = ql.Date(1, 6, 2021) maturity_date = ql.Date(25, 11, 2021) spot_price = 577.0 strike_price = 770.0 volatility = 43.56/100 option_type = ql.Option.Call risk_free_rate = 0.175/100 barrier_price = 400.0 barrier_type = ql.Barrier.DownOut rebate = 0 # no rebate day_count = ql.Actual365Fixed() calendar = ql.TARGET() marketpremium = 18.64 ql.Settings.instance().evaluationDate = calculation_date # Constructing the EU option in QL payoff = ql.PlainVanillaPayoff(option_type, strike_price) eu_exercise = ql.EuropeanExercise(maturity_date) barrier_eu_option = ql.BarrierOption(barrier_type,barrier_price,rebate,payoff, eu_exercise) # The Black-Scholes-Merton process is constructed spot_handle = ql.QuoteHandle( ql.SimpleQuote(spot_price) ) flat_rate_ts = ql.YieldTermStructureHandle( ql.FlatForward(calculation_date, risk_free_rate, day_count) ) flat_vol_ts = ql.BlackVolTermStructureHandle( ql.BlackConstantVol(calculation_date, calendar, volatility, day_count) ) bs_process = ql.BlackScholesProcess(spot_handle, flat_rate_ts, flat_vol_ts) # compute the theoretical price using the AnalyticEuropeanEngine barrier_eu_option.setPricingEngine(ql.FdBlackScholesBarrierEngine(bs_process)) br_eu_price = barrier_eu_option.NPV() print("The theoretical price for EU barrier is %lf" % br_eu_price) ############################################################################ Regards, Ashish On Fri, 17 Jun 2022 at 02:40, Jonathan Sweemer <sw...@gm...> wrote: > Hi Ashish, can you share your code or a link to it? > > 2022년 6월 17일 (금) 03:35, Ashish Bansal <ash...@gm...>님이 작성: > >> Hi, >> >> Any guidance on this error in barriers? >> >> Regards, >> Ashish >> >> On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> >> wrote: >> >>> Dear team, >>> >>> I need some guidance on the pricing of the barrier option using >>> the FdBlackScholesBarrierEngine in the event that the barrier is hit: >>> 1. for Down-Out, when I pass the spot less than the barrier, I get >>> RunTimeerror for interpolation range. Should I block the pricing at all in >>> this case? Can't the engine handle it? >>> 2. For Down-in, I am getting the same error whereas the option gets >>> activated and is still live then why is this not priced by the engine? Am >>> I doing something wrong? >>> >>> What is the difference between FdBlackScholesBarrierEngine >>> and AnalyticBarrierEngine? I compared a few results and found a slight >>> difference in values. Any suggestion on which one to use? >>> >>> Any help would be appreciated. >>> >>> Thanks >>> Ashish >>> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Jonathan S. <sw...@gm...> - 2022-06-16 21:10:05
|
Hi Ashish, can you share your code or a link to it? 2022년 6월 17일 (금) 03:35, Ashish Bansal <ash...@gm...>님이 작성: > Hi, > > Any guidance on this error in barriers? > > Regards, > Ashish > > On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> > wrote: > >> Dear team, >> >> I need some guidance on the pricing of the barrier option using >> the FdBlackScholesBarrierEngine in the event that the barrier is hit: >> 1. for Down-Out, when I pass the spot less than the barrier, I get >> RunTimeerror for interpolation range. Should I block the pricing at all in >> this case? Can't the engine handle it? >> 2. For Down-in, I am getting the same error whereas the option gets >> activated and is still live then why is this not priced by the engine? Am >> I doing something wrong? >> >> What is the difference between FdBlackScholesBarrierEngine >> and AnalyticBarrierEngine? I compared a few results and found a slight >> difference in values. Any suggestion on which one to use? >> >> Any help would be appreciated. >> >> Thanks >> Ashish >> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Ashish B. <ash...@gm...> - 2022-06-16 18:32:29
|
Hi, Any guidance on this error in barriers? Regards, Ashish On Tue, 14 Jun 2022 at 13:03, Ashish Bansal <ash...@gm...> wrote: > Dear team, > > I need some guidance on the pricing of the barrier option using > the FdBlackScholesBarrierEngine in the event that the barrier is hit: > 1. for Down-Out, when I pass the spot less than the barrier, I get > RunTimeerror for interpolation range. Should I block the pricing at all in > this case? Can't the engine handle it? > 2. For Down-in, I am getting the same error whereas the option gets > activated and is still live then why is this not priced by the engine? Am > I doing something wrong? > > What is the difference between FdBlackScholesBarrierEngine > and AnalyticBarrierEngine? I compared a few results and found a slight > difference in values. Any suggestion on which one to use? > > Any help would be appreciated. > > Thanks > Ashish > |
|
From: El Y. F. <fah...@gm...> - 2022-06-16 10:49:38
|
I have another question for you, I am using a platform to compare results and sometimes it gives negative effective convexity which I can't replicate in Quantlib for and European callable fixed rate bond and I don't know why even if the other output matchs like OAS, YTM and eff duration. Le jeu. 16 juin 2022 à 12:44, El Yousfi Fahd <fah...@gm...> a écrit : > Hi, > i am working on a library for pricing callable bonds, > and I have a few questions: > 1 - for fixed rate callable bonds, is there a way to know when it is > called and when? because I am trying to approximate American calls with > daily European calls? > 2 - doesn quantlib support floating rate callable bonds? > > Thank you > |