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
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Christofer B. <bog...@gm...> - 2020-08-13 17:09:59
|
It would be better if I can load QuantLin with Python3. I failed to use some of the packages with Python2 (2.7.16) like matplotlib. Thanks, On Thu, Aug 13, 2020 at 8:09 PM Javid Ashraff <jav...@ya...> wrote: > I recall having the same problem in the past. Try using pip install > rather than pip3 install. > > Regards, > > Javid > > On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso < > bog...@gm...> wrote: > > > Thanks. > > I have reinstalled Python3 using brew. And then installed again the > QuantLib as below - > > pip3 install QuantLib-Python > > Requirement already satisfied: QuantLib-Python in > /usr/local/lib/python3.8/site-packages (1.18) > > Requirement already satisfied: QuantLib in > /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19) > > After that I tried to import the library within Python3, but failed. > > >>> import QuantLib as ql > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > ModuleNotFoundError: No module named 'QuantLib' > > Any idea why is it failing? > > On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <lui...@gm...> > wrote: > > I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/ > *directory. To be sure you're not missing anything, you might also run > "pip uninstall QuantLib-Python" first, then look for anything related to > QuantLib in /usr/local/lib and its Python subdirectories. Once you clean > them (but be careful to only clean stuff with "quantlib" in its name), you > can run "pip install" again. > > Luigi > > > On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso < > bog...@gm...> wrote: > > Thanks Luigi. But, how can I clean that? Is there any specific syntax? > > On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> > wrote: > > Hello, > from the fact the traceback starts from " > *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to > */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's importing > a version you tried to compile rather than the one you installed with pip. > If that's the case, I'd try cleaning that one up. > > Hope this helps, > Luigi > > > On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < > bog...@gm...> wrote: > > Hi, > > I wanted to run QuantLib from my Python workplace, however failed to > import the library with below error - > > > > > > > > > > > > > > > > > > > > > > *>>> import QuantLibTraceback (most recent call last): File "<stdin>", > line 1, in <module> File > "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in > <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", > line 13, in <module> File > "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in > <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", > line 6, in __bootstrap__ImportError: > dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, > 2): Symbol not found: > __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb > Referenced from: > /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so > Expected in: /usr/local/lib/libQuantLib.0.dylib in > /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* > > I used the syntax *pip install QuantLib-Python* when I installed > QuantLib, the installation appears to be successful. > > Any help will be highly appreciated. > > Thanks, > _______________________________________________ > 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: Javid A. <jav...@ya...> - 2020-08-13 14:39:30
|
I recall having the same problem in the past. Try using pip install rather than pip3 install.
Regards,
Javid
On Thursday, 13 August 2020, 19:15:32 GMT+8, Christofer Bogaso <bog...@gm...> wrote:
Thanks.
I have reinstalled Python3 using brew. And then installed again the QuantLib as below -
pip3 install QuantLib-Python
Requirement already satisfied: QuantLib-Python in /usr/local/lib/python3.8/site-packages (1.18)
Requirement already satisfied: QuantLib in /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19)
After that I tried to import the library within Python3, but failed.
>>> import QuantLib as ql
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'QuantLib'
Any idea why is it failing?
On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <lui...@gm...> wrote:
I don't think there is. You'll probably have to remove the build/bdist.macosx-10.15-x86_64/egg/ directory. To be sure you're not missing anything, you might also run "pip uninstall QuantLib-Python" first, then look for anything related to QuantLib in /usr/local/lib and its Python subdirectories. Once you clean them (but be careful to only clean stuff with "quantlib" in its name), you can run "pip install" again.
Luigi
On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso <bog...@gm...> wrote:
Thanks Luigi. But, how can I clean that? Is there any specific syntax?
On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> wrote:
Hello, from the fact the traceback starts from "build/bdist.macosx-10.15-x86_64/egg/" and the fact it refers to /usr/local/lib/libQuantLib.0.dylib, it looks to me like it's importing a version you tried to compile rather than the one you installed with pip. If that's the case, I'd try cleaning that one up.
Hope this helps, Luigi
On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso <bog...@gm...> wrote:
Hi,
I wanted to run QuantLib from my Python workplace, however failed to import the library with below error -
>>> import QuantLib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in <module>
File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", line 13, in <module>
File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in <module>
File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, 2): Symbol not found: __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb
Referenced from: /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so
Expected in: /usr/local/lib/libQuantLib.0.dylib
in /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so
I used the syntax pip install QuantLib-Python when I installed QuantLib, the installation appears to be successful.
Any help will be highly appreciated.
Thanks,_______________________________________________
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: Christofer B. <bog...@gm...> - 2020-08-13 11:13:39
|
Thanks. I have reinstalled Python3 using brew. And then installed again the QuantLib as below - pip3 install QuantLib-Python Requirement already satisfied: QuantLib-Python in /usr/local/lib/python3.8/site-packages (1.18) Requirement already satisfied: QuantLib in /usr/local/lib/python3.8/site-packages (from QuantLib-Python) (1.19) After that I tried to import the library within Python3, but failed. >>> import QuantLib as ql Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'QuantLib' Any idea why is it failing? On Thu, Aug 13, 2020 at 4:36 PM Luigi Ballabio <lui...@gm...> wrote: > I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/ > *directory. To be sure you're not missing anything, you might also run > "pip uninstall QuantLib-Python" first, then look for anything related to > QuantLib in /usr/local/lib and its Python subdirectories. Once you clean > them (but be careful to only clean stuff with "quantlib" in its name), you > can run "pip install" again. > > Luigi > > > On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso < > bog...@gm...> wrote: > >> Thanks Luigi. But, how can I clean that? Is there any specific syntax? >> >> On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello, >>> from the fact the traceback starts from " >>> *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to >>> */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's >>> importing a version you tried to compile rather than the one you installed >>> with pip. If that's the case, I'd try cleaning that one up. >>> >>> Hope this helps, >>> Luigi >>> >>> >>> On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < >>> bog...@gm...> wrote: >>> >>>> Hi, >>>> >>>> I wanted to run QuantLib from my Python workplace, however failed to >>>> import the library with below error - >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *>>> import QuantLibTraceback (most recent call last): File "<stdin>", >>>> line 1, in <module> File >>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in >>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", >>>> line 13, in <module> File >>>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in >>>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", >>>> line 6, in __bootstrap__ImportError: >>>> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, >>>> 2): Symbol not found: >>>> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb >>>> Referenced from: >>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so >>>> Expected in: /usr/local/lib/libQuantLib.0.dylib in >>>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* >>>> >>>> I used the syntax *pip install QuantLib-Python* when I installed >>>> QuantLib, the installation appears to be successful. >>>> >>>> Any help will be highly appreciated. >>>> >>>> Thanks, >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> |
|
From: Luigi B. <lui...@gm...> - 2020-08-13 11:06:16
|
I don't think there is. You'll probably have to remove the *build/bdist.macosx-10.15-x86_64/egg/ *directory. To be sure you're not missing anything, you might also run "pip uninstall QuantLib-Python" first, then look for anything related to QuantLib in /usr/local/lib and its Python subdirectories. Once you clean them (but be careful to only clean stuff with "quantlib" in its name), you can run "pip install" again. Luigi On Thu, Aug 13, 2020 at 12:00 PM Christofer Bogaso < bog...@gm...> wrote: > Thanks Luigi. But, how can I clean that? Is there any specific syntax? > > On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> > wrote: > >> Hello, >> from the fact the traceback starts from " >> *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to >> */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's importing >> a version you tried to compile rather than the one you installed with pip. >> If that's the case, I'd try cleaning that one up. >> >> Hope this helps, >> Luigi >> >> >> On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < >> bog...@gm...> wrote: >> >>> Hi, >>> >>> I wanted to run QuantLib from my Python workplace, however failed to >>> import the library with below error - >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *>>> import QuantLibTraceback (most recent call last): File "<stdin>", >>> line 1, in <module> File >>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in >>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", >>> line 13, in <module> File >>> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in >>> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", >>> line 6, in __bootstrap__ImportError: >>> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, >>> 2): Symbol not found: >>> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb >>> Referenced from: >>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so >>> Expected in: /usr/local/lib/libQuantLib.0.dylib in >>> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* >>> >>> I used the syntax *pip install QuantLib-Python* when I installed >>> QuantLib, the installation appears to be successful. >>> >>> Any help will be highly appreciated. >>> >>> Thanks, >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Christofer B. <bog...@gm...> - 2020-08-13 10:00:20
|
Thanks Luigi. But, how can I clean that? Is there any specific syntax? On Thu, Aug 13, 2020 at 3:19 PM Luigi Ballabio <lui...@gm...> wrote: > Hello, > from the fact the traceback starts from " > *build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to > */usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's importing > a version you tried to compile rather than the one you installed with pip. > If that's the case, I'd try cleaning that one up. > > Hope this helps, > Luigi > > > On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso < > bog...@gm...> wrote: > >> Hi, >> >> I wanted to run QuantLib from my Python workplace, however failed to >> import the library with below error - >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *>>> import QuantLibTraceback (most recent call last): File "<stdin>", >> line 1, in <module> File >> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in >> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", >> line 13, in <module> File >> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in >> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", >> line 6, in __bootstrap__ImportError: >> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, >> 2): Symbol not found: >> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb >> Referenced from: >> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so >> Expected in: /usr/local/lib/libQuantLib.0.dylib in >> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* >> >> I used the syntax *pip install QuantLib-Python* when I installed >> QuantLib, the installation appears to be successful. >> >> Any help will be highly appreciated. >> >> Thanks, >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2020-08-13 09:49:19
|
Hello,
from the fact the traceback starts from "
*build/bdist.macosx-10.15-x86_64/egg/"* and the fact it refers to
*/usr/local/lib/libQuantLib.0.dylib,* it looks to me like it's importing a
version you tried to compile rather than the one you installed with pip.
If that's the case, I'd try cleaning that one up.
Hope this helps,
Luigi
On Thu, Aug 13, 2020 at 11:35 AM Christofer Bogaso <
bog...@gm...> wrote:
> Hi,
>
> I wanted to run QuantLib from my Python workplace, however failed to
> import the library with below error -
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *>>> import QuantLibTraceback (most recent call last): File "<stdin>",
> line 1, in <module> File
> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in
> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py",
> line 13, in <module> File
> "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in
> <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py",
> line 6, in __bootstrap__ImportError:
> dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so,
> 2): Symbol not found:
> __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb
> Referenced from:
> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so
> Expected in: /usr/local/lib/libQuantLib.0.dylib in
> /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so*
>
> I used the syntax *pip install QuantLib-Python* when I installed
> QuantLib, the installation appears to be successful.
>
> Any help will be highly appreciated.
>
> Thanks,
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Christofer B. <bog...@gm...> - 2020-08-13 09:32:47
|
Hi, I wanted to run QuantLib from my Python workplace, however failed to import the library with below error - *>>> import QuantLibTraceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/__init__.py", line 24, in <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/QuantLib.py", line 13, in <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 7, in <module> File "build/bdist.macosx-10.15-x86_64/egg/QuantLib/_QuantLib.py", line 6, in __bootstrap__ImportError: dlopen(/Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so, 2): Symbol not found: __ZN8QuantLib10IborCouponC1ERKNS_4DateEdS3_S3_jRKN5boost10shared_ptrINS_9IborIndexEEEddS3_S3_RKNS_10DayCounterEb Referenced from: /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so Expected in: /usr/local/lib/libQuantLib.0.dylib in /Users/aa/Library/Caches/Python-Eggs/QuantLib_Python-1.16.1-py2.7-macosx-10.15-x86_64.egg-tmp/QuantLib/_QuantLib.so* I used the syntax *pip install QuantLib-Python* when I installed QuantLib, the installation appears to be successful. Any help will be highly appreciated. Thanks, |
|
From: Sumit S. <su...@mo...> - 2020-08-12 15:59:36
|
Hi, I am looking at the cook-book on how to model (price & risk) a Callable bond Questions on that pdf document are:- 1. Apart from the Callable & Puttable schedules, what happens if I dont input a historical vol? Would the HW model use a more deterministic approach? 2. If I were to put in a historical volatility of the short rate - can I use a simple daily standard deviation of the OIS or Fed fund rate? 3. What risk measures can I get out of the code apart from Dv01? Any paper on the underlying implementation would be useful. Thanks, Sumit -- Mosaic Smart Data mobile +44 (0)7961839363 su...@mo... 25 Finsbury Circus ▫ EC2M 7EE ▫ London ▫ United Kingdom www.mosaicsmartdata.com |
|
From: Alessio P. <ale...@gm...> - 2020-08-12 11:29:30
|
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 2.0cm 2.0cm 2.0cm;} div.WordSection1 {page:WordSection1;} --></style></head><body lang=IT><div class=WordSection1><p class=MsoNormal>Good Morning,</p><p class=MsoNormal>I would like to know what algorithm is used inside QuantLib to compute option prices in Fourier Space. Thank you so much.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best Regards,<o:p></o:p></p><p class=MsoNormal>Alessio Peroni.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html> |
|
From: Aleksis A. R. <ale...@go...> - 2020-08-10 20:48:37
|
Hi. I’ve been looking at the LinearTSR pricer for CMS in Quantlib and comparing it with a replication portfolio of OTM swaptions. To set things up I use: a flat rate term structure of 5% (both for discounting and forwards); a normal vol cube with simple symmetric smile (ATM vols around 50bps and skew +/- 15bps for each +/- 1% OTM). I consider a CMS swaplet (fix in adv, pay in arrears with an annual tenor) with a maturity of 5y on a 20y swap reference rate (and compare it with a 5y20y annual/3mL vanilla swap on a 100mm nominal). After solving for the appropriate CMS nominal and the corresponding nominal weights of the replication swaptions (using a parallel shift range of +/- 10% in 50bps shifts i.e. using 20 payer+20 receiver swaptions), the convexity adjustments are a close match and the overall fit looks pretty decent: Now playing around with both the vols and the vol skew, the scenarios of the TSR pricer and the replicated swaption portfolio have the behaviors shown in the plots below (granted up to quite extreme vol levels!). At these more extreme levels of vol and skew, increasing the range of the replication portfolio gives a closer match for the vol shift case, and somewhat improves the match for the skew scaling case - however the discrepancies are still apparent even using a large replication set of swaptions. Note that skew scaling here just means making the vol smile more acute by scaling the OTM spreads by a scale factor. Not knowing enough about what the LinearTSR pricer is actually doing it’d be helpful if someone could comment on the deviations shown below at the high vol/skew levels and what model parameters might potentially address/explain them. Or, more significantly, if the below behaviors are more of a reflection of a flaw in my replication methodology? Thanks, Aleksis |
|
From: Pierre D. <mer...@gm...> - 2020-08-03 01:32:50
|
Hello All, I could not find an example to price volatility and variance swaps. Is it at all possible using the Python bindings ? Ideally I am also looking for the capped versions of both those products. Thank you for your help. Best, Pierre |
|
From: Amine I. <ami...@gm...> - 2020-07-30 13:20:03
|
Hi all, I re-wrote a discretisation scheme for CoxIngersollRoss model using the implicit Milstein scheme - instead of using the sqrt(r) as the simulation variable in the SDE as introduced in QuantLib. Discretisation Eq is given by: |
|
From: David D. <nh...@gm...> - 2020-07-21 09:07:34
|
Thanks Luigi. Issue added on GitHub. On Tue, 21 Jul 2020 at 09:36, Luigi Ballabio <lui...@gm...> wrote: > Hello, > it's kind of forced on us by the need of virtual functions to have the > same return type. In C++ one can easily downcast the pointer to the > correct class again, but that doesn't carry well to Python. We should > override the method in the SWIG interface so it returns the more derived > type. May you open an issue on GitHub? > > Thanks, > Luigi > > > On Tue, Jul 21, 2020 at 1:14 AM David Duarte <nh...@gm...> wrote: > >> Hi all, >> >> In python, cloning an Ibor index seems to be a good way to assign a >> YieldTermStructure after it is created. >> >> For example: index.clone(yts) >> >> However this doesn't work with an overnight index because after cloning, >> the index type changes to IborIndex. >> >> For example, creating and index with ql.FedFunds() shows : >> >> <QuantLib.QuantLib.FedFunds; proxy of <Swig Object of type 'boost::shared_ptr< FedFunds > *' at 0x7f0706751a80> > >> >> >> But if I clone it, with ql.FedFunds().clone(yts), the instance changes to: >> >> >> <QuantLib.QuantLib.IborIndex; proxy of <Swig Object of type 'boost::shared_ptr< IborIndex > *' at 0x7f0706751de0> > >> >> >> Is this expected? >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2020-07-21 08:43:00
|
Hello,
I'm not sure how you would do the stitching? Let's say you have curve
S for short-term bonds and curve M for medium-term bonds. If you create a
stitched curve that behaves like S in the short term and like M in the
medium term, and then use it to price a bond with a medium-term maturity,
the initial coupons of the bond would be discounted with S and its later
coupons with M, so you wouldn't get the same price you got during the fit
from using M - by replacing a part of the curve, you're losing the fit. Am
I missing something?
Luigi
On Thu, Jul 16, 2020 at 2:44 PM Dzmitry P <4ma...@gm...> wrote:
> Hello,
>
> Is there a way to "stitch together" a single curve out of multiple ones,
> built using FittedBondDiscountCurve class? Sort of like putting together a
> piecewise curve, consisting of portions already fitted around some local
> clusters? I find that building multiple curves that target specific
> segments of the target universe results in a better model accuracy. If I
> try to fit all bonds on a single curve, then usually the short end and the
> long end of the curve show poor model accuracy, I use nelson-siege-svensson
> fitting.
>
> For example, if I took a bunch of bonds, then split them into 3 groups and
> fitted them using FittedBondDiscountCurve, and thus built 3 "local"
> curves, focusing on short-end, long-end and the "middle" maturity range of
> those bonds - I would end up with 3 curves. I really want a single curve as
> the final product that would have the same predictive power as these 3
> curves together.
> What would be some good techniques in stitching these curves together, and
> getting to a single curve as the final product?
>
> Thanks,
> Dima
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2020-07-21 08:37:06
|
Hello,
it's kind of forced on us by the need of virtual functions to have the
same return type. In C++ one can easily downcast the pointer to the
correct class again, but that doesn't carry well to Python. We should
override the method in the SWIG interface so it returns the more derived
type. May you open an issue on GitHub?
Thanks,
Luigi
On Tue, Jul 21, 2020 at 1:14 AM David Duarte <nh...@gm...> wrote:
> Hi all,
>
> In python, cloning an Ibor index seems to be a good way to assign a
> YieldTermStructure after it is created.
>
> For example: index.clone(yts)
>
> However this doesn't work with an overnight index because after cloning,
> the index type changes to IborIndex.
>
> For example, creating and index with ql.FedFunds() shows :
>
> <QuantLib.QuantLib.FedFunds; proxy of <Swig Object of type 'boost::shared_ptr< FedFunds > *' at 0x7f0706751a80> >
>
>
> But if I clone it, with ql.FedFunds().clone(yts), the instance changes to:
>
>
> <QuantLib.QuantLib.IborIndex; proxy of <Swig Object of type 'boost::shared_ptr< IborIndex > *' at 0x7f0706751de0> >
>
>
> Is this expected?
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: David D. <nh...@gm...> - 2020-07-20 23:11:45
|
Hi all, In python, cloning an Ibor index seems to be a good way to assign a YieldTermStructure after it is created. For example: index.clone(yts) However this doesn't work with an overnight index because after cloning, the index type changes to IborIndex. For example, creating and index with ql.FedFunds() shows : <QuantLib.QuantLib.FedFunds; proxy of <Swig Object of type 'boost::shared_ptr< FedFunds > *' at 0x7f0706751a80> > But if I clone it, with ql.FedFunds().clone(yts), the instance changes to: <QuantLib.QuantLib.IborIndex; proxy of <Swig Object of type 'boost::shared_ptr< IborIndex > *' at 0x7f0706751de0> > Is this expected? |
|
From: Luigi B. <lui...@gm...> - 2020-07-20 12:59:53
|
Hello,
the effort would not be a lot (mostly it would involve copying class
declarations from the C++ headers to the SWIG interface files), but I'm not
sure of the return. The commodity code is an old contribution that was
never really supported and is probably half-broken. It would need a good
look to assess what to keep, fix, or throw away. It would be a great help
if you could do that, but of course that would take a longer time.
Regards,
Luigi
On Mon, Jul 20, 2020 at 11:54 AM Forde A Smith <for...@gm...>
wrote:
> Hi,
>
> I want to estimate the effort to write SWIG wrappers for the QuantLib
> commodity libraries.
>
> Can anyone help with actuals or heuristics?
>
> Best,
>
> Forde Smith
> 0447 034 081
>
> Sent from my phone, please excuse errors.
>
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Forde A S. <for...@gm...> - 2020-07-20 09:51:45
|
Hi, I want to estimate the effort to write SWIG wrappers for the QuantLib commodity libraries. Can anyone help with actuals or heuristics? Best, Forde Smith 0447 034 081 Sent from my phone, please excuse errors. |
|
From: Luigi B. <lui...@gm...> - 2020-07-20 08:45:53
|
Hello everybody,
QuantLib 1.19 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: Prasanna K. <pk...@ku...> - 2020-07-17 04:40:16
|
Klaus, Thanks for the tip. You are correct, the tests pass even after removing the condition. How the engine-greeks and FD-greeks are compared, plays a role too. In my copied code, I was purely testing the difference between the engine-greeks and the FD-greeks. The pure difference between the engine-greeks and the FD-greeks do exceed tolerances. The tests fail. However, the ((difference between engine and FD greek) / spot) is always less than the tolerances and the tests pass fine. Would you happen to know why the division by spot is necessary? At one level it seems intuitive, but I can’t seem to have a mathematical explanation for this. Thanks. > On Jul 15, 2020, at 4:33 PM, Klaus Spanderen <kl...@sp...> wrote: > > Hi > > may be a left-over from the early days. IMO you can remove the condition and the tests will still pass. May be in the past the discrete delta/gamma calculation in the test case wasn't accurate enough to meet the tolerances for deep OTM options. > > regards > Klaus > > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Dzmitry P <4ma...@gm...> - 2020-07-16 12:42:19
|
Hello, Is there a way to "stitch together" a single curve out of multiple ones, built using FittedBondDiscountCurve class? Sort of like putting together a piecewise curve, consisting of portions already fitted around some local clusters? I find that building multiple curves that target specific segments of the target universe results in a better model accuracy. If I try to fit all bonds on a single curve, then usually the short end and the long end of the curve show poor model accuracy, I use nelson-siege-svensson fitting. For example, if I took a bunch of bonds, then split them into 3 groups and fitted them using FittedBondDiscountCurve, and thus built 3 "local" curves, focusing on short-end, long-end and the "middle" maturity range of those bonds - I would end up with 3 curves. I really want a single curve as the final product that would have the same predictive power as these 3 curves together. What would be some good techniques in stitching these curves together, and getting to a single curve as the final product? Thanks, Dima |
|
From: Klaus S. <kl...@sp...> - 2020-07-15 20:34:14
|
Hi may be a left-over from the early days. IMO you can remove the condition and the tests will still pass. May be in the past the discrete delta/gamma calculation in the test case wasn't accurate enough to meet the tolerances for deep OTM options. regards Klaus |
|
From: philippe h. <pha...@ma...> - 2020-07-14 08:17:31
|
Perfect, thank you. Regards Philippe Hatstadt +1-203-252-0408 pha...@ma... https://www.linkedin.com/in/philippe-hatstadt > On Jul 14, 2020, at 3:17 AM, Luigi Ballabio <lui...@gm...> wrote: > > > If you create your index as: > > RelinkableHandle<YieldTermStructure> forecastHandle; > forecastHandle.linkTo(originalCurve); > ext::shared_ptr<IborIndex> index = ext::make_shared<Euribor6M>(forecastHandle) // for instance: works with any floating index > > or the equivalent in Python: > > forecastHandle = RelinkableYieldTermStructureHandle() > forecastHandle.linkTo(originalCurve) > index = Euribor6M(forecastHandle) > > then, when you link the handle to a different curve with > > forecastHandle.linkTo(newCurve); > > the index will start using the new one for forecasting. If you used the index to build a swap, the swap will start using the new curve too. > > Luigi > > >> On Tue, Jul 14, 2020 at 2:30 AM Philippe Hatstadt <phi...@ex...> wrote: >> I think I know what is wrong. I do not set the floating rate index to be generated from each Hull-White curve but from the original curve, that has positive rates. >> So the question simply is this: Is there a way to change the curve used to generate the floating index in a swap, or is the only way to re-instantiate a new swap based on an index pointing to my path-dependent curve? >> I'd rather change the index and keep the same instance of my swap, but maybe that's not possible? Stated differently, is there the equivalent of a pricing engine for the floating index forecasting? >> >> Regards >> >> Philippe >> >> >>> On Mon, Jul 13, 2020 at 5:56 AM Amine Ifri <ami...@gm...> wrote: >>> I use the C++ library and never had an issue with swap.fairRate(). It gives me positive as well as negative values depending on the term structures. >>> >>> As far as checking the CPP code, it looks correct to me. Do you mind sharing the swap details you are trying to price/simulate? >>> >>> Amine >>> >>>> On 12 Jul 2020, at 03:02, Philippe Hatstadt <phi...@ex...> wrote: >>>> >>>> I'm using a Hull-White model to generate forward paths of the short rate, from which I then build a discounting curve, from which I compute forward swap values towards Monte-carlo integration of certain path dependent swap rate linked derivatives. Here, I am looking at a 2y into 10y swaption, and for each path, I want to calculate the forward swap rate and the swap NPV. >>>> My problem is that I have a curve that has negative rates on a certain path, the 2y into 10y forward swap.fairRate() function returns like 94bp. Since all rates are negative, it's pretty clear that fairRate() should be negative, and if I use the curve's discount factors and use the good old approximation for the swap rate with the formula C/2 * Sum_i(FixedLegDiscountFactor(i))/(1-DiscountFactor(TMat)) then I get the correct -250bp forward swap rate (where i=1 to 20 corresponding to 20 forward semi-annual fixed payments). >>>> So I am wondering if the swap cash flows do not work with negative rates or else, but as it stands right now, the swap.fairRate() function doesn't work at all. I also checked that by solving for the fixed rate that would make the swap net cash-flows to be equal to zero, then I get the value returned by swap.fairRate(). This would further indicate that the latter function is correct, but that the cash flows are not. lastly, whether I select a path with positive or negative forward rates, the cf.amount() is always positive. >>>> This is the code I use to generate the cash-flows: >>>> def swap_cash_flows(swap: ql.Swap, >>>> crvh, >>>> ): >>>> output_list = [] >>>> for i, cf in enumerate(swap.leg(0)): >>>> dt = cf.date() >>>> dfact = crvh.discount(dt) >>>> output_list.append(['leg0', cf.date(), dfact, cf.amount()]) >>>> for i, cf in enumerate(swap.leg(1)): >>>> dt = cf.date() >>>> dfact = crvh.discount(dt) >>>> output_list.append(['leg1', cf.date(), dfact, cf.amount()]) >>>> df1 = pd.DataFrame(columns=['leg', 'cf_date', 'disc_fact', 'cf_amount'], data=output_list) >>>> return df1 >>>> The short-rate path corresponding to the curve handle crvh is as follows: >>>> <image.png> >>>> and lastly, this is the table of cash flows, dates and discount factors: >>>> leg cf_date disc_fact cf_amount >>>> leg0 2023-01-11 1.031727084 0.004717496 >>>> leg0 2023-07-11 1.044326706 0.004640581 >>>> leg0 2024-01-11 1.056475309 0.004717496 >>>> leg0 2024-07-11 1.067323978 0.004666219 >>>> leg0 2025-01-13 1.080208917 0.004768773 >>>> leg0 2025-07-11 1.095773345 0.004589303 >>>> leg0 2026-01-12 1.107358267 0.004743135 >>>> leg0 2026-07-13 1.119706713 0.004666219 >>>> leg0 2027-01-11 1.134937064 0.004666219 >>>> leg0 2027-07-12 1.148588556 0.004666219 >>>> leg0 2028-01-11 1.164662739 0.004691858 >>>> leg0 2028-07-11 1.184811281 0.004666219 >>>> leg0 2029-01-11 1.202933688 0.004717496 >>>> leg0 2029-07-11 1.22143445 0.004640581 >>>> leg0 2030-01-11 1.244698418 0.004717496 >>>> leg0 2030-07-11 1.268437607 0.004640581 >>>> leg0 2031-01-13 1.289269217 0.004768773 >>>> leg0 2031-07-11 1.310335034 0.004589303 >>>> leg0 2032-01-12 1.330460609 0.004743135 >>>> leg0 2032-07-12 1.351119197 0.004666219 >>>> leg1 2022-10-11 1.025077227 0.000595151 >>>> leg1 2023-01-11 1.031727084 0.000595151 >>>> leg1 2023-04-11 1.037740592 0.000582209 >>>> leg1 2023-07-11 1.044326706 0.00058868 >>>> leg1 2023-10-11 1.050712784 0.001151809 >>>> leg1 2024-01-11 1.056475309 0.001190658 >>>> leg1 2024-04-11 1.062040699 0.001177708 >>>> leg1 2024-07-11 1.067323978 0.001177708 >>>> leg1 2024-10-11 1.073341181 0.001190658 >>>> leg1 2025-01-13 1.080208917 0.001216557 >>>> leg1 2025-04-11 1.087963402 0.00113886 >>>> leg1 2025-07-11 1.095773345 0.001322081 >>>> leg1 2025-10-14 1.102080743 0.002477114 >>>> leg1 2026-01-12 1.107358267 0.002346587 >>>> leg1 2026-04-13 1.112978456 0.002372691 >>>> leg1 2026-07-13 1.119706713 0.002372691 >>>> leg1 2026-10-13 1.127732208 0.002398796 >>>> leg1 2027-01-11 1.134937064 0.002346587 >>>> leg1 2027-04-12 1.141923849 0.002372691 >>>> leg1 2027-07-12 1.148588556 0.002390753 >>>> leg1 2027-10-12 1.155929127 0.002537285 >>>> leg1 2028-01-11 1.164662739 0.002509671 >>>> leg1 2028-04-11 1.174741361 0.002509671 >>>> leg1 2028-07-11 1.184811281 0.002509671 >>>> leg1 2028-10-11 1.194083437 0.002537285 >>>> leg1 2029-01-11 1.202933688 0.002537285 >>>> leg1 2029-04-11 1.211815927 0.002482058 >>>> leg1 2029-07-11 1.22143445 0.002509671 >>>> leg1 2029-10-11 1.232822712 0.002537285 >>>> leg1 2030-01-11 1.244698418 0.002537285 >>>> leg1 2030-04-11 1.256926582 0.002482058 >>>> leg1 2030-07-11 1.268437607 0.003472659 >>>> leg1 2030-10-11 1.278474854 0.004092082 >>>> leg1 2031-01-13 1.289269217 0.004181226 >>>> leg1 2031-04-11 1.299839855 0.003914165 >>>> leg1 2031-07-11 1.310335034 0.004047153 >>>> leg1 2031-10-14 1.320633529 0.004225801 >>>> leg1 2032-01-12 1.330460609 0.004002946 >>>> leg1 2032-04-12 1.340898895 0.004047513 >>>> leg1 2032-07-12 1.351119197 0.004047513 >>>> Regards >>>> >>>> Philippe >>>> >>>> >>>> >>>> Brokerage services offered through Exos Securities LLC, member of SIPC / FINRA. For important disclosures, click here. >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> >> >> >> Brokerage services offered through Exos Securities LLC, member of SIPC / FINRA. For important disclosures, click here. >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Luigi B. <lui...@gm...> - 2020-07-14 07:16:21
|
If you create your index as:
RelinkableHandle<YieldTermStructure> forecastHandle;
forecastHandle.linkTo(originalCurve);
ext::shared_ptr<IborIndex> index =
ext::make_shared<Euribor6M>(forecastHandle) // for instance: works with any
floating index
or the equivalent in Python:
forecastHandle = RelinkableYieldTermStructureHandle()
forecastHandle.linkTo(originalCurve)
index = Euribor6M(forecastHandle)
then, when you link the handle to a different curve with
forecastHandle.linkTo(newCurve);
the index will start using the new one for forecasting. If you used the
index to build a swap, the swap will start using the new curve too.
Luigi
On Tue, Jul 14, 2020 at 2:30 AM Philippe Hatstadt <
phi...@ex...> wrote:
> I think I know what is wrong. I do not set the floating rate index to be
> generated from each Hull-White curve but from the original curve, that has
> positive rates.
> So the question simply is this: Is there a way to change the curve used to
> generate the floating index in a swap, or is the only way to re-instantiate
> a new swap based on an index pointing to my path-dependent curve?
> I'd rather change the index and keep the same instance of my swap, but
> maybe that's not possible? Stated differently, is there the equivalent of a
> pricing engine for the floating index forecasting?
>
> Regards
>
> Philippe
>
>
> On Mon, Jul 13, 2020 at 5:56 AM Amine Ifri <ami...@gm...> wrote:
>
>> I use the C++ library and never had an issue with swap.fairRate(). It
>> gives me positive as well as negative values depending on the term
>> structures.
>>
>> As far as checking the CPP code, it looks correct to me. Do you mind
>> sharing the swap details you are trying to price/simulate?
>>
>> Amine
>>
>> On 12 Jul 2020, at 03:02, Philippe Hatstadt <
>> phi...@ex...> wrote:
>>
>> I'm using a Hull-White model to generate forward paths of the short rate,
>> from which I then build a discounting curve, from which I compute forward
>> swap values towards Monte-carlo integration of certain path dependent swap
>> rate linked derivatives. Here, I am looking at a 2y into 10y swaption, and
>> for each path, I want to calculate the forward swap rate and the swap NPV.
>> My problem is that I have a curve that has negative rates on a certain
>> path, the 2y into 10y forward swap.fairRate() function returns like 94bp.
>> Since all rates are negative, it's pretty clear that fairRate() should be
>> negative, and if I use the curve's discount factors and use the good old
>> approximation for the swap rate with the formula C/2 *
>> Sum_i(FixedLegDiscountFactor(i))/(1-DiscountFactor(TMat)) then I get the
>> correct -250bp forward swap rate (where i=1 to 20 corresponding to 20
>> forward semi-annual fixed payments).
>> So I am wondering if the swap cash flows do not work with negative rates
>> or else, but as it stands right now, the swap.fairRate() function doesn't
>> work at all. I also checked that by solving for the fixed rate that would
>> make the swap net cash-flows to be equal to zero, then I get the value
>> returned by swap.fairRate(). This would further indicate that the latter
>> function is correct, but that the cash flows are not. lastly, whether I
>> select a path with positive or negative forward rates, the cf.amount() is
>> always positive.
>> This is the code I use to generate the cash-flows:
>>
>> def swap_cash_flows(swap: ql.Swap,
>> crvh,
>> ):
>> output_list = []
>> for i, cf in enumerate(swap.leg(0)):
>> dt = cf.date()
>> dfact = crvh.discount(dt)
>> output_list.append(['leg0', cf.date(), dfact, cf.amount()])
>> for i, cf in enumerate(swap.leg(1)):
>> dt = cf.date()
>> dfact = crvh.discount(dt)
>> output_list.append(['leg1', cf.date(), dfact, cf.amount()])
>> df1 = pd.DataFrame(columns=['leg', 'cf_date', 'disc_fact', 'cf_amount'], data=output_list)
>> return df1
>>
>> The short-rate path corresponding to the curve handle crvh is as follows:
>> <image.png>
>> and lastly, this is the table of cash flows, dates and discount factors:
>> leg cf_date disc_fact cf_amount
>> leg0 2023-01-11 1.031727084 0.004717496
>> leg0 2023-07-11 1.044326706 0.004640581
>> leg0 2024-01-11 1.056475309 0.004717496
>> leg0 2024-07-11 1.067323978 0.004666219
>> leg0 2025-01-13 1.080208917 0.004768773
>> leg0 2025-07-11 1.095773345 0.004589303
>> leg0 2026-01-12 1.107358267 0.004743135
>> leg0 2026-07-13 1.119706713 0.004666219
>> leg0 2027-01-11 1.134937064 0.004666219
>> leg0 2027-07-12 1.148588556 0.004666219
>> leg0 2028-01-11 1.164662739 0.004691858
>> leg0 2028-07-11 1.184811281 0.004666219
>> leg0 2029-01-11 1.202933688 0.004717496
>> leg0 2029-07-11 1.22143445 0.004640581
>> leg0 2030-01-11 1.244698418 0.004717496
>> leg0 2030-07-11 1.268437607 0.004640581
>> leg0 2031-01-13 1.289269217 0.004768773
>> leg0 2031-07-11 1.310335034 0.004589303
>> leg0 2032-01-12 1.330460609 0.004743135
>> leg0 2032-07-12 1.351119197 0.004666219
>> leg1 2022-10-11 1.025077227 0.000595151
>> leg1 2023-01-11 1.031727084 0.000595151
>> leg1 2023-04-11 1.037740592 0.000582209
>> leg1 2023-07-11 1.044326706 0.00058868
>> leg1 2023-10-11 1.050712784 0.001151809
>> leg1 2024-01-11 1.056475309 0.001190658
>> leg1 2024-04-11 1.062040699 0.001177708
>> leg1 2024-07-11 1.067323978 0.001177708
>> leg1 2024-10-11 1.073341181 0.001190658
>> leg1 2025-01-13 1.080208917 0.001216557
>> leg1 2025-04-11 1.087963402 0.00113886
>> leg1 2025-07-11 1.095773345 0.001322081
>> leg1 2025-10-14 1.102080743 0.002477114
>> leg1 2026-01-12 1.107358267 0.002346587
>> leg1 2026-04-13 1.112978456 0.002372691
>> leg1 2026-07-13 1.119706713 0.002372691
>> leg1 2026-10-13 1.127732208 0.002398796
>> leg1 2027-01-11 1.134937064 0.002346587
>> leg1 2027-04-12 1.141923849 0.002372691
>> leg1 2027-07-12 1.148588556 0.002390753
>> leg1 2027-10-12 1.155929127 0.002537285
>> leg1 2028-01-11 1.164662739 0.002509671
>> leg1 2028-04-11 1.174741361 0.002509671
>> leg1 2028-07-11 1.184811281 0.002509671
>> leg1 2028-10-11 1.194083437 0.002537285
>> leg1 2029-01-11 1.202933688 0.002537285
>> leg1 2029-04-11 1.211815927 0.002482058
>> leg1 2029-07-11 1.22143445 0.002509671
>> leg1 2029-10-11 1.232822712 0.002537285
>> leg1 2030-01-11 1.244698418 0.002537285
>> leg1 2030-04-11 1.256926582 0.002482058
>> leg1 2030-07-11 1.268437607 0.003472659
>> leg1 2030-10-11 1.278474854 0.004092082
>> leg1 2031-01-13 1.289269217 0.004181226
>> leg1 2031-04-11 1.299839855 0.003914165
>> leg1 2031-07-11 1.310335034 0.004047153
>> leg1 2031-10-14 1.320633529 0.004225801
>> leg1 2032-01-12 1.330460609 0.004002946
>> leg1 2032-04-12 1.340898895 0.004047513
>> leg1 2032-07-12 1.351119197 0.004047513
>> Regards
>>
>> Philippe
>>
>>
>>
>> Brokerage services offered through Exos Securities LLC, member of SIPC
>> <http://www.sipc.org/> / FINRA <http://www.finra.org/>. For important
>> disclosures, click here <https://www.exosfinancial.com/disclosures>.
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>>
>>
>
>
> Brokerage services offered through Exos Securities LLC, member of SIPC
> <http://www.sipc.org/> / FINRA <http://www.finra.org/>. For important
> disclosures, click here <https://www.exosfinancial.com/disclosures>.
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Philippe H. <phi...@ex...> - 2020-07-14 00:27:44
|
I think I know what is wrong. I do not set the floating rate index to be generated from each Hull-White curve but from the original curve, that has positive rates. So the question simply is this: Is there a way to change the curve used to generate the floating index in a swap, or is the only way to re-instantiate a new swap based on an index pointing to my path-dependent curve? I'd rather change the index and keep the same instance of my swap, but maybe that's not possible? Stated differently, is there the equivalent of a pricing engine for the floating index forecasting? Regards Philippe On Mon, Jul 13, 2020 at 5:56 AM Amine Ifri <ami...@gm...> wrote: > I use the C++ library and never had an issue with swap.fairRate(). It > gives me positive as well as negative values depending on the term > structures. > > As far as checking the CPP code, it looks correct to me. Do you mind > sharing the swap details you are trying to price/simulate? > > Amine > > On 12 Jul 2020, at 03:02, Philippe Hatstadt < > phi...@ex...> wrote: > > I'm using a Hull-White model to generate forward paths of the short rate, > from which I then build a discounting curve, from which I compute forward > swap values towards Monte-carlo integration of certain path dependent swap > rate linked derivatives. Here, I am looking at a 2y into 10y swaption, and > for each path, I want to calculate the forward swap rate and the swap NPV. > My problem is that I have a curve that has negative rates on a certain > path, the 2y into 10y forward swap.fairRate() function returns like 94bp. > Since all rates are negative, it's pretty clear that fairRate() should be > negative, and if I use the curve's discount factors and use the good old > approximation for the swap rate with the formula C/2 * > Sum_i(FixedLegDiscountFactor(i))/(1-DiscountFactor(TMat)) then I get the > correct -250bp forward swap rate (where i=1 to 20 corresponding to 20 > forward semi-annual fixed payments). > So I am wondering if the swap cash flows do not work with negative rates > or else, but as it stands right now, the swap.fairRate() function doesn't > work at all. I also checked that by solving for the fixed rate that would > make the swap net cash-flows to be equal to zero, then I get the value > returned by swap.fairRate(). This would further indicate that the latter > function is correct, but that the cash flows are not. lastly, whether I > select a path with positive or negative forward rates, the cf.amount() is > always positive. > This is the code I use to generate the cash-flows: > > def swap_cash_flows(swap: ql.Swap, > crvh, > ): > output_list = [] > for i, cf in enumerate(swap.leg(0)): > dt = cf.date() > dfact = crvh.discount(dt) > output_list.append(['leg0', cf.date(), dfact, cf.amount()]) > for i, cf in enumerate(swap.leg(1)): > dt = cf.date() > dfact = crvh.discount(dt) > output_list.append(['leg1', cf.date(), dfact, cf.amount()]) > df1 = pd.DataFrame(columns=['leg', 'cf_date', 'disc_fact', 'cf_amount'], data=output_list) > return df1 > > The short-rate path corresponding to the curve handle crvh is as follows: > <image.png> > and lastly, this is the table of cash flows, dates and discount factors: > leg cf_date disc_fact cf_amount > leg0 2023-01-11 1.031727084 0.004717496 > leg0 2023-07-11 1.044326706 0.004640581 > leg0 2024-01-11 1.056475309 0.004717496 > leg0 2024-07-11 1.067323978 0.004666219 > leg0 2025-01-13 1.080208917 0.004768773 > leg0 2025-07-11 1.095773345 0.004589303 > leg0 2026-01-12 1.107358267 0.004743135 > leg0 2026-07-13 1.119706713 0.004666219 > leg0 2027-01-11 1.134937064 0.004666219 > leg0 2027-07-12 1.148588556 0.004666219 > leg0 2028-01-11 1.164662739 0.004691858 > leg0 2028-07-11 1.184811281 0.004666219 > leg0 2029-01-11 1.202933688 0.004717496 > leg0 2029-07-11 1.22143445 0.004640581 > leg0 2030-01-11 1.244698418 0.004717496 > leg0 2030-07-11 1.268437607 0.004640581 > leg0 2031-01-13 1.289269217 0.004768773 > leg0 2031-07-11 1.310335034 0.004589303 > leg0 2032-01-12 1.330460609 0.004743135 > leg0 2032-07-12 1.351119197 0.004666219 > leg1 2022-10-11 1.025077227 0.000595151 > leg1 2023-01-11 1.031727084 0.000595151 > leg1 2023-04-11 1.037740592 0.000582209 > leg1 2023-07-11 1.044326706 0.00058868 > leg1 2023-10-11 1.050712784 0.001151809 > leg1 2024-01-11 1.056475309 0.001190658 > leg1 2024-04-11 1.062040699 0.001177708 > leg1 2024-07-11 1.067323978 0.001177708 > leg1 2024-10-11 1.073341181 0.001190658 > leg1 2025-01-13 1.080208917 0.001216557 > leg1 2025-04-11 1.087963402 0.00113886 > leg1 2025-07-11 1.095773345 0.001322081 > leg1 2025-10-14 1.102080743 0.002477114 > leg1 2026-01-12 1.107358267 0.002346587 > leg1 2026-04-13 1.112978456 0.002372691 > leg1 2026-07-13 1.119706713 0.002372691 > leg1 2026-10-13 1.127732208 0.002398796 > leg1 2027-01-11 1.134937064 0.002346587 > leg1 2027-04-12 1.141923849 0.002372691 > leg1 2027-07-12 1.148588556 0.002390753 > leg1 2027-10-12 1.155929127 0.002537285 > leg1 2028-01-11 1.164662739 0.002509671 > leg1 2028-04-11 1.174741361 0.002509671 > leg1 2028-07-11 1.184811281 0.002509671 > leg1 2028-10-11 1.194083437 0.002537285 > leg1 2029-01-11 1.202933688 0.002537285 > leg1 2029-04-11 1.211815927 0.002482058 > leg1 2029-07-11 1.22143445 0.002509671 > leg1 2029-10-11 1.232822712 0.002537285 > leg1 2030-01-11 1.244698418 0.002537285 > leg1 2030-04-11 1.256926582 0.002482058 > leg1 2030-07-11 1.268437607 0.003472659 > leg1 2030-10-11 1.278474854 0.004092082 > leg1 2031-01-13 1.289269217 0.004181226 > leg1 2031-04-11 1.299839855 0.003914165 > leg1 2031-07-11 1.310335034 0.004047153 > leg1 2031-10-14 1.320633529 0.004225801 > leg1 2032-01-12 1.330460609 0.004002946 > leg1 2032-04-12 1.340898895 0.004047513 > leg1 2032-07-12 1.351119197 0.004047513 > Regards > > Philippe > > > > Brokerage services offered through Exos Securities LLC, member of SIPC > <http://www.sipc.org/> / FINRA <http://www.finra.org/>. For important > disclosures, click here <https://www.exosfinancial.com/disclosures>. > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > > -- Brokerage services offered through Exos Securities LLC, member of SIPC <http://www.sipc.org/> / FINRA <http://www.finra.org/>. For important disclosures, click here <https://www.exosfinancial.com/disclosures>. |