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
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jonathan S. <sw...@gm...> - 2023-03-26 22:54:15
|
Hi Rick, Unfortunately QuantLib is not that kind of quant finance library. As mentioned by Luigi[1], “the focus of the library is derivative pricing, not time-series analysis”. It should be possible for you to implement those indicators on top of the TimeSeries class, but it might be easier for you to find a different library or start from scratch. [1] https://github.com/lballabio/QuantLib/pull/1554#issuecomment-1459944617 2023년 3월 27일 (월) 04:08, Rick PT <ric...@gm...>님이 작성: > Good evening, > > I am new to QuantLib and I was looking for the basic indicators (SMA, RSI, > MACD, etc.) but I can't find anything with a simple : grep -riI "MACD" . > Are the implementations provided somewhere? > > Thank you, > Richard > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Rick PT <ric...@gm...> - 2023-03-26 19:05:38
|
Good evening, I am new to QuantLib and I was looking for the basic indicators (SMA, RSI, MACD, etc.) but I can't find anything with a simple : grep -riI "MACD" . Are the implementations provided somewhere? Thank you, Richard |
|
From: Luigi B. <lui...@gm...> - 2023-03-23 11:11:58
|
Hello,
I think the link you found is correct. The signature is different
because the parameter fnc was moved to the end of the list, and because in
our version we're supplying a second function jacFnc to supply the Jacobian
(instead of calculating it by finite differences like the Fortran version
does) but otherwise the implementation looks the same.
Luigi
On Fri, Mar 17, 2023 at 8:27 AM QuantLib JS <qua...@gm...> wrote:
> Hello, QuantLib Community
>
> Can someone please let me know the MINPACK source repo for:
>
> https://github.com/lballabio/QuantLib/blob/master/ql/math/optimization/lmdif.hpp
>
> https://github.com/lballabio/QuantLib/blob/master/ql/math/optimization/lmdif.cpp
>
> We need test cases to find bug in our javascript version
> <https://www.npmjs.com/package/minpack>
>
> I googled around and found this: https://github.com/fortran-lang/minpack
> , it has test cases, but the `lmdif` function signature is different.
>
> Thank you!
>
> Regards
> quantlib.js <https://quantlib.js.org/docs/>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Roland L. <rol...@ac...> - 2023-03-23 11:10:39
|
Hi all, This is an invitation to join us at our “Quant Summit” in London on the 20th of April. I am sure it will be an interesting day for all of us, there will be presentations and panels and a parallel stream in the afternoon where we focus on ORE demos for various cases, show the recent additions to ORE, discuss roadmap, all followed by a reception. Many folks from our Acadia quant team will be there including some you may know in the QuantLib community (Peter Caspers, Eric Ehlers). It would be great if you can make it and meet with like-minded! Best wishes and looking forward to seeing you in London, Roland [Image]<https://www.acadia.inc/quant-summit-london> Roland Lichters Quantitative Services [signature_3856760725] Maurenbrecherstrasse 16, 47803 Krefeld, Deutschland office +49 2151 9284800 mobile +49 172 9985795 www.acadia.inc<https://acadia.inc> [signature_3815476473]<https://www.youtube.com/channel/UCsMyFt94Jyfwo-ecLBpy5xw>[signature_3606592492]<https://twitter.com/AcadiaSoft_>[signature_4063566721]<https://www.linkedin.com/company/acadiasoft-inc> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. The acadia.inc privacy policy is available on our website. |
|
From: Luigi B. <lui...@gm...> - 2023-03-23 10:48:41
|
Hello everybody,
a question on the calculation of the year-on-year inflation fixings
used in the payoff of, say, year-on-year inflation swaps; specifically, the
interpolated case.
Let's say we have a coupon that needs the interpolated year-on-year
inflation for October 20th 2022.
The current implementation (see <
https://github.com/lballabio/QuantLib/blob/master/ql/indexes/inflationindex.cpp#L330-L356>)
does as follows:
- read the four relevant inflation fixings: October 2021, November 2021,
October 2022, November 2022;
- calculate an interpolated fixing F1 by interpolating October 2021 and
November 2021;
- calculate an interpolated fixing F2 by interpolating October 2022 and
November 2022;
- calculate the interpolated year-on-year performance as F2/F1 - 1.
Another possibility would be:
- read the four relevant inflation fixings: October 2021, November 2021,
October 2022, November 2022;
- calculate the October year-on-year performance as P1 = October
2022/October 2021 - 1;
- calculate the November year-on-year performance as P2 =
November 2022/November 2021 - 1;
- calculate the interpolated year-on-year performance by interpolating P1
and P2.
The two yield similar results but not identical.
To further confuse things, the equivalent of the second one is used (see <
https://github.com/lballabio/QuantLib/blob/master/ql/indexes/inflationindex.cpp#L376-L387>)
is the year-on-year performance is published, rather than calculated as a
ratio; in that case, we interpolate between the October-on-October and
November-on-November performances.
Can anybody confirm whether the current implementation correctly models the
payoff calculations in the real world, or the other one does instead?
Thanks a lot!
Luigi
|
|
From: Klaus S. <kl...@sp...> - 2023-03-22 20:59:49
|
Hi unfortunately no, it looks like it was overseen in the past to create the interfaces for these classes. I'll create a PR to add them. best regards Klaus On Montag, 20. März 2023 13:48:28 CET Majka Michal 0709 EH via QuantLib-users wrote: Hello, I am using the Python interface to QuantLib 1.29. * * I have an own implementation of the Local Volatility (LV) interpolator and I would like to use it within QuantLib. I would like to represent it as a dense grid with an interpolated LV surface for many tenors and strikes. The goal is to use the [SLV](https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#ql.HestonSLVProcess[1]) model and check how the calibration of the leverage function works. Regarding the Heston component of the SLV model: I also have my own calibration of the Heston model. When I use [ql.LocalVolSurface()](https://quantlib-python-docs.readthedocs.io/en/latest/termstructures.html#localvolsurface[2]) I cannot unfortunately replicate my own interpolator - there are slight differences in our implementations and thus it is not an option. But I know that I can replicate plain Vanillas very accurately in my setup with that interpolator. I can see two functions that should perfectly suit my needs: [fixedLocalVolSurface()](https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/volatility/equityfx/localvolsurface.cpp[3]) [gridmodellocalvolsurface()](https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/volatility/equityfx/gridmodellocalvolsurface.cpp[4]) Both functions are somehow not available in the Python interface. Is there a way to access those functions through the Python interface? Thank you very much in advance! -------- [1] https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#ql.HestonSLVProcess [2] https://quantlib-python-docs.readthedocs.io/en/latest/termstructures.html#localvolsurface [3] https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/volatility/equityfx/localvolsurface.cpp [4] https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/volatility/equityfx/gridmodellocalvolsurface.cpp |
|
From: Luigi B. <lui...@gm...> - 2023-03-20 14:32:08
|
Hello,
you're treating warnings as errors. You can change that flag.
To avoid the warning entirely, don't include <ql/quantlib.hpp> and use the
specific headers you need instead.
This said, I wouldn't trust ChatGPT too much. You should instantiate a
FixedRateBond, not FixedRateBondHelper.
Hope this helps,
Luigi
On Mon, Mar 20, 2023 at 1:08 AM Donghee Shim <dh7...@gm...> wrote:
> Hello, Quantlib Community !
>
> My simple code is
> https://github.com/ShimDonghee/Bond/blob/main/FixedRateBond22.cpp
>
> This code is generating FixedRateBond from BondHelper. GTP gave me this
> code for my request.
>
> But when I built this code with VS2022, error
> "\lib\QuantLib-1.29\ql\termstructures\yield\drifttermstructure.hpp(86,24):
> error C4996: 'QuantLib::DriftTermStructure': deprecated .." occurred.
>
> I don't use DriftTermStructure in this code.
>
> How can I fix it?
>
> Thanks!
>
> Best Regards
>
> Shim Donghee
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Majka M. 0. EH <Mic...@er...> - 2023-03-20 13:09:01
|
Hello, I am using the Python interface to QuantLib 1.29. I have an own implementation of the Local Volatility (LV) interpolator and I would like to use it within QuantLib. I would like to represent it as a dense grid with an interpolated LV surface for many tenors and strikes. The goal is to use the [SLV](https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#ql.HestonSLVProcess) model and check how the calibration of the leverage function works. Regarding the Heston component of the SLV model: I also have my own calibration of the Heston model. When I use [ql.LocalVolSurface()](https://quantlib-python-docs.readthedocs.io/en/latest/termstructures.html#localvolsurface) I cannot unfortunately replicate my own interpolator - there are slight differences in our implementations and thus it is not an option. But I know that I can replicate plain Vanillas very accurately in my setup with that interpolator. I can see two functions that should perfectly suit my needs: [fixedLocalVolSurface()](https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/volatility/equityfx/localvolsurface.cpp) [gridmodellocalvolsurface()](https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/volatility/equityfx/gridmodellocalvolsurface.cpp) Both functions are somehow not available in the Python interface. Is there a way to access those functions through the Python interface? Thank you very much in advance! |
|
From: Donghee S. <dh7...@gm...> - 2023-03-20 00:06:30
|
Hello, Quantlib Community ! My simple code is https://github.com/ShimDonghee/Bond/blob/main/FixedRateBond22.cpp This code is generating FixedRateBond from BondHelper. GTP gave me this code for my request. But when I built this code with VS2022, error "\lib\QuantLib-1.29\ql\termstructures\yield\drifttermstructure.hpp(86,24): error C4996: 'QuantLib::DriftTermStructure': deprecated .." occurred. I don't use DriftTermStructure in this code. How can I fix it? Thanks! Best Regards Shim Donghee |
|
From: Donghee S. <dh7...@gm...> - 2023-03-20 00:03:28
|
Hello, Quantlib Community ! My simple code is https://github.com/ShimDonghee/Bond/blob/main/FixedRateBond22.cpp This code is generating FixedRateBond from BondHelper. GTP gave me this code for my request. But when I built this code with VS2022, error "\lib\QuantLib-1.29\ql\termstructures\yield\drifttermstructure.hpp(86,24): error C4996: 'QuantLib::DriftTermStructure': deprecated .." occurred. I don't use DriftTermStructure in this code. How can I fix it? Thanks! Best Regards Shim Donghee |
|
From: Jonathan S. <sw...@gm...> - 2023-03-19 22:11:37
|
Hi Donghee, DriftTermStructure was deprecated in version 1.26 because it was apparently unused. If you check the source code[1], it says that you should copy it into your codebase if you need it. Probably ChatGPT was trained on older versions of the library, so I’d be a bit skeptical of its output. Is there anything particular in the Bonds example that you were looking for but didn’t find? [1] https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/yield/drifttermstructure.hpp 2023년 3월 19일 (일) 22:53, Donghee Shim <dh7...@gm...>님이 작성: > Hello, Quantlib Community! > > I'm a beginner for Quantlib, studied bonds example. GPT shows me the very > simple code for FixedRateBond example showing the case generating > FixedRateBond from BondHelper. as > https://shimdonghee-vigilant-adventure-7gvr4j9jvw43x9gq.github.dev/ . > When I built this code with VS 2022, error " > \QuantLib-1.29\ql\termstructures\yield\drifttermstructure.hpp(86,24): error > C4996: 'QuantLib::DriftTermStructure': deprecated " occurred. > I could not find command using this class. > How can I fix it? > > I'm very sorry for this novice question and thaank you in advance for your > time! > > Best Regards > > Shim Donghee > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Donghee S. <dh7...@gm...> - 2023-03-19 13:50:42
|
Hello, Quantlib Community! I'm a beginner for Quantlib, studied bonds example. GPT shows me the very simple code for FixedRateBond example showing the case generating FixedRateBond from BondHelper. as https://shimdonghee-vigilant-adventure-7gvr4j9jvw43x9gq.github.dev/ . When I built this code with VS 2022, error " \QuantLib-1.29\ql\termstructures\yield\drifttermstructure.hpp(86,24): error C4996: 'QuantLib::DriftTermStructure': deprecated " occurred. I could not find command using this class. How can I fix it? I'm very sorry for this novice question and thaank you in advance for your time! Best Regards Shim Donghee |
|
From: QuantLib JS <qua...@gm...> - 2023-03-17 07:25:17
|
Hello, QuantLib Community Can someone please let me know the MINPACK source repo for: https://github.com/lballabio/QuantLib/blob/master/ql/math/optimization/lmdif.hpp https://github.com/lballabio/QuantLib/blob/master/ql/math/optimization/lmdif.cpp We need test cases to find bug in our javascript version <https://www.npmjs.com/package/minpack> I googled around and found this: https://github.com/fortran-lang/minpack , it has test cases, but the `lmdif` function signature is different. Thank you! Regards quantlib.js <https://quantlib.js.org/docs/> |
|
From: Damiano P. <dap...@gm...> - 2023-03-08 17:25:27
|
Thanks a lot! Damiano On Fri, Mar 3, 2023 at 5:04 PM Trent Maetzold <tr...@ma...> wrote: > I coded up S45 this morning. I haven't built a curve that used FRAs before > so not sure about any peculiarities there as it seems the rates implied by > the FRAs are lagged or just plain off by 5 bps or so. If anyone figures out > the problem, feel free to open a PR on the below repo. Should be a good > starting point though. > > https://github.com/trentmaetzold/quantlib-examples/blob/main/curve_s45.py > > Trent > ------- Original Message ------- > On Friday, March 3rd, 2023 at 08:50, Luigi Ballabio < > lui...@gm...> wrote: > > Hello Damiano, > the Python wrappers automatically pass to the curve the `additionalErrors` > functor defined in listing 2 of the paper. You can see the code at < > https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/piecewiseyieldcurve.i#L143> > from line 143 until the end of that file. > > Hope this helps, > Luigi > > > On Sun, Feb 26, 2023 at 9:54 AM Damiano Peinetti <dap...@gm...> > wrote: > >> Hi, I'm trying to replicate the paper MATCHING THE BLOOMBERG CURVE S45 >> WITH QUANTLIB >> available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3640517 >> >> My problem is to translate the c++ code in Python, I looked at this >> example: >> >> https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/global-bootstrap.py >> >> but I have no clue on how to correctly implement the additionalErrors >> function (what is its return type, how I link the FraHelpers to the >> iteratively bootstrapped termstructure...). >> >> Could you help me with this? >> Thanks in advance, >> Damiano >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > > |
|
From: Donghee S. <dh7...@gm...> - 2023-03-07 05:01:00
|
I appreciate for your kind advice!!! I solved my problem . I have using the build, debugging for each examples!! Thanks again!!! On Tue, Mar 7, 2023 at 12:56 AM Luigi Ballabio <lui...@gm...> wrote: > Hello, > may you try > > cmake . -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL > cmake --build . --config Debug > > and see if you get QuantLib-mt-gd.lib? It should be possible to pass > either MultiThreaded or MultiThreadedDLL for the Release configuration, > or MultiThreadedDebug or MultiThreadedDebugDLL for the Debug configuration. > > Hope this helps, > Luigi > > > On Mon, Mar 6, 2023 at 1:25 AM 심동희 <dh6...@na...> wrote: > >> Hi! I'm using Visual Studio 2019 community version. Installed >> boostlib-1.81.0 (using e2.exe). also unsupressed Quantlib-1.29. >> I compiled using cmake in cmd (cmake . , cmake --build . --configure >> Release , cmake --install . --prefix ../lib at build folder of >> Quant-1.29). >> I got only 1 lib file QuantLib-x64-mt-s.lib. I also got every execution >> files of every examples .cpp files. >> I also configured both the include directory and the lib directory >> property of projects. When I built for bonds example, error >> "Quantlib-mt-gd.lib was not found" occurred. >> I tried 4 cases of combination Debug/Release, Win32/x64, errors >> Quantlib-x64-mt-gd.lib, Quantlib-mt.lib and Quantlib-x64-mt.lb were nor >> found occurred. >> How can I solve my problem? >> Please help me!!!! >> 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: Luigi B. <lui...@gm...> - 2023-03-06 15:54:49
|
Hello,
may you try
cmake . -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL
cmake --build . --config Debug
and see if you get QuantLib-mt-gd.lib? It should be possible to pass
either MultiThreaded or MultiThreadedDLL for the Release configuration,
or MultiThreadedDebug or MultiThreadedDebugDLL for the Debug configuration.
Hope this helps,
Luigi
On Mon, Mar 6, 2023 at 1:25 AM 심동희 <dh6...@na...> wrote:
> Hi! I'm using Visual Studio 2019 community version. Installed
> boostlib-1.81.0 (using e2.exe). also unsupressed Quantlib-1.29.
> I compiled using cmake in cmd (cmake . , cmake --build . --configure
> Release , cmake --install . --prefix ../lib at build folder of
> Quant-1.29).
> I got only 1 lib file QuantLib-x64-mt-s.lib. I also got every execution
> files of every examples .cpp files.
> I also configured both the include directory and the lib directory
> property of projects. When I built for bonds example, error
> "Quantlib-mt-gd.lib was not found" occurred.
> I tried 4 cases of combination Debug/Release, Win32/x64, errors
> Quantlib-x64-mt-gd.lib, Quantlib-mt.lib and Quantlib-x64-mt.lb were nor
> found occurred.
> How can I solve my problem?
> Please help me!!!!
> Thanks!!!
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Donghee S. <dh7...@gm...> - 2023-03-06 11:32:16
|
Hello experts! I'm using Visual Studio 2019 community version. Installed boostlib-1.81.0 (using e2.exe). also unsupressed Quantlib-1.29. I compiled using cmake in cmd (cmake . , cmake --build . --configure Release , cmake --install . --prefix ../lib at build folder of Quant-1.29). I got only 1 lib file QuantLib-x64-mt-s.lib. I also got every execution files of every examples .cpp files. I also configured both the include directory and the lib directory property of projects. When I built for bonds example, error "Quantlib-mt-gd.lib was not found" occurred. I tried 4 cases of combination Debug/Release, Win32/x64, errors Quantlib-x64-mt-gd.lib, Quantlib-mt.lib and Quantlib-x64-mt.lb were nor found occurred. How can I solve my problem? Please help me!!!! I apologize for the newbie question and thank you in advance for your time. |
|
From: 심동희 <dh6...@na...> - 2023-03-06 00:22:04
|
Hi! I'm using Visual Studio 2019 community version. Installed boostlib-1.81.0 (using e2.exe). also unsupressed Quantlib-1.29. I compiled using cmake in cmd (cmake . , cmake --build . --configure Release , cmake --install . --prefix ../lib at build folder of Quant-1.29). I got only 1 lib file QuantLib-x64-mt-s.lib. I also got every execution files of every examples .cpp files. I also configured both the include directory and the lib directory property of projects. When I built for bonds example, error "Quantlib-mt-gd.lib was not found" occurred. I tried 4 cases of combination Debug/Release, Win32/x64, errors Quantlib-x64-mt-gd.lib, Quantlib-mt.lib and Quantlib-x64-mt.lb were nor found occurred. How can I solve my problem? Please help me!!!! Thanks!!! |
|
From: Luigi B. <lui...@gm...> - 2023-03-04 09:10:47
|
I don't see how the implied volatility can even be defined in that case. When the option is expired, it's worth 0.0 for any value of the volatility, When it's not, it should be a very small number but never 0. You can try to set (a) a small value for the premium and (b) an evaluation date shortly before exercise. Luigi On Fri, Mar 3, 2023 at 9:15 PM Ashish Bansal <ash...@gm...> wrote: > Thanks Luigi. > > Could my issue be taken where the solver is not able to resolve for IV > where time value is 0.0? > > Not sure how CME option calculator is able to solve it. Could we add very > insignificant value like 0.00001 to market premium and then solve it > instead of error? > > Regards > Ashish > > On Fri, Mar 3, 2023, 9:17 PM Luigi Ballabio <lui...@gm...> > wrote: > >> Hello, >> this should be fixed by < >> https://github.com/lballabio/QuantLib/pull/1592>. It will be in release >> 1.30. >> >> Luigi >> >> On Tue, Dec 20, 2022 at 11:06 PM Elric StormBringer < >> elr...@gm...> wrote: >> >>> >>> I actually used the code below for a test-case (Up-and-Out Barrier >>> Option). I know the arguments to specify the trade is correct, because I >>> can get 'PV', and 'greeks'. But when I tried to get the 'Implied >>> Volatility', it fails with the following error : return _QuantLib. >>> BarrierOption_impliedVolatility(self, targetValue, process, accuracy, >>> maxEvaluations, minVol, maxVol) >>> >>> RuntimeError: root not bracketed: f[0.0001,4] -> [-nan(ind),1.127331e+01] >>> >>> >>> >>> Below is the python code : ...... Not sure if it is due to 'arguments' being insufficient, or the solver cannot solve for the Implied-vol, or something else. >>> >>> >>> # Import required library >>>> from QuantLib import * >>> >>> >>> # Barrier Option: Up-and-Out Call >>> # Strike 100, Barrier 150, Rebate 50, Exercise date 4 years >>> >>> #Set up the global evaluation date to today >>> today = Date(28,February,2020) >>> Settings.instance().evaluationDate = today >>> >>> # Specify option >>> # ql.BarrierOption(barrierType, barrier, rebate, payoff, exercise) >>> # the option below sets Up-and-Out barrier, with Barrier Level of 150, European Vanilla Call as the underlying payoff >>> # of European Call Strike and European Expiry date in exercise >>> option = BarrierOption(Barrier.UpOut, 150.0, 50.0, >>> PlainVanillaPayoff(Option.Call, 100.0), >>> EuropeanExercise(Date(29, February, 2024))) >>> >>> # We will now pass the market data: spot price : 100, risk-free rate: 1% and sigma: 30% >>> # Underlying Price >>> u = SimpleQuote(100) >>> # Risk-free Rate >>> r = SimpleQuote(0.01) >>> # Sigma >>> sigma = SimpleQuote(0.30) >>> >>> # Build flat curves and volatility >>> riskFreeCurve = FlatForward(0, TARGET(), QuoteHandle(r), Actual360()) >>> volatility = BlackConstantVol(0, TARGET(), QuoteHandle(sigma), Actual360()) >>> >>> # Build the pricing engine by encapsulating the market data in a Black-Scholes process >>> # Stochastic Process >>> process = BlackScholesProcess(QuoteHandle(u), >>> YieldTermStructureHandle(riskFreeCurve), >>> BlackVolTermStructureHandle(volatility)) >>> >>> # Build the engine (based on an analytic formula) and set it to the option for evaluation >>> option.setPricingEngine(AnalyticBarrierEngine(process)) >>> >>> # Change the market data to get new option pricing. >>> # Set initial value and define h >>> u0 = u.value(); h=0.01 >>> P0 = option.NPV() >>> print('the initial option price is', np.round(P0, 4)) >>> >>> # Bump up the price by h >>> u.setValue(u0+h) >>> P_plus = option.NPV() >>> print('the bumped up option price is', np.round(P_plus, 4)) >>> >>> # Bump down the price by h >>> u.setValue(u0-h) >>> P_minus = option.NPV() >>> print('the bumped down option price is', np.round(P_minus, 4), '\n') >>> >>> # Set the price back to its current value >>> u.setValue(u0) >>> >>> # Calculate Greeks: Delta, Gamma, Vega, Theta, Rho >>> delta = (P_plus - P_minus)/(2*h) >>> gamma = (P_plus - 2*P0 + P_minus)/(h*h) >>> >>> # Update quote for rho calculation >>> r0 = r.value(); h1 = 0.0001 >>> r.setValue(r0+h); P_plus = option.NPV() >>> r.setValue(r0) >>> >>> # Rho >>> rho = (P_plus - P0)/h1 >>> >>> # Update quote for sigma calculation >>> sigma0 = sigma.value() ; h = 0.0001 >>> sigma.setValue(sigma0+h) ; P_plus = option.NPV() >>> sigma.setValue(sigma0) >>> >>> # Vega >>> vega = (P_plus - P0)/h >>> >>> # Update quote to calculate theta >>> Settings.instance().evaluationDate = today+1 >>> P1 = option.NPV() >>> h = 1.0/365 >>> >>> # Theta >>> theta = (P1-P0)/h >>> >>> print(f'OptionPrice: {P0: .2f}, Delta: {delta: .2f}, Gamma: {gamma: .4f}, Theta: {theta: .2f}, \ >>> Vega: {vega: .2f}, Rho: {rho: .2f}') >>> >>> option.impliedVolatility(22.06, process) >>> >>> >>> --------- >>> >>> >>> >>> >>> On Fri, 2 Dec 2022 at 21:01, Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> Specific to IV, i didn't calculate IV for barriers so not sure. The IV >>>> is not implied for all the option types like for averaging options, it >>>> doesn't work. However, i do see the same being implemented for Barriers: >>>> >>>> https://github.com/lballabio/QuantLib/blob/2536f0e3db681f4cb8f4972f09d561e8f085b5ea/ql/instruments/barrieroption.cpp#L51 >>>> Volatility BarrierOption::impliedVolatility( >>>> Real targetValue, >>>> const ext::shared_ptr<GeneralizedBlackScholesProcess>& process, >>>> Real accuracy, >>>> Size maxEvaluations, >>>> Volatility minVol, >>>> Volatility maxVol) >>>> >>>> What error are you getting? Try to enter more arguments in it and try. >>>> >>>> Regards >>>> Ashish >>>> >>>> On Fri, 2 Dec 2022 at 17:15, Elric StormBringer < >>>> elr...@gm...> wrote: >>>> >>>>> thanks everyone, very grateful for all the helpful responses. >>>>> >>>>> perhaps to be a bit more clear; I was having problems with the FX >>>>> Touch Barrier Options >>>>> 1. When I specified the option is Vanilla European : option = >>>>> ql.VanillaOption(payoff, exercise) >>>>> -> using the option.impliedVolatility(premium, process) *** works *** >>>>> [see screenshot below[/ >>>>> >>>>> 2. But when I specify the product type to be anything else, it no >>>>> longer works, and I just get error messages... >>>>> -> so, is it we need more special arguments for non-European-Vanilla? >>>>> Or does the Implied Volatility work *** ONLY *** for European Vanilla >>>>> Options? >>>>> >>>>> [image: image.png] >>>>> >>>>> >>>>> >>>>> >>>>> [image: image.png] >>>>> >>>>> >>>>> On Fri, 2 Dec 2022 at 17:41, Ashish Bansal <ash...@gm...> >>>>> wrote: >>>>> >>>>>> Hi Elric, >>>>>> >>>>>> If you want a basic code for barrier then I wrote 1 in this thread: >>>>>> https://sourceforge.net/p/quantlib/mailman/message/37670218/ >>>>>> >>>>>> can also refer to the examples of barrier options in this test suite >>>>>> if you are comfortable with C++: >>>>>> >>>>>> https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp >>>>>> >>>>>> Thanks >>>>>> Ashish >>>>>> >>>>>> On Wed, 30 Nov 2022 at 18:21, Jonathan Sweemer <sw...@gm...> >>>>>> wrote: >>>>>> >>>>>>> Hi Kiann, >>>>>>> >>>>>>> I'm surprised that the error you're seeing isn't related to the >>>>>>> arguments you pass to BlackScholesProcess. You should be passing term >>>>>>> structure objects instead of numerical values. >>>>>>> >>>>>>> See these links for more information: >>>>>>> >>>>>>> 1. >>>>>>> https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#blackscholesprocess >>>>>>> 2. >>>>>>> https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/stochasticprocess.i#L116-L121 >>>>>>> 3. >>>>>>> https://stackoverflow.com/questions/4891490/calculating-europeanoptionimpliedvolatility-in-quantlib-python >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Nov 30, 2022 at 8:13 PM Elric StormBringer < >>>>>>> elr...@gm...> wrote: >>>>>>> >>>>>>>> Hi there, a noob using/investigationg QuantLib library via python. >>>>>>>> >>>>>>>> Great job there guys! >>>>>>>> >>>>>>>> I've been browsing the online documentation, but still having >>>>>>>> problem trying to find the 'arguments' and 'fields' inside each. >>>>>>>> For example, after I've defined the trade >>>>>>>> details/market-data/engine for : ql.BarrierOption.impliedVolatility >>>>>>>> -> I am trying to use .ImpliedVolatility. >>>>>>>> -> However, I am getting errors from my input fields >>>>>>>> : option_.impliedVolatility(0.01, ql.BlackScholesProcess(1.0, 0.0, 0.3)) >>>>>>>> >>>>>>>> Can I check, what are the syntax of the data-fields to be used? The >>>>>>>> error message is : impliedVolatility() missing 2 required >>>>>>>> positional arguments: 'targetValue' and 'process' >>>>>>>> >>>>>>>> Kind regards >>>>>>>> Kiann >>>>>>>> _______________________________________________ >>>>>>>> QuantLib-users mailing list >>>>>>>> Qua...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> QuantLib-users mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>>> >>>>>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Ashish B. <ash...@gm...> - 2023-03-03 20:16:57
|
Asking about this query in other thread On Sun, Dec 18, 2022, 6:15 PM Ashish Bansal <ash...@gm...> wrote: > Strangely i tried the CME option calculator online to gat IV for this kind > of option trading at intrinsic value. And still it gave some IV without any > errors with Black76 model too. Not sure how they do it. > > Ashish > > On Sun, Dec 18, 2022, 5:55 PM Jonathan Sweemer <sw...@gm...> wrote: > >> Hi Ashish, >> >> It makes sense that there would be no solution in the case where an >> option has no time value. I'm not sure what else QuantLib can do in this >> case except perhaps more informative error messages. >> >> You might want to survey the literature for ways of modeling this product >> outside of a Black-Scholes framework. >> >> On Sun, Dec 18, 2022 at 1:21 AM Ashish Bansal <ash...@gm...> >> wrote: >> >>> My message was not going due to the screenshots so sending again without >>> them. >>> >>> Please guide. >>> >>> Regards >>> Ashish >>> >>> On Sat, Dec 17, 2022, 1:03 AM Ashish Bansal <ash...@gm...> >>> wrote: >>> >>>> Hi all, any views here? >>>> >>>> On Tue, Dec 6, 2022, 10:15 PM Ashish Bansal <ash...@gm...> >>>> wrote: >>>> >>>>> Hi All, >>>>> >>>>> In 1 of the exchange traded option market I see strange behaviour >>>>> which is failing our quantlib code to value the options. The put options >>>>> for nearby month are trading only at the intrinsic value with exactly 0 >>>>> time value although a good 1 month is remaining in expiry which is 4th Jan >>>>> 2023. >>>>> Future quotes (underlying) as of 5th Dec: >>>>> >>>>> https://www.cmegroup.com/markets/agriculture/dairy/nonfat-dry-milk.quotes.html >>>>> >>>>> Option prices as of 5th Dec: >>>>> >>>>> https://www.cmegroup.com/markets/agriculture/dairy/nonfat-dry-milk.quotes.options.html#optionProductId=782&strikeRange=ALL&expiration=782-Z2 >>>>> >>>>> Time value in the above trading: 16.425 - Max(160 - 143.575,0) = 0 >>>>> >>>>> We are using the blackscholes engine with American option and using >>>>> option.impliedvolatility method to calculate the market implied volatility >>>>> for these options. For these options, we are getting runtime error as root >>>>> not bracketed error: >>>>> RuntimeError: root not bracketed: f[0.0001,4] -> >>>>> [6.394885e-14,5.818200e+01] >>>>> >>>>> How should we price these kinds of ITM options? >>>>> >>>>> Thanks >>>>> Ashish Bansal >>>>> >>>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Ashish B. <ash...@gm...> - 2023-03-03 20:15:55
|
Thanks Luigi. Could my issue be taken where the solver is not able to resolve for IV where time value is 0.0? Not sure how CME option calculator is able to solve it. Could we add very insignificant value like 0.00001 to market premium and then solve it instead of error? Regards Ashish On Fri, Mar 3, 2023, 9:17 PM Luigi Ballabio <lui...@gm...> wrote: > Hello, > this should be fixed by < > https://github.com/lballabio/QuantLib/pull/1592>. It will be in release > 1.30. > > Luigi > > On Tue, Dec 20, 2022 at 11:06 PM Elric StormBringer < > elr...@gm...> wrote: > >> >> I actually used the code below for a test-case (Up-and-Out Barrier >> Option). I know the arguments to specify the trade is correct, because I >> can get 'PV', and 'greeks'. But when I tried to get the 'Implied >> Volatility', it fails with the following error : return _QuantLib. >> BarrierOption_impliedVolatility(self, targetValue, process, accuracy, >> maxEvaluations, minVol, maxVol) >> >> RuntimeError: root not bracketed: f[0.0001,4] -> [-nan(ind),1.127331e+01] >> >> >> >> Below is the python code : ...... Not sure if it is due to 'arguments' being insufficient, or the solver cannot solve for the Implied-vol, or something else. >> >> >> # Import required library >>> from QuantLib import * >> >> >> # Barrier Option: Up-and-Out Call >> # Strike 100, Barrier 150, Rebate 50, Exercise date 4 years >> >> #Set up the global evaluation date to today >> today = Date(28,February,2020) >> Settings.instance().evaluationDate = today >> >> # Specify option >> # ql.BarrierOption(barrierType, barrier, rebate, payoff, exercise) >> # the option below sets Up-and-Out barrier, with Barrier Level of 150, European Vanilla Call as the underlying payoff >> # of European Call Strike and European Expiry date in exercise >> option = BarrierOption(Barrier.UpOut, 150.0, 50.0, >> PlainVanillaPayoff(Option.Call, 100.0), >> EuropeanExercise(Date(29, February, 2024))) >> >> # We will now pass the market data: spot price : 100, risk-free rate: 1% and sigma: 30% >> # Underlying Price >> u = SimpleQuote(100) >> # Risk-free Rate >> r = SimpleQuote(0.01) >> # Sigma >> sigma = SimpleQuote(0.30) >> >> # Build flat curves and volatility >> riskFreeCurve = FlatForward(0, TARGET(), QuoteHandle(r), Actual360()) >> volatility = BlackConstantVol(0, TARGET(), QuoteHandle(sigma), Actual360()) >> >> # Build the pricing engine by encapsulating the market data in a Black-Scholes process >> # Stochastic Process >> process = BlackScholesProcess(QuoteHandle(u), >> YieldTermStructureHandle(riskFreeCurve), >> BlackVolTermStructureHandle(volatility)) >> >> # Build the engine (based on an analytic formula) and set it to the option for evaluation >> option.setPricingEngine(AnalyticBarrierEngine(process)) >> >> # Change the market data to get new option pricing. >> # Set initial value and define h >> u0 = u.value(); h=0.01 >> P0 = option.NPV() >> print('the initial option price is', np.round(P0, 4)) >> >> # Bump up the price by h >> u.setValue(u0+h) >> P_plus = option.NPV() >> print('the bumped up option price is', np.round(P_plus, 4)) >> >> # Bump down the price by h >> u.setValue(u0-h) >> P_minus = option.NPV() >> print('the bumped down option price is', np.round(P_minus, 4), '\n') >> >> # Set the price back to its current value >> u.setValue(u0) >> >> # Calculate Greeks: Delta, Gamma, Vega, Theta, Rho >> delta = (P_plus - P_minus)/(2*h) >> gamma = (P_plus - 2*P0 + P_minus)/(h*h) >> >> # Update quote for rho calculation >> r0 = r.value(); h1 = 0.0001 >> r.setValue(r0+h); P_plus = option.NPV() >> r.setValue(r0) >> >> # Rho >> rho = (P_plus - P0)/h1 >> >> # Update quote for sigma calculation >> sigma0 = sigma.value() ; h = 0.0001 >> sigma.setValue(sigma0+h) ; P_plus = option.NPV() >> sigma.setValue(sigma0) >> >> # Vega >> vega = (P_plus - P0)/h >> >> # Update quote to calculate theta >> Settings.instance().evaluationDate = today+1 >> P1 = option.NPV() >> h = 1.0/365 >> >> # Theta >> theta = (P1-P0)/h >> >> print(f'OptionPrice: {P0: .2f}, Delta: {delta: .2f}, Gamma: {gamma: .4f}, Theta: {theta: .2f}, \ >> Vega: {vega: .2f}, Rho: {rho: .2f}') >> >> option.impliedVolatility(22.06, process) >> >> >> --------- >> >> >> >> >> On Fri, 2 Dec 2022 at 21:01, Ashish Bansal <ash...@gm...> >> wrote: >> >>> Specific to IV, i didn't calculate IV for barriers so not sure. The IV >>> is not implied for all the option types like for averaging options, it >>> doesn't work. However, i do see the same being implemented for Barriers: >>> >>> https://github.com/lballabio/QuantLib/blob/2536f0e3db681f4cb8f4972f09d561e8f085b5ea/ql/instruments/barrieroption.cpp#L51 >>> Volatility BarrierOption::impliedVolatility( >>> Real targetValue, >>> const ext::shared_ptr<GeneralizedBlackScholesProcess>& process, >>> Real accuracy, >>> Size maxEvaluations, >>> Volatility minVol, >>> Volatility maxVol) >>> >>> What error are you getting? Try to enter more arguments in it and try. >>> >>> Regards >>> Ashish >>> >>> On Fri, 2 Dec 2022 at 17:15, Elric StormBringer < >>> elr...@gm...> wrote: >>> >>>> thanks everyone, very grateful for all the helpful responses. >>>> >>>> perhaps to be a bit more clear; I was having problems with the FX Touch >>>> Barrier Options >>>> 1. When I specified the option is Vanilla European : option = >>>> ql.VanillaOption(payoff, exercise) >>>> -> using the option.impliedVolatility(premium, process) *** works *** >>>> [see screenshot below[/ >>>> >>>> 2. But when I specify the product type to be anything else, it no >>>> longer works, and I just get error messages... >>>> -> so, is it we need more special arguments for non-European-Vanilla? >>>> Or does the Implied Volatility work *** ONLY *** for European Vanilla >>>> Options? >>>> >>>> [image: image.png] >>>> >>>> >>>> >>>> >>>> [image: image.png] >>>> >>>> >>>> On Fri, 2 Dec 2022 at 17:41, Ashish Bansal <ash...@gm...> >>>> wrote: >>>> >>>>> Hi Elric, >>>>> >>>>> If you want a basic code for barrier then I wrote 1 in this thread: >>>>> https://sourceforge.net/p/quantlib/mailman/message/37670218/ >>>>> >>>>> can also refer to the examples of barrier options in this test suite >>>>> if you are comfortable with C++: >>>>> >>>>> https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp >>>>> >>>>> Thanks >>>>> Ashish >>>>> >>>>> On Wed, 30 Nov 2022 at 18:21, Jonathan Sweemer <sw...@gm...> >>>>> wrote: >>>>> >>>>>> Hi Kiann, >>>>>> >>>>>> I'm surprised that the error you're seeing isn't related to the >>>>>> arguments you pass to BlackScholesProcess. You should be passing term >>>>>> structure objects instead of numerical values. >>>>>> >>>>>> See these links for more information: >>>>>> >>>>>> 1. >>>>>> https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#blackscholesprocess >>>>>> 2. >>>>>> https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/stochasticprocess.i#L116-L121 >>>>>> 3. >>>>>> https://stackoverflow.com/questions/4891490/calculating-europeanoptionimpliedvolatility-in-quantlib-python >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Nov 30, 2022 at 8:13 PM Elric StormBringer < >>>>>> elr...@gm...> wrote: >>>>>> >>>>>>> Hi there, a noob using/investigationg QuantLib library via python. >>>>>>> >>>>>>> Great job there guys! >>>>>>> >>>>>>> I've been browsing the online documentation, but still having >>>>>>> problem trying to find the 'arguments' and 'fields' inside each. >>>>>>> For example, after I've defined the trade details/market-data/engine >>>>>>> for : ql.BarrierOption.impliedVolatility >>>>>>> -> I am trying to use .ImpliedVolatility. >>>>>>> -> However, I am getting errors from my input fields >>>>>>> : option_.impliedVolatility(0.01, ql.BlackScholesProcess(1.0, 0.0, 0.3)) >>>>>>> >>>>>>> Can I check, what are the syntax of the data-fields to be used? The >>>>>>> error message is : impliedVolatility() missing 2 required >>>>>>> positional arguments: 'targetValue' and 'process' >>>>>>> >>>>>>> Kind regards >>>>>>> Kiann >>>>>>> _______________________________________________ >>>>>>> QuantLib-users mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>>> >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>>>> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Trent M. <tr...@ma...> - 2023-03-03 16:21:56
|
I coded up S45 this morning. I haven't built a curve that used FRAs before so not sure about any peculiarities there as it seems the rates implied by the FRAs are lagged or just plain off by 5 bps or so. If anyone figures out the problem, feel free to open a PR on the below repo. Should be a good starting point though. https://github.com/trentmaetzold/quantlib-examples/blob/main/curve_s45.py Trent ------- Original Message ------- On Friday, March 3rd, 2023 at 08:50, Luigi Ballabio <lui...@gm...> wrote: > Hello Damiano, > the Python wrappers automatically pass to the curve the `additionalErrors` functor defined in listing 2 of the paper. You can see the code at <https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/piecewiseyieldcurve.i#L143> from line 143 until the end of that file. > > Hope this helps, > Luigi > > On Sun, Feb 26, 2023 at 9:54 AM Damiano Peinetti <dap...@gm...> wrote: > >> Hi, I'm trying to replicate the paper MATCHING THE BLOOMBERG CURVE S45 WITH QUANTLIB >> available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3640517 >> >> My problem is to translate the c++ code in Python, I looked at this example: >> https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/global-bootstrap.py >> >> but I have no clue on how to correctly implement the additionalErrors function (what is its return type, how I link the FraHelpers to the iteratively bootstrapped termstructure...). >> >> Could you help me with this? >> Thanks in advance, >> Damiano >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Luigi B. <lui...@gm...> - 2023-03-03 15:47:10
|
Hello,
this should be fixed by <https://github.com/lballabio/QuantLib/pull/1592>.
It will be in release 1.30.
Luigi
On Tue, Dec 20, 2022 at 11:06 PM Elric StormBringer <
elr...@gm...> wrote:
>
> I actually used the code below for a test-case (Up-and-Out Barrier
> Option). I know the arguments to specify the trade is correct, because I
> can get 'PV', and 'greeks'. But when I tried to get the 'Implied
> Volatility', it fails with the following error : return _QuantLib.
> BarrierOption_impliedVolatility(self, targetValue, process, accuracy,
> maxEvaluations, minVol, maxVol)
>
> RuntimeError: root not bracketed: f[0.0001,4] -> [-nan(ind),1.127331e+01]
>
>
>
> Below is the python code : ...... Not sure if it is due to 'arguments' being insufficient, or the solver cannot solve for the Implied-vol, or something else.
>
>
> # Import required library
>> from QuantLib import *
>
>
> # Barrier Option: Up-and-Out Call
> # Strike 100, Barrier 150, Rebate 50, Exercise date 4 years
>
> #Set up the global evaluation date to today
> today = Date(28,February,2020)
> Settings.instance().evaluationDate = today
>
> # Specify option
> # ql.BarrierOption(barrierType, barrier, rebate, payoff, exercise)
> # the option below sets Up-and-Out barrier, with Barrier Level of 150, European Vanilla Call as the underlying payoff
> # of European Call Strike and European Expiry date in exercise
> option = BarrierOption(Barrier.UpOut, 150.0, 50.0,
> PlainVanillaPayoff(Option.Call, 100.0),
> EuropeanExercise(Date(29, February, 2024)))
>
> # We will now pass the market data: spot price : 100, risk-free rate: 1% and sigma: 30%
> # Underlying Price
> u = SimpleQuote(100)
> # Risk-free Rate
> r = SimpleQuote(0.01)
> # Sigma
> sigma = SimpleQuote(0.30)
>
> # Build flat curves and volatility
> riskFreeCurve = FlatForward(0, TARGET(), QuoteHandle(r), Actual360())
> volatility = BlackConstantVol(0, TARGET(), QuoteHandle(sigma), Actual360())
>
> # Build the pricing engine by encapsulating the market data in a Black-Scholes process
> # Stochastic Process
> process = BlackScholesProcess(QuoteHandle(u),
> YieldTermStructureHandle(riskFreeCurve),
> BlackVolTermStructureHandle(volatility))
>
> # Build the engine (based on an analytic formula) and set it to the option for evaluation
> option.setPricingEngine(AnalyticBarrierEngine(process))
>
> # Change the market data to get new option pricing.
> # Set initial value and define h
> u0 = u.value(); h=0.01
> P0 = option.NPV()
> print('the initial option price is', np.round(P0, 4))
>
> # Bump up the price by h
> u.setValue(u0+h)
> P_plus = option.NPV()
> print('the bumped up option price is', np.round(P_plus, 4))
>
> # Bump down the price by h
> u.setValue(u0-h)
> P_minus = option.NPV()
> print('the bumped down option price is', np.round(P_minus, 4), '\n')
>
> # Set the price back to its current value
> u.setValue(u0)
>
> # Calculate Greeks: Delta, Gamma, Vega, Theta, Rho
> delta = (P_plus - P_minus)/(2*h)
> gamma = (P_plus - 2*P0 + P_minus)/(h*h)
>
> # Update quote for rho calculation
> r0 = r.value(); h1 = 0.0001
> r.setValue(r0+h); P_plus = option.NPV()
> r.setValue(r0)
>
> # Rho
> rho = (P_plus - P0)/h1
>
> # Update quote for sigma calculation
> sigma0 = sigma.value() ; h = 0.0001
> sigma.setValue(sigma0+h) ; P_plus = option.NPV()
> sigma.setValue(sigma0)
>
> # Vega
> vega = (P_plus - P0)/h
>
> # Update quote to calculate theta
> Settings.instance().evaluationDate = today+1
> P1 = option.NPV()
> h = 1.0/365
>
> # Theta
> theta = (P1-P0)/h
>
> print(f'OptionPrice: {P0: .2f}, Delta: {delta: .2f}, Gamma: {gamma: .4f}, Theta: {theta: .2f}, \
> Vega: {vega: .2f}, Rho: {rho: .2f}')
>
> option.impliedVolatility(22.06, process)
>
>
> ---------
>
>
>
>
> On Fri, 2 Dec 2022 at 21:01, Ashish Bansal <ash...@gm...>
> wrote:
>
>> Specific to IV, i didn't calculate IV for barriers so not sure. The IV is
>> not implied for all the option types like for averaging options, it doesn't
>> work. However, i do see the same being implemented for Barriers:
>>
>> https://github.com/lballabio/QuantLib/blob/2536f0e3db681f4cb8f4972f09d561e8f085b5ea/ql/instruments/barrieroption.cpp#L51
>> Volatility BarrierOption::impliedVolatility(
>> Real targetValue,
>> const ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
>> Real accuracy,
>> Size maxEvaluations,
>> Volatility minVol,
>> Volatility maxVol)
>>
>> What error are you getting? Try to enter more arguments in it and try.
>>
>> Regards
>> Ashish
>>
>> On Fri, 2 Dec 2022 at 17:15, Elric StormBringer <
>> elr...@gm...> wrote:
>>
>>> thanks everyone, very grateful for all the helpful responses.
>>>
>>> perhaps to be a bit more clear; I was having problems with the FX Touch
>>> Barrier Options
>>> 1. When I specified the option is Vanilla European : option =
>>> ql.VanillaOption(payoff, exercise)
>>> -> using the option.impliedVolatility(premium, process) *** works ***
>>> [see screenshot below[/
>>>
>>> 2. But when I specify the product type to be anything else, it no longer
>>> works, and I just get error messages...
>>> -> so, is it we need more special arguments for non-European-Vanilla? Or
>>> does the Implied Volatility work *** ONLY *** for European Vanilla Options?
>>>
>>> [image: image.png]
>>>
>>>
>>>
>>>
>>> [image: image.png]
>>>
>>>
>>> On Fri, 2 Dec 2022 at 17:41, Ashish Bansal <ash...@gm...>
>>> wrote:
>>>
>>>> Hi Elric,
>>>>
>>>> If you want a basic code for barrier then I wrote 1 in this thread:
>>>> https://sourceforge.net/p/quantlib/mailman/message/37670218/
>>>>
>>>> can also refer to the examples of barrier options in this test suite if
>>>> you are comfortable with C++:
>>>>
>>>> https://github.com/lballabio/QuantLib/blob/master/test-suite/barrieroption.cpp
>>>>
>>>> Thanks
>>>> Ashish
>>>>
>>>> On Wed, 30 Nov 2022 at 18:21, Jonathan Sweemer <sw...@gm...>
>>>> wrote:
>>>>
>>>>> Hi Kiann,
>>>>>
>>>>> I'm surprised that the error you're seeing isn't related to the
>>>>> arguments you pass to BlackScholesProcess. You should be passing term
>>>>> structure objects instead of numerical values.
>>>>>
>>>>> See these links for more information:
>>>>>
>>>>> 1.
>>>>> https://quantlib-python-docs.readthedocs.io/en/latest/stochastic_processes.html#blackscholesprocess
>>>>> 2.
>>>>> https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/stochasticprocess.i#L116-L121
>>>>> 3.
>>>>> https://stackoverflow.com/questions/4891490/calculating-europeanoptionimpliedvolatility-in-quantlib-python
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Nov 30, 2022 at 8:13 PM Elric StormBringer <
>>>>> elr...@gm...> wrote:
>>>>>
>>>>>> Hi there, a noob using/investigationg QuantLib library via python.
>>>>>>
>>>>>> Great job there guys!
>>>>>>
>>>>>> I've been browsing the online documentation, but still having problem
>>>>>> trying to find the 'arguments' and 'fields' inside each.
>>>>>> For example, after I've defined the trade details/market-data/engine
>>>>>> for : ql.BarrierOption.impliedVolatility
>>>>>> -> I am trying to use .ImpliedVolatility.
>>>>>> -> However, I am getting errors from my input fields
>>>>>> : option_.impliedVolatility(0.01, ql.BlackScholesProcess(1.0, 0.0, 0.3))
>>>>>>
>>>>>> Can I check, what are the syntax of the data-fields to be used? The
>>>>>> error message is : impliedVolatility() missing 2 required positional
>>>>>> arguments: 'targetValue' and 'process'
>>>>>>
>>>>>> Kind regards
>>>>>> Kiann
>>>>>> _______________________________________________
>>>>>> QuantLib-users mailing list
>>>>>> Qua...@li...
>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>>>>
>>>>> _______________________________________________
>>>>> QuantLib-users mailing list
>>>>> Qua...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>>>
>>>> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2023-03-03 14:50:46
|
Hello Damiano,
the Python wrappers automatically pass to the curve the
`additionalErrors` functor defined in listing 2 of the paper. You can see
the code at <
https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/piecewiseyieldcurve.i#L143>
from line 143 until the end of that file.
Hope this helps,
Luigi
On Sun, Feb 26, 2023 at 9:54 AM Damiano Peinetti <dap...@gm...>
wrote:
> Hi, I'm trying to replicate the paper MATCHING THE BLOOMBERG CURVE S45
> WITH QUANTLIB
> available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3640517
>
> My problem is to translate the c++ code in Python, I looked at this
> example:
>
> https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/global-bootstrap.py
>
> but I have no clue on how to correctly implement the additionalErrors
> function (what is its return type, how I link the FraHelpers to the
> iteratively bootstrapped termstructure...).
>
> Could you help me with this?
> Thanks in advance,
> Damiano
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Hristo R. <hri...@gm...> - 2023-03-03 09:28:20
|
Hi, I'm trying to value callable bonds with Quantlib for Python using Hull White model and TreeCallable engine. model = ql.HullWhite(tts_handle, mean_reversion, volatility) engine = ql.TreeCallableFixedRateBondEngine(model, grid_points) I saw that default parameters for mean reversion and volatility are a=0.1, sigma=0.01. My question is in what terms is volatility/sigma expected as input? Is it in terms of absolute basis points value or in terms of percent of some rate? Does sigma of 0.01 mean standard deviation per year of 100bps? For example let say rate is 0.04(4%) and at valuation point it will go up/down with 100bps in absolute value to 0.05 (5%) / 0.03 (3%). Or rate will increase / decrease by sigma(0.01) percent of the rate 0.04 +/- 0.04*0.01 = 0.04 (4%) +/- 0.0004 (4bps)? |