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
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <da...@el...> - 2021-11-03 11:46:13
|
By trial and error:
Passing the shift (0.02) as the final parameter to
ConstantSwaptionVolatility, then using ICAP's shifted black vol (0.272)
gives me a matching premium.
From: da...@el... <da...@el...>
Sent: Monday, 1 November 2021 20:28
To: 'QuantLib users' <qua...@li...>
Subject: [Quantlib-users] Pricing a Vanilla EUR swaption to match ICAP
premium
Hi, I am undertaking what on the face of it should be a simple Python task:
replicate the ICAP ATMF cash-settled spot swaption premiums, given their
volatility quotes. I get what seems to be a reasonable number, but that
could just be luck (!).
My base swaption is a EUR 1y10y ATMF receiver, as of today, 1st November.
The ATMF is 0.40%, and according to ICAP:
- 'EUR Cash IRR' vol is 187.3
- 'EUR Cash IRR Shifted Black Vol' is 27.2
- 'EUR Shifts' is 2.00
- 'EUR Cash IRR Cal' Normal vol is 65.1
- 'EUR Spot Cash IRR Premium' is 511.0 (for an atmf straddle)
If I use this code (I have created curves which generate an atmf agreeing
with 0.40%):
const_vol =
ql.ConstantSwaptionVolatility(2,calendar,ql.ModifiedFollowing,
ql.QuoteHandle(ql.SimpleQuote(1.873)),
ql.ActualActual(),ql.ShiftedLognormal)
const_vol_handle = ql.SwaptionVolatilityStructureHandle(const_vol)
blackEngine = ql.BlackSwaptionEngine(discount_curve,const_vol_handle)
swaption = ql.Swaption(parSwap, exercise, ql.Settlement.Cash,
ql.Settlement.ParYieldCurve)
swaption.setPricingEngine(blackEngine)
print('Swaption px {0:.1f} cents'.format(100*swaption.NPV()))
with result:
Swaption px 257.4 cents
and price the swaption, I get a premium which is pretty close to ICAP (once
doubled to 514.8), but not quite the same.
However, I am not sure how (if?) to incorporate the shift of 2 (% I assume),
which is an optional parameter to ql.ConstantSwaptionVolatility() to handle
negative strikes. If I pass 0.02 as this parameter, then I get a
non-sensical premium: should I be bumping my entire swap curve by 2% before
pricing?
Or perhaps I should just be taking the market premia and backing out the
vol?
Grateful for any guidance on this.
Best wishes,
David Sansom
|
|
From: Luigi B. <lui...@gm...> - 2021-11-02 13:49:12
|
Thanks, Jonathan. There was some discussion of providing a FindQuantLib, but nobody opened an issue yet—feel free to do so. Luigi On Tue, Nov 2, 2021 at 2:22 PM Jonathan Sweemer <sw...@gm...> wrote: > Sure, I've pushed up an example[1] for how to include QuantLib into a > project using vcpkg on both Linux and Windows, including the part about the > custom triplet on Linux. If you know of a better place to put the example > then I will be happy to move it there instead. > > Apart from that, Microsoft's documentation[2] is not that bad, albeit a > bit fragmented over several different sites in my experience. > > One thing that would make the integration with vcpkg even better is if > QuantLib supported the find_package command[3]. Has there been any > discussion of this in the past? If not, then that might be a good idea for > someone to help contribute in the near future. > > [1] https://github.com/sweemer/quantlib-vcpkg-example > [2] https://vcpkg.io/en/docs/examples/installing-and-using-packages.html > [3] https://cmake.org/cmake/help/git-master/command/find_package.html > > On Tue, Nov 2, 2021 at 1:04 AM Luigi Ballabio <lui...@gm...> > wrote: > >> Thanks, Jonathan! Do you have a primer on how to use this for someone >> who never used vcpkg? >> >> Luigi >> >> On Sun, Oct 31, 2021 at 8:05 AM Jonathan Sweemer <sw...@gm...> >> wrote: >> >>> Hello QuantLib users, >>> >>> In case there are any other vcpkg users out there, heads up that I have >>> submitted a pull request[1] to update QuantLib from v1.22 to v1.24. >>> >>> I have also enabled the option to build QuantLib as a shared library on >>> Linux through vcpkg, which has been disabled until now for some reason. In >>> case the lack of shared library support on Linux has prevented anyone from >>> using vcpkg, you might want to try again once this change is merged. (Note >>> that in order to build as a shared library on Linux with vcpkg you need to >>> define a new triplet by following the instructions in [2]). >>> >>> On Windows, still only static linkage is supported, both in vcpkg and in >>> QuantLib's CMake build settings. >>> >>> [1] https://github.com/microsoft/vcpkg/pull/21068 >>> [2] >>> https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/ >>> >>> Jonathan Sweemer >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Jonathan S. <sw...@gm...> - 2021-11-02 13:22:22
|
Sure, I've pushed up an example[1] for how to include QuantLib into a project using vcpkg on both Linux and Windows, including the part about the custom triplet on Linux. If you know of a better place to put the example then I will be happy to move it there instead. Apart from that, Microsoft's documentation[2] is not that bad, albeit a bit fragmented over several different sites in my experience. One thing that would make the integration with vcpkg even better is if QuantLib supported the find_package command[3]. Has there been any discussion of this in the past? If not, then that might be a good idea for someone to help contribute in the near future. [1] https://github.com/sweemer/quantlib-vcpkg-example [2] https://vcpkg.io/en/docs/examples/installing-and-using-packages.html [3] https://cmake.org/cmake/help/git-master/command/find_package.html On Tue, Nov 2, 2021 at 1:04 AM Luigi Ballabio <lui...@gm...> wrote: > Thanks, Jonathan! Do you have a primer on how to use this for someone who > never used vcpkg? > > Luigi > > On Sun, Oct 31, 2021 at 8:05 AM Jonathan Sweemer <sw...@gm...> > wrote: > >> Hello QuantLib users, >> >> In case there are any other vcpkg users out there, heads up that I have >> submitted a pull request[1] to update QuantLib from v1.22 to v1.24. >> >> I have also enabled the option to build QuantLib as a shared library on >> Linux through vcpkg, which has been disabled until now for some reason. In >> case the lack of shared library support on Linux has prevented anyone from >> using vcpkg, you might want to try again once this change is merged. (Note >> that in order to build as a shared library on Linux with vcpkg you need to >> define a new triplet by following the instructions in [2]). >> >> On Windows, still only static linkage is supported, both in vcpkg and in >> QuantLib's CMake build settings. >> >> [1] https://github.com/microsoft/vcpkg/pull/21068 >> [2] >> https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/ >> >> Jonathan Sweemer >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: <da...@el...> - 2021-11-01 20:28:46
|
Hi, I am undertaking what on the face of it should be a simple Python task:
replicate the ICAP ATMF cash-settled spot swaption premiums, given their
volatility quotes. I get what seems to be a reasonable number, but that
could just be luck (!).
My base swaption is a EUR 1y10y ATMF receiver, as of today, 1st November.
The ATMF is 0.40%, and according to ICAP:
- 'EUR Cash IRR' vol is 187.3
- 'EUR Cash IRR Shifted Black Vol' is 27.2
- 'EUR Shifts' is 2.00
- 'EUR Cash IRR Cal' Normal vol is 65.1
- 'EUR Spot Cash IRR Premium' is 511.0 (for an atmf straddle)
If I use this code (I have created curves which generate an atmf agreeing
with 0.40%):
const_vol =
ql.ConstantSwaptionVolatility(2,calendar,ql.ModifiedFollowing,
ql.QuoteHandle(ql.SimpleQuote(1.873)),
ql.ActualActual(),ql.ShiftedLognormal)
const_vol_handle = ql.SwaptionVolatilityStructureHandle(const_vol)
blackEngine = ql.BlackSwaptionEngine(discount_curve,const_vol_handle)
swaption = ql.Swaption(parSwap, exercise, ql.Settlement.Cash,
ql.Settlement.ParYieldCurve)
swaption.setPricingEngine(blackEngine)
print('Swaption px {0:.1f} cents'.format(100*swaption.NPV()))
with result:
Swaption px 257.4 cents
and price the swaption, I get a premium which is pretty close to ICAP (once
doubled to 514.8), but not quite the same.
However, I am not sure how (if?) to incorporate the shift of 2 (% I assume),
which is an optional parameter to ql.ConstantSwaptionVolatility() to handle
negative strikes. If I pass 0.02 as this parameter, then I get a
non-sensical premium: should I be bumping my entire swap curve by 2% before
pricing?
Or perhaps I should just be taking the market premia and backing out the
vol?
Grateful for any guidance on this.
Best wishes,
David Sansom
|
|
From: Luigi B. <lui...@gm...> - 2021-11-01 17:08:12
|
Thanks, Jonathan! Do you have a primer on how to use this for someone who never used vcpkg? Luigi On Sun, Oct 31, 2021 at 8:05 AM Jonathan Sweemer <sw...@gm...> wrote: > Hello QuantLib users, > > In case there are any other vcpkg users out there, heads up that I have > submitted a pull request[1] to update QuantLib from v1.22 to v1.24. > > I have also enabled the option to build QuantLib as a shared library on > Linux through vcpkg, which has been disabled until now for some reason. In > case the lack of shared library support on Linux has prevented anyone from > using vcpkg, you might want to try again once this change is merged. (Note > that in order to build as a shared library on Linux with vcpkg you need to > define a new triplet by following the instructions in [2]). > > On Windows, still only static linkage is supported, both in vcpkg and in > QuantLib's CMake build settings. > > [1] https://github.com/microsoft/vcpkg/pull/21068 > [2] > https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/ > > Jonathan Sweemer > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Jonathan S. <sw...@gm...> - 2021-10-31 07:03:02
|
Hello QuantLib users, In case there are any other vcpkg users out there, heads up that I have submitted a pull request[1] to update QuantLib from v1.22 to v1.24. I have also enabled the option to build QuantLib as a shared library on Linux through vcpkg, which has been disabled until now for some reason. In case the lack of shared library support on Linux has prevented anyone from using vcpkg, you might want to try again once this change is merged. (Note that in order to build as a shared library on Linux with vcpkg you need to define a new triplet by following the instructions in [2]). On Windows, still only static linkage is supported, both in vcpkg and in QuantLib's CMake build settings. [1] https://github.com/microsoft/vcpkg/pull/21068 [2] https://vcpkg.readthedocs.io/en/latest/examples/overlay-triplets-linux-dynamic/ Jonathan Sweemer |
|
From: Sumit S. <su...@mo...> - 2021-10-24 18:36:10
|
Hi, 2 questions that I have whilst following the example in python cookbook: 1. I am trying to calibrate the HW 1f model to to normal vols , using the code in *create_swaption_helpers_normal*(). However, I don;t see any options on the CalibrationHelper called RelativePriceError. I see that its only avai;able for BlackCalibrationHelper (my QL version is 1.18) 2. Using the example in the cookbook (*and using normal vol *& BlackCalibrationHelper), I see the HW 1f vol is an average of the market implied vol term structure. What's a recommended approach/model to match the vol term structure observed from ATM swaption vols? Regards Sumit -- Mosaic Smart Data mobile +44 (0)7961839363 su...@mo... 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom www.mosaicsmartdata.com |
|
From: Jonathan S. <sw...@gm...> - 2021-10-20 22:21:55
|
Hi Peter, In your project’s CMakeLists.txt file you can use target_include_directories[1] to tell cmake where to find the headers, and target_link_directories[2] to tell cmake where to find the libraries for linking. Having said that, you should probably think about using a package manager such as vcpkg to handle this kind of setup for you automatically. Lastly, you mentioned that you created a .lib file but you seem to be using make on Linux, which means you need to link against libQuantLib.a instead. [1] https://cmake.org/cmake/help/latest/command/target_include_directories.html [2] https://cmake.org/cmake/help/latest/command/target_link_directories.html 2021년 10월 21일 (목) 05:48, Peter Ye <pet...@gm...>님이 작성: > Hi Quantlib Team, > > I am new to using CMakeLists and have been running into issues with > linking the Quantlib library for a build. I have been successful with > generating a .lib file as instructed on the Quantlib website, but I am > completely lost in linking the Quantlib library to CMakeLists. According to > my terminal, it states that I built the header, object, and cpp files; > however, I cannot include the ql directory within my source code. Here is > the error message: > > fatal error: ql/math/matrix.h: No such file or directory > #include <ql/math/matrix.h> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > compilation terminated. > CMakeFiles/Analytical_Metrics.dir/build.make:75: recipe for target > 'CMakeFiles/Analytical_Metrics.dir/src/main.cpp.o' failed > make[2]: *** [CMakeFiles/Analytical_Metrics.dir/src/main.cpp.o] Error 1 > CMakeFiles/Makefile2:567: recipe for target > 'CMakeFiles/Analytical_Metrics.dir/all' failed > make[1]: *** [CMakeFiles/Analytical_Metrics.dir/all] Error 2 > Makefile:165: recipe for target 'all' failed > make: *** [all] Error 2 > > I am not sure if this was already answered, but I would truly appreciate > it if you can provide me with guidance or an example on how to go about > using Quantlib with CMakeLists. I have been stuck on this for weeks. > > Best Regards, > > Peter Ye > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Peter Ye <pet...@gm...> - 2021-10-20 20:46:09
|
Hi Quantlib Team,
I am new to using CMakeLists and have been running into issues with linking
the Quantlib library for a build. I have been successful with generating a
.lib file as instructed on the Quantlib website, but I am completely lost
in linking the Quantlib library to CMakeLists. According to my terminal, it
states that I built the header, object, and cpp files; however, I cannot
include the ql directory within my source code. Here is the error message:
fatal error: ql/math/matrix.h: No such file or directory
#include <ql/math/matrix.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/Analytical_Metrics.dir/build.make:75: recipe for target
'CMakeFiles/Analytical_Metrics.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/Analytical_Metrics.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:567: recipe for target
'CMakeFiles/Analytical_Metrics.dir/all' failed
make[1]: *** [CMakeFiles/Analytical_Metrics.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
I am not sure if this was already answered, but I would truly appreciate it
if you can provide me with guidance or an example on how to go about using
Quantlib with CMakeLists. I have been stuck on this for weeks.
Best Regards,
Peter Ye
|
|
From: Ashish B. <ash...@gm...> - 2021-10-20 20:45:13
|
Hi there, We need to price the Asian and Barrier OTC commodity options using the implied vols of european or american option. Will be using the Cubic spline (and bi-cubic) method for the interpolating the vols between strikes and prompt date. Do we have the same available in Quantlib? Secondly, to reduce the volatility for Asian and Barrier, somebody suggested to use moment matching. Is the vol adjusted in the ql.FdBlackScholesAsianEngine and ql.FdBlackScholesBarrierEngine engines? Or need to adjust before passing it to these? If so, does quantlib has moment matching classes? Question raised here too: https://quant.stackexchange.com/questions/68374/pricing-asian-and-barrier-option-using-quantlib Thanks in advance Ashish Bansal |
|
From: Luigi B. <lui...@gm...> - 2021-10-20 13:30:14
|
We're not going to remove 1.17 from pypi, so yes, you can continue using it, but it's a photograph of when it was released. It won't be updated with bug fixes or new features — those are going in new versions. Luigi On Wed, Oct 20, 2021 at 8:21 AM Ashish Bansal <ash...@gm...> wrote: > My mistake. We are using v1.17 only. We have not upgraded. Till when this > version will be supported? Is there a date for sunsetting old versions? > Or, Can we keep using v1.17 indefinitely? FYI, we are using the > python-based quantlib. > > Regards, > Ashish > > On Wed, 20 Oct 2021 at 02:41, Luigi Ballabio <lui...@gm...> > wrote: > >> Hello Ashish, >> I'm puzzled. Here's what happens on my machine when I create a clean >> environment with QuantLib 1.22 and try to access FDAmericanEngine: >> >> [/tmp] $ python -m venv test-venv >> [/tmp] $ . test-venv/bin/activate >> (test-venv) [/tmp] $ pip install QuantLib==1.22 >> Collecting QuantLib==1.22 >> Using cached QuantLib-1.22-cp37-cp37m-macosx_10_9_x86_64.whl (14.5 MB) >> Installing collected packages: QuantLib >> Successfully installed QuantLib-1.22 >> WARNING: You are using pip version 20.1.1; however, version 21.3 is >> available. >> You should consider upgrading via the '/private/tmp/test-venv/bin/python >> -m pip install --upgrade pip' command. >> (test-venv) [/tmp] $ python >> Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08) >> [Clang 6.0 (clang-600.0.57)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import QuantLib as ql >> >>> ql.FDAmericanEngine >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> AttributeError: module 'QuantLib' has no attribute 'FDAmericanEngine' >> >>> >> >> Are you sure you're using version 1.22 and not an older one? You can >> check with print(ql.__version__) >> >> Luigi >> >> >> >> On Tue, Oct 19, 2021 at 10:34 PM Ashish Bansal <ash...@gm...> >> wrote: >> >>> Thanks Luigi for the answer. >>> >>> If it was removed in 1.22, then how come it still works and provide us >>> an output? Would the output be wrong? >>> >>> If we migrate from FDAm..engine to FDBla..engine, would the output >>> remain same since both use same inputs? Sorry for my ignorance about it. Am >>> new to QL. >>> >>> Regards >>> Ashish >>> >>> >>> On Tue, Oct 19, 2021, 4:46 PM Luigi Ballabio <lui...@gm...> >>> wrote: >>> >>>> Hello, >>>> deprecated functions stay in the library for four or five more >>>> releases and then they are removed. The FDAmericanEngine class was >>>> deprecated in version 1.17 and finally removed in version 1.22, so yes, if >>>> you upgrade you'll need to use FdBlackScholesVanillaEngine instead. >>>> >>>> Luigi >>>> >>>> >>>> On Tue, Oct 19, 2021 at 12:36 PM Ashish Bansal <ash...@gm...> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> We are using the quantlib for valuating the european and >>>>> american options using functions which were deprecated in v1.22 in >>>>> April-2021 e.g. FDAmericanEngine. We are calling through python code. >>>>> >>>>> Want to know if these will keep working as they were or should they be >>>>> replaced with new function FdBlackScholesVanillaEngine soon? Is there any >>>>> date till these will work? Does deprecated mean no new development or >>>>> existing stops working properly too? >>>>> >>>>> Thanks >>>>> Ashish Bansal >>>>> _______________________________________________ >>>>> QuantLib-users mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>> >>>> |
|
From: Luigi B. <lui...@gm...> - 2021-10-20 11:15:05
|
Hi James, see the two answers to your question at < https://quant.stackexchange.com/questions/68433/quantlib-usdlibor-method>. Luigi On Tue, Oct 19, 2021 at 11:11 PM James Donaldson via QuantLib-users < qua...@li...> wrote: > Hello, > > > > It seems ql.VanillaSwap() only calculates the Pv01 values (fixed leg BPS > is valuation difference for shifting my fixed coupon 1bp). What is the > recommended approach for calculating Dv01 using Quantlib? > > > > I am currently using ql.ZeroSpreadedTermStructure() to shift my base > curves (projection = US3mL, discount = SOFR), however when attempting to > assign the shifted projection curve within ql.USDLibor(), which is required > as part of ql.VanillaSwap(), I’m receiving an error that I have passed to > many arguments. > > > > Thanks, > > > > James > > > > *James Donaldson, CFA* > > > > *Fixed Income* > > T 617.790.5019 > > E jam...@gm... > > > > GMO LLC > > 40 Rowes Wharf > > Boston, MA 02110 > > > > *GMO.com <http://www.gmo.com/>* > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Simone C. <Sim...@ri...> - 2021-10-20 07:21:07
|
Hi Luigi,
Thanks for your explanations – it all makes sense and indeed I was expecting an iterative loop for splines.
I’ll try to see if it is possible to keep the deposit in the calibration and then make some manual adjustments to the DF to “mimic” its exclusion.
Thanks again!
Best regards,
Simone
From: Luigi Ballabio <lui...@gm...>
Sent: 18 October 2021 12:22
To: Simone Caenazzo <Sim...@ri...>
Cc: qua...@li...; PONRAM GOPALAKRISHNAN <po...@gm...>; Giuseppe Trapani <tr...@gm...>
Subject: Re: [Quantlib-users] Help with "root not bracketed" error when bootstrapping curve without deposit/fixing rate
Simone,
it looks like the problem happens when you're using splines, and that's probably because in that case we need a double bootstrap loop.
In short: splines are different from all other interpolations. Let's say you're during the bootstrap, and you just determined node N so that it reprices the Nth instrument exactly. When the bootstrap starts moving node N+1, all the spline moves, and not just the part between node N and N+1 (as in all other cases). This means that after node N+1 is determined, instrument N+1 is repriced exactly, but instrument N might not be any longer.
The way the code tries to account for this is to have a double loop: after we are gone through all the nodes, we restart from node 1 and readjust it so the first instrument is repriced, then node 2, and so on. This usually works and converges to a curve that reprices all instruments exactly, but unfortunately is not guaranteed to do so. I suspect that the error happens during one of the later loops, when the full curve is built and the code is trying to readjust the first node around it.
I'm afraid I don't have a solution for that, except avoiding splines. To avoid jagged forwards, you might try bootstrapping on forwards themselves and use, for instance, linear interpolation. Of course, I don't know if that's satisfactory for your project.
Hope this helps,
Luigi
On Tue, Oct 12, 2021 at 11:58 AM Simone Caenazzo <Sim...@ri...<mailto:Sim...@ri...>> wrote:
Good morning,
As an update on my side on this issue, it looks like the calibration works on some days without the deposits; but in general removing the deposit is not a reliable option.
I’d be really grateful if anybody had any updates or further thoughts on this issue!
Thanks in advance,
Simone
From: Simone Caenazzo
Sent: 27 September 2021 15:53
To: Luigi Ballabio <lui...@gm...<mailto:lui...@gm...>>
Cc: PONRAM GOPALAKRISHNAN <po...@gm...<mailto:po...@gm...>>; qua...@li...<mailto:qua...@li...>
Subject: RE: [Quantlib-users] Help with "root not bracketed" error when bootstrapping curve without deposit/fixing rate
Hi Luigi,
I have sent a code example replying to Giuseppe Trapani in the same thread (the server notified me that the email is being held for review temporarily) – the PiecewiseYieldCurve constructor being used is the following – in fact, I believe this may have been deprecated in later versions of QuantLib:
[cid:image001.png@01D7C58B.60F6C4F0]
I have also tried different interpolation methods and targets. Effectively, without the deposit rate the only method that seems to work is Linear (at the cost of having a very jagged output forward curve, of course).
Here is a list of all the method combinations that failed:
DF, LogCubic
DF, MonotonicLogCubicSpline
DF, FritschButlandCubic
DF, LogParabolic
DF, MonotonicLogParabolic
DF, AkimaCubic
ZeroYield, MonotonicLogCubic
ForwardRate, MonotonicLogCubic
Thanks and best regards,
Simone
From: Luigi Ballabio <lui...@gm...<mailto:lui...@gm...>>
Sent: 21 September 2021 13:37
To: Simone Caenazzo <Sim...@ri...<mailto:Sim...@ri...>>
Cc: PONRAM GOPALAKRISHNAN <po...@gm...<mailto:po...@gm...>>; qua...@li...<mailto:qua...@li...>
Subject: Re: [Quantlib-users] Help with "root not bracketed" error when bootstrapping curve without deposit/fixing rate
Hi,
what instantiation of PiecewiseYieldCurve are you using? Does it work if you change from Discount to ZeroRate or viceversa? Or if you change interpolation?
Luigi
On Tue, Sep 21, 2021 at 2:25 PM Simone Caenazzo <Sim...@ri...<mailto:Sim...@ri...>> wrote:
Hi Ponram,
Thanks - indeed, quote units is one of those things that immediately comes to mind.
However I don't think this is the problem here - if the futures or swap RateHelpers were wrongly setup, the code would not work with the deposit rate either.
Additionally, I have played around with data from different valuation dates - very weirdly, there are dates in which the calibration seems to work without the deposit rate too.
Could there be combinations of quotes that, albeit valid, would cause issues within the solver, or the interpolator, of the bootstrapper?
Thanks and best regards,
Simone
-----Original Message-----
From: PONRAM GOPALAKRISHNAN <po...@gm...<mailto:po...@gm...>>
Sent: 21 September 2021 13:14
To: Simone Caenazzo <Sim...@ri...<mailto:Sim...@ri...>>
Cc: Giuseppe Trapani <tr...@gm...<mailto:tr...@gm...>>; qua...@li...<mailto:qua...@li...>
Subject: Re: [Quantlib-users] Help with "root not bracketed" error when bootstrapping curve without deposit/fixing rate
Hi,
I recently encountered this issue when bootstrapping with bond price quotes. I initially had my prices assuming $1 as the face value. I had no issues after changing it to $100 face value. You can try adjusting your price quotes and see if it helps.
- Ponram
> On Sep 21, 2021, at 4:08 AM, Simone Caenazzo <Sim...@ri...<mailto:Sim...@ri...>> wrote:
>
_______________________________________________
QuantLib-users mailing list
Qua...@li...<mailto:Qua...@li...>
https://lists.sourceforge.net/lists/listinfo/quantlib-users<https://lists.sourceforge.net/lists/listinfo/quantlib-users>
|
|
From: Ashish B. <ash...@gm...> - 2021-10-20 06:21:26
|
My mistake. We are using v1.17 only. We have not upgraded. Till when this version will be supported? Is there a date for sunsetting old versions? Or, Can we keep using v1.17 indefinitely? FYI, we are using the python-based quantlib. Regards, Ashish On Wed, 20 Oct 2021 at 02:41, Luigi Ballabio <lui...@gm...> wrote: > Hello Ashish, > I'm puzzled. Here's what happens on my machine when I create a clean > environment with QuantLib 1.22 and try to access FDAmericanEngine: > > [/tmp] $ python -m venv test-venv > [/tmp] $ . test-venv/bin/activate > (test-venv) [/tmp] $ pip install QuantLib==1.22 > Collecting QuantLib==1.22 > Using cached QuantLib-1.22-cp37-cp37m-macosx_10_9_x86_64.whl (14.5 MB) > Installing collected packages: QuantLib > Successfully installed QuantLib-1.22 > WARNING: You are using pip version 20.1.1; however, version 21.3 is > available. > You should consider upgrading via the '/private/tmp/test-venv/bin/python > -m pip install --upgrade pip' command. > (test-venv) [/tmp] $ python > Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08) > [Clang 6.0 (clang-600.0.57)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import QuantLib as ql > >>> ql.FDAmericanEngine > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: module 'QuantLib' has no attribute 'FDAmericanEngine' > >>> > > Are you sure you're using version 1.22 and not an older one? You can > check with print(ql.__version__) > > Luigi > > > > On Tue, Oct 19, 2021 at 10:34 PM Ashish Bansal <ash...@gm...> > wrote: > >> Thanks Luigi for the answer. >> >> If it was removed in 1.22, then how come it still works and provide us an >> output? Would the output be wrong? >> >> If we migrate from FDAm..engine to FDBla..engine, would the output remain >> same since both use same inputs? Sorry for my ignorance about it. Am new to >> QL. >> >> Regards >> Ashish >> >> >> On Tue, Oct 19, 2021, 4:46 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello, >>> deprecated functions stay in the library for four or five more >>> releases and then they are removed. The FDAmericanEngine class was >>> deprecated in version 1.17 and finally removed in version 1.22, so yes, if >>> you upgrade you'll need to use FdBlackScholesVanillaEngine instead. >>> >>> Luigi >>> >>> >>> On Tue, Oct 19, 2021 at 12:36 PM Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> Hi, >>>> >>>> We are using the quantlib for valuating the european and >>>> american options using functions which were deprecated in v1.22 in >>>> April-2021 e.g. FDAmericanEngine. We are calling through python code. >>>> >>>> Want to know if these will keep working as they were or should they be >>>> replaced with new function FdBlackScholesVanillaEngine soon? Is there any >>>> date till these will work? Does deprecated mean no new development or >>>> existing stops working properly too? >>>> >>>> Thanks >>>> Ashish Bansal >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> |
|
From: Luigi B. <lui...@gm...> - 2021-10-19 21:11:48
|
Hello Ashish,
I'm puzzled. Here's what happens on my machine when I create a clean
environment with QuantLib 1.22 and try to access FDAmericanEngine:
[/tmp] $ python -m venv test-venv
[/tmp] $ . test-venv/bin/activate
(test-venv) [/tmp] $ pip install QuantLib==1.22
Collecting QuantLib==1.22
Using cached QuantLib-1.22-cp37-cp37m-macosx_10_9_x86_64.whl (14.5 MB)
Installing collected packages: QuantLib
Successfully installed QuantLib-1.22
WARNING: You are using pip version 20.1.1; however, version 21.3 is
available.
You should consider upgrading via the '/private/tmp/test-venv/bin/python -m
pip install --upgrade pip' command.
(test-venv) [/tmp] $ python
Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import QuantLib as ql
>>> ql.FDAmericanEngine
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'QuantLib' has no attribute 'FDAmericanEngine'
>>>
Are you sure you're using version 1.22 and not an older one? You can check
with print(ql.__version__)
Luigi
On Tue, Oct 19, 2021 at 10:34 PM Ashish Bansal <ash...@gm...>
wrote:
> Thanks Luigi for the answer.
>
> If it was removed in 1.22, then how come it still works and provide us an
> output? Would the output be wrong?
>
> If we migrate from FDAm..engine to FDBla..engine, would the output remain
> same since both use same inputs? Sorry for my ignorance about it. Am new to
> QL.
>
> Regards
> Ashish
>
>
> On Tue, Oct 19, 2021, 4:46 PM Luigi Ballabio <lui...@gm...>
> wrote:
>
>> Hello,
>> deprecated functions stay in the library for four or five more
>> releases and then they are removed. The FDAmericanEngine class was
>> deprecated in version 1.17 and finally removed in version 1.22, so yes, if
>> you upgrade you'll need to use FdBlackScholesVanillaEngine instead.
>>
>> Luigi
>>
>>
>> On Tue, Oct 19, 2021 at 12:36 PM Ashish Bansal <ash...@gm...>
>> wrote:
>>
>>> Hi,
>>>
>>> We are using the quantlib for valuating the european and
>>> american options using functions which were deprecated in v1.22 in
>>> April-2021 e.g. FDAmericanEngine. We are calling through python code.
>>>
>>> Want to know if these will keep working as they were or should they be
>>> replaced with new function FdBlackScholesVanillaEngine soon? Is there any
>>> date till these will work? Does deprecated mean no new development or
>>> existing stops working properly too?
>>>
>>> Thanks
>>> Ashish Bansal
>>> _______________________________________________
>>> QuantLib-users mailing list
>>> Qua...@li...
>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>
>>
|
|
From: James D. <Jam...@gm...> - 2021-10-19 21:08:08
|
Hello, It seems ql.VanillaSwap() only calculates the Pv01 values (fixed leg BPS is valuation difference for shifting my fixed coupon 1bp). What is the recommended approach for calculating Dv01 using Quantlib? I am currently using ql.ZeroSpreadedTermStructure() to shift my base curves (projection = US3mL, discount = SOFR), however when attempting to assign the shifted projection curve within ql.USDLibor(), which is required as part of ql.VanillaSwap(), I'm receiving an error that I have passed to many arguments. Thanks, James James Donaldson, CFA Fixed Income T 617.790.5019 E jam...@gm...<mailto:jam...@gm...> GMO LLC 40 Rowes Wharf Boston, MA 02110 GMO.com<http://www.gmo.com/> |
|
From: Ashish B. <ash...@gm...> - 2021-10-19 20:34:57
|
Thanks Luigi for the answer. If it was removed in 1.22, then how come it still works and provide us an output? Would the output be wrong? If we migrate from FDAm..engine to FDBla..engine, would the output remain same since both use same inputs? Sorry for my ignorance about it. Am new to QL. Regards Ashish On Tue, Oct 19, 2021, 4:46 PM Luigi Ballabio <lui...@gm...> wrote: > Hello, > deprecated functions stay in the library for four or five more > releases and then they are removed. The FDAmericanEngine class was > deprecated in version 1.17 and finally removed in version 1.22, so yes, if > you upgrade you'll need to use FdBlackScholesVanillaEngine instead. > > Luigi > > > On Tue, Oct 19, 2021 at 12:36 PM Ashish Bansal <ash...@gm...> > wrote: > >> Hi, >> >> We are using the quantlib for valuating the european and american options >> using functions which were deprecated in v1.22 in April-2021 >> e.g. FDAmericanEngine. We are calling through python code. >> >> Want to know if these will keep working as they were or should they be >> replaced with new function FdBlackScholesVanillaEngine soon? Is there any >> date till these will work? Does deprecated mean no new development or >> existing stops working properly too? >> >> Thanks >> Ashish Bansal >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2021-10-19 11:16:24
|
Hello,
deprecated functions stay in the library for four or five more releases
and then they are removed. The FDAmericanEngine class was deprecated in
version 1.17 and finally removed in version 1.22, so yes, if you upgrade
you'll need to use FdBlackScholesVanillaEngine instead.
Luigi
On Tue, Oct 19, 2021 at 12:36 PM Ashish Bansal <ash...@gm...>
wrote:
> Hi,
>
> We are using the quantlib for valuating the european and american options
> using functions which were deprecated in v1.22 in April-2021
> e.g. FDAmericanEngine. We are calling through python code.
>
> Want to know if these will keep working as they were or should they be
> replaced with new function FdBlackScholesVanillaEngine soon? Is there any
> date till these will work? Does deprecated mean no new development or
> existing stops working properly too?
>
> Thanks
> Ashish Bansal
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2021-10-19 11:02:16
|
QuantLib 1.24 has been released and is available for download at < https://www.quantlib.org/download.shtml>. The list of changes for this release is at < https://www.quantlib.org/reference/history.html>. Please report any problems you have with this release to the QuantLib mailing list (<qua...@li...>), or open a GitHub issue at <https://github.com/lballabio/quantlib/issues>. |
|
From: Ashish B. <ash...@gm...> - 2021-10-19 10:33:33
|
Hi, We are using the quantlib for valuating the european and american options using functions which were deprecated in v1.22 in April-2021 e.g. FDAmericanEngine. We are calling through python code. Want to know if these will keep working as they were or should they be replaced with new function FdBlackScholesVanillaEngine soon? Is there any date till these will work? Does deprecated mean no new development or existing stops working properly too? Thanks Ashish Bansal |
|
From: Luigi B. <lui...@gm...> - 2021-10-18 11:22:47
|
Simone,
it looks like the problem happens when you're using splines, and that's
probably because in that case we need a double bootstrap loop.
In short: splines are different from all other interpolations. Let's say
you're during the bootstrap, and you just determined node N so that it
reprices the Nth instrument exactly. When the bootstrap starts moving node
N+1, all the spline moves, and not just the part between node N and N+1 (as
in all other cases). This means that after node N+1 is determined,
instrument N+1 is repriced exactly, but instrument N might not be any
longer.
The way the code tries to account for this is to have a double loop: after
we are gone through all the nodes, we restart from node 1 and readjust it
so the first instrument is repriced, then node 2, and so on. This usually
works and converges to a curve that reprices all instruments exactly, but
unfortunately is not guaranteed to do so. I suspect that the error happens
during one of the later loops, when the full curve is built and the code is
trying to readjust the first node around it.
I'm afraid I don't have a solution for that, except avoiding splines. To
avoid jagged forwards, you might try bootstrapping on forwards themselves
and use, for instance, linear interpolation. Of course, I don't know if
that's satisfactory for your project.
Hope this helps,
Luigi
On Tue, Oct 12, 2021 at 11:58 AM Simone Caenazzo <
Sim...@ri...> wrote:
> Good morning,
>
>
>
> As an update on my side on this issue, it looks like the calibration works *on
> some days *without the deposits; but in general removing the deposit is
> not a reliable option.
>
>
>
> I’d be really grateful if anybody had any updates or further thoughts on
> this issue!
>
>
>
> Thanks in advance,
>
>
>
> Simone
>
>
>
> *From:* Simone Caenazzo
> *Sent:* 27 September 2021 15:53
> *To:* Luigi Ballabio <lui...@gm...>
> *Cc:* PONRAM GOPALAKRISHNAN <po...@gm...>;
> qua...@li...
> *Subject:* RE: [Quantlib-users] Help with "root not bracketed" error when
> bootstrapping curve without deposit/fixing rate
>
>
>
> Hi Luigi,
>
>
>
> I have sent a code example replying to Giuseppe Trapani in the same thread
> (the server notified me that the email is being held for review
> temporarily) – the PiecewiseYieldCurve constructor being used is the
> following – in fact, I believe this may have been deprecated in later
> versions of QuantLib:
>
>
>
> I have also tried different interpolation methods and targets.
> Effectively, without the deposit rate the only method that seems to work is
> Linear (at the cost of having a very jagged output forward curve, of
> course).
>
>
>
> Here is a list of all the method combinations that failed:
>
> DF, LogCubic
>
> DF, MonotonicLogCubicSpline
>
> DF, FritschButlandCubic
>
> DF, LogParabolic
>
> DF, MonotonicLogParabolic
>
> DF, AkimaCubic
>
> ZeroYield, MonotonicLogCubic
>
> ForwardRate, MonotonicLogCubic
>
>
>
> Thanks and best regards,
>
>
>
> Simone
>
>
>
>
>
>
>
> *From:* Luigi Ballabio <lui...@gm...>
> *Sent:* 21 September 2021 13:37
> *To:* Simone Caenazzo <Sim...@ri...>
> *Cc:* PONRAM GOPALAKRISHNAN <po...@gm...>;
> qua...@li...
> *Subject:* Re: [Quantlib-users] Help with "root not bracketed" error when
> bootstrapping curve without deposit/fixing rate
>
>
>
> Hi,
>
> what instantiation of PiecewiseYieldCurve are you using? Does it work
> if you change from Discount to ZeroRate or viceversa? Or if you change
> interpolation?
>
>
>
> Luigi
>
>
>
>
>
> On Tue, Sep 21, 2021 at 2:25 PM Simone Caenazzo <
> Sim...@ri...> wrote:
>
> Hi Ponram,
>
> Thanks - indeed, quote units is one of those things that immediately comes
> to mind.
>
> However I don't think this is the problem here - if the futures or swap
> RateHelpers were wrongly setup, the code would not work with the deposit
> rate either.
>
> Additionally, I have played around with data from different valuation
> dates - very weirdly, there are dates in which the calibration seems to
> work without the deposit rate too.
>
> Could there be combinations of quotes that, albeit valid, would cause
> issues within the solver, or the interpolator, of the bootstrapper?
>
> Thanks and best regards,
>
> Simone
>
> -----Original Message-----
> From: PONRAM GOPALAKRISHNAN <po...@gm...>
> Sent: 21 September 2021 13:14
> To: Simone Caenazzo <Sim...@ri...>
> Cc: Giuseppe Trapani <tr...@gm...>;
> qua...@li...
> Subject: Re: [Quantlib-users] Help with "root not bracketed" error when
> bootstrapping curve without deposit/fixing rate
>
> Hi,
>
> I recently encountered this issue when bootstrapping with bond price
> quotes. I initially had my prices assuming $1 as the face value. I had no
> issues after changing it to $100 face value. You can try adjusting your
> price quotes and see if it helps.
>
> - Ponram
>
>
>
> > On Sep 21, 2021, at 4:08 AM, Simone Caenazzo <
> Sim...@ri...> wrote:
> >
>
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>
|
|
From: Ben W. <ben...@ma...> - 2021-10-18 09:45:55
|
Hi Hamed, A couple of things…. HW model uses swaption volatility to model the evolution of coupon paying swaps, not zero rates. This a ‘Q’ measure (market implied) type model – this is important distinction as the requirement is to calibrate the market quotes. You are looking at zero coupon Canadian Government rates which are not market quotes (they are implied from market rates) and there is no option market to get implied Vol from. The Vasicek model is not used as a Q measure because it can not calibrate to the market. I suspect you are looking at P (real world) measures - in which case you estimate the volatility and mean reversion from historical data. Quantlib has a Vasicek model (ql.Vasicek(r0=0.05, a=0.1, b=0.05, sigma=0.01, lambda=0.0) but it is up to you to come up with r, a, b, sigma and lamba. Regards Ben From: Hamed Helali <hel...@gm...> Sent: Monday, 18 October 2021 11:12 AM To: qua...@li... Subject: [Quantlib-users] Calibrating short-rate models on zero-coupon bonds Hello, I am trying to use the QuantLib package in Python for calibrating term-structure models in order to forecast upcoming yield curves. I reviewed these instructions on calibrating the short rate models: http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html You have shown calibrating HW model using swaption data. What I am trying to do is using zero-coupon bond yield curves to calibrate the Vasicek model. The data is retrieved from this page: https://www.bankofcanada.ca/rates/interest-rates/bond-yield-curves/ However, I could not map what you have in the instructions to what I need in my task. For example, I cannot figure out what function should I use instead of SwaptionHelper. Generally, I am having a hard time understanding helpers and their purpose. Also, I could not find any docs for model.calibrate() method. P.S.: I got this feedback that using vanilla zero-coupon bond yields for calibrating models will not give a good estimation of volatility. I need to use instruments with some optionality in order to calibrate the volatility. Could please comment on this. I cannot understand the reason behind this clearly. Best, Hamed. |
|
From: Hamed H. <hel...@gm...> - 2021-10-18 00:12:04
|
Hello, I am trying to use the QuantLib package in Python for calibrating term-structure models in order to forecast upcoming yield curves. I reviewed these instructions on calibrating the short rate models: http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html You have shown calibrating HW model using swaption data. What I am trying to do is using zero-coupon bond yield curves to calibrate the Vasicek model. The data is retrieved from this page: https://www.bankofcanada.ca/rates/interest-rates/bond-yield-curves/ However, I could not map what you have in the instructions to what I need in my task. For example, I cannot figure out what function should I use instead of *SwaptionHelper*. Generally, I am having a hard time understanding helpers and their purpose. Also, I could not find any docs for *model.calibrate**()* method. P.S.: I got this feedback that using vanilla zero-coupon bond yields for calibrating models will not give a good estimation of volatility. I need to use instruments with some optionality in order to calibrate the volatility. Could please comment on this. I cannot understand the reason behind this clearly. Best, Hamed. |
|
From: <da...@el...> - 2021-10-17 14:09:30
|
Many thanks for the help, Luigi.
David
From: Luigi Ballabio <lui...@gm...>
Sent: Wednesday, 13 October 2021 08:19
To: da...@el...
Cc: QuantLib users <qua...@li...>
Subject: Re: [Quantlib-users] ExponentialSplinesFitting in Python
Hi David,
currently Python only exports the long-form constructor (see https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/fittedbondcurve.i#L85). As you say, you can pass the default parameters — a large number for maxCutoffTime is ok.
Luigi
On Mon, Oct 11, 2021 at 11:58 PM <da...@el... <mailto:da...@el...> > wrote:
Hi,
The C++ documentation here (QuantLib: ExponentialSplinesFitting Class Reference (rkapl123.github.io) <https://rkapl123.github.io/QLAnnotatedSource/d9/d6c/class_quant_lib_1_1_exponential_splines_fitting.html> ) has a constructor:
ExponentialSplinesFitting(bool constrainAtZero, Size numCoeffs, Real fixedKappa, const Array & weights = Array() )
If I try to get away in Python with just passing these parameters, I get the error:
Wrong number or type of arguments for overloaded function 'new_ExponentialSplinesFitting'.
Possible C/C++ prototypes are:
ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const &,Array const &,Real,Real,Size,Real)
ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const &,Array const &,Real,Real,Size)
ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const &,Array const &,Real,Real)
ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const &,Array const &,Real)
ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const &,Array const &)
ExponentialSplinesFitting::ExponentialSplinesFitting(bool,Array const &)
ExponentialSplinesFitting::ExponentialSplinesFitting(bool)
ExponentialSplinesFitting::ExponentialSplinesFitting()
Ie none of these match.
Using QuantLib 1.23 on Python.
I am afraid I am not very knowledgeable about how the C++/Python conversion works: I can pass the default parameters to the long-form constructor, except I am not sure how to specify QL_MAX_REAL in Python (using a large number like 1000000 seems to work …)
Grateful for any advice!
Thanks
David Sansom
_______________________________________________
QuantLib-users mailing list
Qua...@li... <mailto:Qua...@li...>
https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Luigi B. <lui...@gm...> - 2021-10-15 07:18:43
|
Hello everybody,
I've taken a cut for QuantLib 1.24 and made it available at <
https://github.com/lballabio/QuantLib/releases/tag/1.24rc>. If you have
some time in the next week or so, please try it out and report back any
issues. Thanks!
Luigi
|