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: Esteban L. A. B. <est...@ho...> - 2024-04-25 18:34:25
|
I'm having trouble getting the same nodes when evaluating Fair Rates for a Mexican TIIE swap. I think my problem is in the MXNOIS curve creation, but I'm not sure. For evaluating, I am creating the MXNOIS curve using both USDOIS curve and USDSOFR curve. ¿Does Anyone know where the problem is? I will attach the python file (in .txt extension) The output is: Input for 1 Tenor: 11.245 Calculated 1 Tenor: 11.244857 Input for 3 Tenor: 11.23025 Calculated 3 Tenor: 11.229588 Input for 6 Tenor: 11.165 Calculated 6 Tenor: 11.163458 Input for 9 Tenor: 11.065 Calculated 9 Tenor: 11.063222 Input for 13 Tenor: 10.935 Calculated 13 Tenor: 10.932736 Input for 26 Tenor: 10.42005 Calculated 26 Tenor: 10.41593 Input for 39 Tenor: 10.025 Calculated 39 Tenor: 10.020654 Input for 52 Tenor: 9.78005 Calculated 52 Tenor: 9.775265 Input for 65 Tenor: 9.640125 Calculated 65 Tenor: 9.635103 Input for 91 Tenor: 9.52005 Calculated 91 Tenor: 9.515049 Input for 130 Tenor: 9.489 Calculated 130 Tenor: 9.48471 Input for 195 Tenor: 9.54 Calculated 195 Tenor: 9.537698 Input for 260 Tenor: 9.543 Calculated 260 Tenor: 9.541035 Input for 390 Tenor: 9.5305 Calculated 390 Tenor: 9.528793 Only the first Tenors are close to the input ones. Thank you for your insights in this issue. Esteban |
|
From: Luigi B. <lui...@gm...> - 2024-04-24 08:49:52
|
QuantLib 1.34 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>. If you have any problems with this release, please report them here on the QuantLib mailing list (<qua...@li...>), or open a GitHub issue at <https://github.com/lballabio/quantlib/issues>. Starting from release 1.32, a semi-official C# package is also available from NuGet (see <https://www.nuget.org/packages/QuantLib/>). It should work on Windows and OS X, but it's not guaranteed to work on all Linux distributions; we'll be grateful for any reports, either of successes or failures. |
|
From: Klaus S. <kl...@sp...> - 2024-04-22 17:43:33
|
Hi it is the American feature, which forces you to use PDE solver, which are too slow for calibration purposes. Maybe you can translate the Amercian option problem into a European option problem by calculating effective European vols and calibrate to those? best regards Klaus On Freitag, 12. April 2024 14:30:10 CEST Po TheBigFatPanda wrote: > Thank you, Klaus. > > Do you suggest sticking with Heston (or some variation of that without the > jump) for calibration purpose? > > Btw, I am reading your blog posts on hpcquantlib. Very well written, thank > you! > > Regards. > > On Fri, Apr 12, 2024 at 1:06 AM Klaus Spanderen <kl...@sp...> wrote: > > > Hi > > > > You have to use the PIDE engine FdBatesVanillaEngine to price American > > options under the Bates model. This engines solve the partial integro > > differential equation and hence is slow, so unless you have a really > > computer at hand and spend some time on parallelization IMO it might be too > > slow for calibrate purposes. > > > > best regards > > Klaus > > > > On Donnerstag, 11. April 2024 00:30:06 CEST Po TheBigFatPanda wrote: > > > Hello QL users, > > > > > > I am new to QuantLib. I am trying to calibrate equity vol surface with > > > short maturity american options. I am considering the Bates model. Is > > there > > > any existing implementation in QL that can price American options under > > > Bates or similar model (stochastic vol + jump)? > > > > > > Thanks, > > > Po > > > > > > P.S. Huge thanks to Luigi and all other contributors. Kudos! > > > > > > > > > > > > > > |
|
From: kmylonakis <kmy...@pr...> - 2024-04-22 12:54:35
|
Hello everyone, I have a question regarding Bootstrapping after the Ibor transition. It is not directly linked to Quantlib ussage per se , but I give it a try since according to the terms of the mailing list "Topics about quantitative finance in general are also accepted". Feel free to let me know if this is out of order :) According to our data vendor, the EUR swaps delivered to us are still based on Euribor since EMMI is still maintaining the index (probably indefinetely), while the USD swaps are already assuming the fallback rates (i.e. SOFR + spread). Does that mean that we can already bootstrap USD in a single-curve framework as in reality only SOFR now is relevant? Also the basis spread will only be dictated by the compounding and predefined spread for each fallback case? Is there a paper that discuss the above topic? Thank you very much in advance, Kostas |
|
From: Luigi B. <lui...@gm...> - 2024-04-21 12:15:33
|
Thanks! On Sat, Apr 20, 2024 at 11:04 PM Dirk Eddelbuettel <ed...@de...> wrote: > > QuantLib 1.34-rc is now also in Debian experimental, and in my PPA as a > build > for Ubuntu 23.10 for those who run this. > > No issues to report so I should have Debian builds right after the release. > > Dirk > > -- > dirk.eddelbuettel.com | @eddelbuettel | ed...@de... > |
|
From: Dirk E. <ed...@de...> - 2024-04-20 21:45:49
|
QuantLib 1.34-rc is now also in Debian experimental, and in my PPA as a build for Ubuntu 23.10 for those who run this. No issues to report so I should have Debian builds right after the release. Dirk -- dirk.eddelbuettel.com | @eddelbuettel | ed...@de... |
|
From: Michael (D. portal) <mi...@da...> - 2024-04-20 16:51:09
|
Hi Luigi: Thank you for getting back to me! What is the most efficient way to do Monte Carlo simulations in QuantLib when I need to obtain multiple paths of yield curves for different scenarios (they do not have to be vectors of DFs but could be FRAs or any other rate metrics)? Thanks, Michael On Sat, Apr 20, 2024 at 10:59 AM Luigi Ballabio <lui...@gm...> wrote: > Hello Michael, > no, I'm afraid vector methods are not available. > > Luigi > > > On Sun, Apr 14, 2024 at 8:30 PM Michael (DataDriven portal) < > mi...@da...> wrote: > >> Hi All, >> >> I am using a *discount* method on a curve to get a discount factor for a >> given maturity (like in shown in the Cookbook below). But I need to output >> discount factors for all monthly cash flows of a bond (in my case 360 cash >> flows) so it is time consuming to call the *discount* method 360 times. >> >> Is there a way to get all discount factors (for all cash flows - 360 in >> my case) in a single call to a curve by passing all maturity dates (e.g. in >> a list) to speed up the calculations? >> >> Thanks, >> >> Michael >> >> [image: image.png] >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2024-04-20 14:59:25
|
Hello Michael,
no, I'm afraid vector methods are not available.
Luigi
On Sun, Apr 14, 2024 at 8:30 PM Michael (DataDriven portal) <
mi...@da...> wrote:
> Hi All,
>
> I am using a *discount* method on a curve to get a discount factor for a
> given maturity (like in shown in the Cookbook below). But I need to output
> discount factors for all monthly cash flows of a bond (in my case 360 cash
> flows) so it is time consuming to call the *discount* method 360 times.
>
> Is there a way to get all discount factors (for all cash flows - 360 in my
> case) in a single call to a curve by passing all maturity dates (e.g. in a
> list) to speed up the calculations?
>
> Thanks,
>
> Michael
>
> [image: image.png]
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2024-04-18 06:59:41
|
Prerelease Python wheels are also available from TestPyPi; use
pip install -i https://test.pypi.org/simple/ QuantLib==1.34rc0
There is also an experimental, no-guarantees nupkg for C#; see
https://int.nugettest.org/packages/QuantLib/1.34.0-rc for info.
Luigi
On Wed, Apr 17, 2024 at 2:44 PM Luigi Ballabio <lui...@gm...>
wrote:
> Hello everybody,
> I just published a release candidate for 1.33 at <
> https://github.com/lballabio/QuantLib/releases/tag/1.34rc>. If you have
> some time, please try them out and report any problems here. Thanks!
>
> Luigi
>
>
|
|
From: Luigi B. <lui...@gm...> - 2024-04-17 12:44:50
|
Hello everybody,
I just published a release candidate for 1.33 at <
https://github.com/lballabio/QuantLib/releases/tag/1.34rc>. If you have
some time, please try them out and report any problems here. Thanks!
Luigi
|
|
From: K Y <mad...@gm...> - 2024-04-16 09:09:21
|
Hi Ming, I have replied to you personally, but thank you again. I was able to do it with the G2 model based on the chapter you taught me. With regards. 2024年4月16日(火) 17:46 Ming <wof...@gm...>: > > Hi Kiichi, > > In the chapter 17 of Quantlib Python cookbook, there is an example about Hull-White model calibration. We can provide a list of boolean with constraints to determine which parameter is constrained and the other is not constrained. I think you can have a try on G2 model too. > > ________________________________ > wof...@gm... > > > From: K Y > Date: 2024-04-15 14:22 > To: quantlib-users > Subject: [Quantlib-users] Calibration of short-rate models with some parameters fixed > Hi all, > > When calibrating a short rate model, say a G2 model, is there a way to > fix some parameters to specific values and calibrate only the > remaining parameters? > I have asked this same question before, but I am not confident that I > communicated it well, so I will ask it again. > > Thank you, > Kiichi > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Ming <wof...@gm...> - 2024-04-16 08:46:30
|
Hi Kiichi, In the chapter 17 of Quantlib Python cookbook, there is an example about Hull-White model calibration. We can provide a list of boolean with constraints to determine which parameter is constrained and the other is not constrained. I think you can have a try on G2 model too. wof...@gm... From: K Y Date: 2024-04-15 14:22 To: quantlib-users Subject: [Quantlib-users] Calibration of short-rate models with some parameters fixed Hi all, When calibrating a short rate model, say a G2 model, is there a way to fix some parameters to specific values and calibrate only the remaining parameters? I have asked this same question before, but I am not confident that I communicated it well, so I will ask it again. Thank you, Kiichi _______________________________________________ QuantLib-users mailing list Qua...@li... https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: K Y <mad...@gm...> - 2024-04-15 06:22:30
|
Hi all, When calibrating a short rate model, say a G2 model, is there a way to fix some parameters to specific values and calibrate only the remaining parameters? I have asked this same question before, but I am not confident that I communicated it well, so I will ask it again. Thank you, Kiichi |
|
From: Michael (D. portal) <mi...@da...> - 2024-04-14 18:27:01
|
Hi All, I am using a *discount* method on a curve to get a discount factor for a given maturity (like in shown in the Cookbook below). But I need to output discount factors for all monthly cash flows of a bond (in my case 360 cash flows) so it is time consuming to call the *discount* method 360 times. Is there a way to get all discount factors (for all cash flows - 360 in my case) in a single call to a curve by passing all maturity dates (e.g. in a list) to speed up the calculations? Thanks, Michael [image: image.png] |
|
From: Po T. <pot...@gm...> - 2024-04-12 12:30:28
|
Thank you, Klaus. Do you suggest sticking with Heston (or some variation of that without the jump) for calibration purpose? Btw, I am reading your blog posts on hpcquantlib. Very well written, thank you! Regards. On Fri, Apr 12, 2024 at 1:06 AM Klaus Spanderen <kl...@sp...> wrote: > Hi > > You have to use the PIDE engine FdBatesVanillaEngine to price American > options under the Bates model. This engines solve the partial integro > differential equation and hence is slow, so unless you have a really > computer at hand and spend some time on parallelization IMO it might be too > slow for calibrate purposes. > > best regards > Klaus > > On Donnerstag, 11. April 2024 00:30:06 CEST Po TheBigFatPanda wrote: > > Hello QL users, > > > > I am new to QuantLib. I am trying to calibrate equity vol surface with > > short maturity american options. I am considering the Bates model. Is > there > > any existing implementation in QL that can price American options under > > Bates or similar model (stochastic vol + jump)? > > > > Thanks, > > Po > > > > P.S. Huge thanks to Luigi and all other contributors. Kudos! > > > > > > > |
|
From: Klaus S. <kl...@sp...> - 2024-04-12 05:18:31
|
Hi You have to use the PIDE engine FdBatesVanillaEngine to price American options under the Bates model. This engines solve the partial integro differential equation and hence is slow, so unless you have a really computer at hand and spend some time on parallelization IMO it might be too slow for calibrate purposes. best regards Klaus On Donnerstag, 11. April 2024 00:30:06 CEST Po TheBigFatPanda wrote: > Hello QL users, > > I am new to QuantLib. I am trying to calibrate equity vol surface with > short maturity american options. I am considering the Bates model. Is there > any existing implementation in QL that can price American options under > Bates or similar model (stochastic vol + jump)? > > Thanks, > Po > > P.S. Huge thanks to Luigi and all other contributors. Kudos! > |
|
From: Jorg L. <jor...@xc...> - 2024-04-11 11:07:23
|
Dear Community, Thank you for your active participation and the numerous questions following our QuantLib-Risks announcement ( https://auto-differentiation.github.io/quantlib-risks/). We have addressed each inquiry individually and will continue to do so. For broader support, we have established an FAQ page that compiles essential responses and information, accessible at: https://auto-differentiation.github.io/faq/. This resource will continuously be updated with new content and answers to additional questions. Furthermore, we invite you to share your experiences or challenges on GitHub, fostering a collaborative environment for innovation - either through direct contributions or by engaging in discussions: https://github.com/auto-differentiation/xad/discussions. Grasping the intricacies of automatic differentiation and its application, especially in large code bases within quantitative finance, can be challenging. That's why, for the past ten years, we've provided a comprehensive two-day training course available both online and in person. This course is tailored to demystify complex retrofitting techniques for large-scale financial software for a broad range of skills and interests. It is enriched by years of experience and valuable feedback from participants such as yourself. For more information or to address specific queries, feel free to reach out to me directly via email. Warm regards, Jorg |
|
From: Po T. <pot...@gm...> - 2024-04-10 22:30:24
|
Hello QL users, I am new to QuantLib. I am trying to calibrate equity vol surface with short maturity american options. I am considering the Bates model. Is there any existing implementation in QL that can price American options under Bates or similar model (stochastic vol + jump)? Thanks, Po P.S. Huge thanks to Luigi and all other contributors. Kudos! |
|
From: Peter C. <pca...@gm...> - 2024-04-08 12:12:17
|
I feel I should give some more context around my statement below "xad slows down ql by 10x". The original post was this https://sourceforge.net/p/quantlib/mailman/message/37860714/ i.e. the average slowdown over all ql unit tests is only 2x, which is consistent with Dmitri's observation. 10x is a worst case scenario observed in a single unit test which seems to perform particularly "dense" numerical calculations. There are others with 7.5x etc. ... 10x is by the way also consistent with slide 14 in https://www.quantlib.org/slides/qlum15/caspers2.pdf Anyway, I just wanted to clarify this point. On Sun, 7 Apr 2024 at 11:12, Dmitri Goloubentsev <dm...@ma...> wrote: > > Hi Peter, > > Since Matlogica was mentioned by Peter, I'll join the conversation. > > To get correct derivatives for solver/optimizer steps, you need to propagate adjoints using the implicit function method. There are two ways to do this, the most known requires you to refactor your code and pull out dependent variables from the objective functions. Turns out it's not always needed and it's possible to do it automatically. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3984964 > Indeed, for efficiency, you don't want to record the solver/minimizer. It's sufficient to record the objective function only. > > Care should be taken to ensure the AAD tool is not missing any discontinuities due to control flow. Regular tape-based tools indeed can miss this and quants would have to spend a lot of time trying to identify problematic areas where adjoints don't propagate correctly and hence result in disagreement with bump-and-revalue. The code generation approach used by MatLogica’s AADC, also records all boolean operations and can identify all stochastic if-statements automatically. After graph recording is complete, you can get confirmation that all branches are recorded and you can use the recorded graph for arbitrary inputs(to process multiple scenarios). > > Instrumenting the whole library is very attractive because it can be applied to existing quant libraries even much much larger than QuantLib. In many cases, the slowdown due to the use of active type everywhere is an acceptable trade-off. In my tests, running QuantLib-benchmark suit, I typically observe x1.3 to x2.5 performance penalty, but it can be higher for numerically intensive pricers such as PDE. Of course, this is if you just replace Real with active type and don't actually take advantage of AAD or code generation to speed up your analytics. > Since the last time we spoke about this, we actually found a solution to this problem. We can get instrumented C++ code to run at about 5% performance penalty vs its native version. It is an interesting technical solution and I am happy to discuss it with you directly. > > As for QuantLib swap pricer inefficiency, it's actually applicable to many other products too. In general, using object-oriented languages is good for development and support, but bad for performance. > > At Matlogica we are also planning to release an AADC-enabled QuantLib python version. It's currently available for testing on request. The code generation approach can accelerate QuantLib python code by x100 times or more for xVA type workloads. > > Kind regards, > Dmitri Goloubentsev > Head of Automatic Adjoint Differentiation, > Matlogica LTD > http://matlogica.com +447378414528 > See my schedule and book a meeting with me > > > On Sun, 7 Apr 2024 at 01:25, Peter Caspers <pca...@gm...> wrote: >> >> Hi Jörg, >> >> thanks a lot, that's interesting. I have a couple of questions: >> >> - I think the approach you take in the example is not entirely >> correct. IterativeBootstrap uses Brent as the "first solver" which is >> not differentiable on all branches. It uses bisection which has a zero >> derivative everywhere. Of course you might be lucky and get correct >> results anyhow in the specific run. >> - More generally, how do you ensure correct treatment of control-flow >> in your tool? >> - Coming back to the bootstrap: even if you would ensure >> differentiability, I think you usually don't want to record the >> calibration itself to get market rate sensitivities - it's more >> efficient to compute the the matrix d par / d zero (with AAD or just >> bump-revalue) and invert that. >> >> On the technical side: >> >> - Last time I looked at XAD I noticed a slowdown of about 10x (I >> think) in some QuantLib unit tests. How do you address that? I asked >> this question many times (also Matlogica, Compatibl) but never seem to >> get a straight answer. I still think instrumenting the whole library >> is not a good approach, albeit very easy to to. It might also be good >> enough for specific use cases, admittedly. >> - If we are honest, the low AAD-overhead around 2x that you see is >> actually due to poorly optimised pricing of vanilla swaps in QuantLib. >> In this sense, QuantLib is an "easy target" for "proof of concepts" >> like the one in your blog. It might create wrong expectations though! >> >> Thank you >> Peter >> >> On Fri, 5 Apr 2024 at 19:01, Jorg Lotze <jor...@xc...> wrote: >> > >> > Dear Community, >> > >> > Exciting news for QuantLib users! QuantLib-Risks, now available for Python, supercharges QuantLib with automatic differentiation. This new addition streamlines risk assessments and derivative pricing, making complex analyses more accessible than ever. >> > >> > Get started effortlessly with: pip install QuantLib-Risks >> > >> > Curious about the impact? QuantLib-Risks dramatically improves efficiency, achieving sensitivities calculation in nearly the same timeframe as standard pricing. Discover the full performance story with a real-world application here: >> > >> > https://auto-differentiation.github.io/quantlib-risks >> > >> > Kind regards, >> > Jorg >> > _______________________________________________ >> > 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: Dmitri G. <dm...@ma...> - 2024-04-07 10:53:50
|
Hi Peter, Since Matlogica was mentioned by Peter, I'll join the conversation. To get correct derivatives for solver/optimizer steps, you need to propagate adjoints using the implicit function method. There are two ways to do this, the most known requires you to refactor your code and pull out dependent variables from the objective functions. Turns out it's not always needed and it's possible to do it automatically. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3984964 Indeed, for efficiency, you don't want to record the solver/minimizer. It's sufficient to record the objective function only. Care should be taken to ensure the AAD tool is not missing any discontinuities due to control flow. Regular tape-based tools indeed can miss this and quants would have to spend a lot of time trying to identify problematic areas where adjoints don't propagate correctly and hence result in disagreement with bump-and-revalue. The code generation approach used by MatLogica’s AADC, also records all boolean operations and can identify all stochastic if-statements automatically. After graph recording is complete, you can get confirmation that all branches are recorded and you can use the recorded graph for arbitrary inputs(to process multiple scenarios). Instrumenting the whole library is very attractive because it can be applied to existing quant libraries even much much larger than QuantLib. In many cases, the slowdown due to the use of active type everywhere is an acceptable trade-off. In my tests, running QuantLib-benchmark suit, I typically observe x1.3 to x2.5 performance penalty, but it can be higher for numerically intensive pricers such as PDE. Of course, this is if you just replace Real with active type and don't actually take advantage of AAD or code generation to speed up your analytics. Since the last time we spoke about this, we actually found a solution to this problem. We can get instrumented C++ code to run at about 5% performance penalty vs its native version. It is an interesting technical solution and I am happy to discuss it with you directly. As for QuantLib swap pricer inefficiency, it's actually applicable to many other products too. In general, using object-oriented languages is good for development and support, but bad for performance. At Matlogica we are also planning to release an AADC-enabled QuantLib python version. It's currently available for testing on request. The code generation approach can accelerate QuantLib python code by x100 times or more for xVA type workloads. Kind regards, Dmitri Goloubentsev Head of Automatic Adjoint Differentiation, Matlogica LTD http://matlogica.com +447378414528 See my schedule and book <https://calendly.com/matlogica> a meeting with me On Sun, 7 Apr 2024 at 01:25, Peter Caspers <pca...@gm...> wrote: > Hi Jörg, > > thanks a lot, that's interesting. I have a couple of questions: > > - I think the approach you take in the example is not entirely > correct. IterativeBootstrap uses Brent as the "first solver" which is > not differentiable on all branches. It uses bisection which has a zero > derivative everywhere. Of course you might be lucky and get correct > results anyhow in the specific run. > - More generally, how do you ensure correct treatment of control-flow > in your tool? > - Coming back to the bootstrap: even if you would ensure > differentiability, I think you usually don't want to record the > calibration itself to get market rate sensitivities - it's more > efficient to compute the the matrix d par / d zero (with AAD or just > bump-revalue) and invert that. > > On the technical side: > > - Last time I looked at XAD I noticed a slowdown of about 10x (I > think) in some QuantLib unit tests. How do you address that? I asked > this question many times (also Matlogica, Compatibl) but never seem to > get a straight answer. I still think instrumenting the whole library > is not a good approach, albeit very easy to to. It might also be good > enough for specific use cases, admittedly. > - If we are honest, the low AAD-overhead around 2x that you see is > actually due to poorly optimised pricing of vanilla swaps in QuantLib. > In this sense, QuantLib is an "easy target" for "proof of concepts" > like the one in your blog. It might create wrong expectations though! > > Thank you > Peter > > On Fri, 5 Apr 2024 at 19:01, Jorg Lotze <jor...@xc...> wrote: > > > > Dear Community, > > > > Exciting news for QuantLib users! QuantLib-Risks, now available for > Python, supercharges QuantLib with automatic differentiation. This new > addition streamlines risk assessments and derivative pricing, making > complex analyses more accessible than ever. > > > > Get started effortlessly with: pip install QuantLib-Risks > > > > Curious about the impact? QuantLib-Risks dramatically improves > efficiency, achieving sensitivities calculation in nearly the same > timeframe as standard pricing. Discover the full performance story with a > real-world application here: > > > > https://auto-differentiation.github.io/quantlib-risks > > > > Kind regards, > > Jorg > > _______________________________________________ > > 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: Peter C. <pca...@gm...> - 2024-04-06 17:56:16
|
Hi Jörg, thanks a lot, that's interesting. I have a couple of questions: - I think the approach you take in the example is not entirely correct. IterativeBootstrap uses Brent as the "first solver" which is not differentiable on all branches. It uses bisection which has a zero derivative everywhere. Of course you might be lucky and get correct results anyhow in the specific run. - More generally, how do you ensure correct treatment of control-flow in your tool? - Coming back to the bootstrap: even if you would ensure differentiability, I think you usually don't want to record the calibration itself to get market rate sensitivities - it's more efficient to compute the the matrix d par / d zero (with AAD or just bump-revalue) and invert that. On the technical side: - Last time I looked at XAD I noticed a slowdown of about 10x (I think) in some QuantLib unit tests. How do you address that? I asked this question many times (also Matlogica, Compatibl) but never seem to get a straight answer. I still think instrumenting the whole library is not a good approach, albeit very easy to to. It might also be good enough for specific use cases, admittedly. - If we are honest, the low AAD-overhead around 2x that you see is actually due to poorly optimised pricing of vanilla swaps in QuantLib. In this sense, QuantLib is an "easy target" for "proof of concepts" like the one in your blog. It might create wrong expectations though! Thank you Peter On Fri, 5 Apr 2024 at 19:01, Jorg Lotze <jor...@xc...> wrote: > > Dear Community, > > Exciting news for QuantLib users! QuantLib-Risks, now available for Python, supercharges QuantLib with automatic differentiation. This new addition streamlines risk assessments and derivative pricing, making complex analyses more accessible than ever. > > Get started effortlessly with: pip install QuantLib-Risks > > Curious about the impact? QuantLib-Risks dramatically improves efficiency, achieving sensitivities calculation in nearly the same timeframe as standard pricing. Discover the full performance story with a real-world application here: > > https://auto-differentiation.github.io/quantlib-risks > > Kind regards, > Jorg > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Jorg L. <jor...@xc...> - 2024-04-05 16:59:50
|
Dear Community, Exciting news for QuantLib users! QuantLib-Risks, now available for Python, supercharges QuantLib with automatic differentiation. This new addition streamlines risk assessments and derivative pricing, making complex analyses more accessible than ever. Get started effortlessly with: pip install QuantLib-Risks Curious about the impact? QuantLib-Risks dramatically improves efficiency, achieving sensitivities calculation in nearly the same timeframe as standard pricing. Discover the full performance story with a real-world application here: https://auto-differentiation.github.io/quantlib-risks Kind regards, Jorg |
|
From: Quant <qua...@gm...> - 2024-04-04 07:45:54
|
Hi QuantLib Users, I am valuing a CDS with Amortising Notionals in Quantlib-Python (i.e., the CDS is hedging an Amortising Loan) which means the notional used to calculate the CDS are different for each year. It seems like ql.CreditDefaultSwap() does not take more than one notional as shown below: notional = [790000, 632000, 474000, 316000, 158000] cds = ql.CreditDefaultSwap(ql.Protection.Buyer, notional, cds_spread, schedule, ql.Following, day_count) How can I adjust my code so that ql.CreditDefaultSwap() can take a list of Amortising Notionals. Thanks & regards, Nk |
|
From: Luigi B. <lui...@gm...> - 2024-03-29 08:32:54
|
Hi Philippe,
there's now a pull request (
https://github.com/lballabio/QuantLib/pull/1937) that aims at fixing the G2
process including the term structure. May you check if the changes make
sense to you? Thanks!
Luigi
On Mon, Feb 5, 2024 at 8:44 PM Philippe Hatstadt <
phi...@ex...> wrote:
> @Luigi Ballabio <lui...@gm...> trying to follow up on this
> discussion. Here is what I found at the Python level.
>
> A. Apparently, there is a well-defined way of generating short rate paths
> for HW1F as follows, per cookbook, and post calibration of a and sigma:
>
> hw_process = HullWhiteProcess(spot_curve_handle, a, sigma)
> rng = GaussianRandomSequenceGenerator(
> UniformRandomSequenceGenerator(timestep, UniformRandomGenerator()))
> seq = GaussianPathGenerator(hw_process, length, timestep, rng, False)
>
> B. For G2 model, I was able to find this: g2pp_fprocess =
> G2ForwardProcess(a, sigma, b, eta, rho) or g2pp_process = G2Process(a,
> sigma, b, eta, rho). What is puzzling is that neither call takes
> spot_curve_handle as a parameter, which is confirmed by the SWIG
> extract below. Does it mean that either of G2Process() / G2ForwardProcess()
> classes are not "finished" products, and/or am I supposed to pass the term
> structure handle in a different way? More generally, how am I supposed to
> use this class, if at all?
>
> # Register G2Process in _QuantLib:
> _QuantLib.G2Process_swigregister(G2Process)
> class G2ForwardProcess(StochasticProcess):
> r"""Proxy of C++ G2ForwardProcess class."""
>
> thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
> __repr__ = _swig_repr
>
>
> def __init__(self, a, sigma, b, eta, rho):
> r"""__init__(G2ForwardProcess self, Real a, Real sigma, Real b, Real eta, Real rho) -> G2ForwardProcess"""
> _QuantLib.G2ForwardProcess_swiginit(self, _QuantLib.new_G2ForwardProcess(a, sigma, b, eta, rho))
>
>
> Philippe Hatstadt
>
>
> On Tue, Jan 30, 2024 at 11:29 AM philippe hatstadt <pha...@ma...>
> wrote:
>
>> Yeah that’s what I was thinking. At least I’d be making indirect C++
>> calls. I might try.
>> Regards
>>
>> Philippe Hatstadt
>> +1-203-252-0408
>>
>>
>> On Jan 30, 2024, at 11:15 AM, Luigi Ballabio <lui...@gm...>
>> wrote:
>>
>>
>> Hmm, I'm not sure. The only thing that comes to mind is that, given a
>> path for interest rates, one could create some sort of interest-rate term
>> structure and then extract CMT rates from it. It's not something I tried,
>> though.
>>
>> Luigi
>>
>> On Tue, Jan 30, 2024 at 1:39 PM Philippe Hatstadt <
>> phi...@ex...> wrote:
>>
>>> Except I need to generate CMT rates along each path for my prepayment
>>> model. That would have be to be a pure Python Ioop? How would you then
>>> advise to calculate CMT rates from a path of short rates with the goal to
>>> try and use as many wrapped Python calls to underlying C++?
>>>
>>> Regards
>>>
>>> Philippe Hatstadt
>>> +1-203-252-0408
>>>
>>>
>>> On Jan 30, 2024, at 7:33 AM, Luigi Ballabio <lui...@gm...>
>>> wrote:
>>>
>>>
>>> It might not be so bad. The generation of the paths is driven from
>>> Python but performed by the GaussianPathGenerator class in C++. I'd
>>> give it a try.
>>>
>>> Luigi
>>>
>>>
>>> On Tue, Jan 30, 2024 at 1:28 PM Philippe Hatstadt <
>>> phi...@ex...> wrote:
>>>
>>>> Thank you. I looked at it and it’s great. His post-calibration
>>>> simulation on HW is done in Python though so performance will be an issue.
>>>> Thence my asking if there were routines existing in C++.
>>>>
>>>> Thank you.
>>>>
>>>> Regards
>>>>
>>>> Philippe Hatstadt
>>>> +1-203-252-0408
>>>>
>>>>
>>>> On Jan 30, 2024, at 7:24 AM, Luigi Ballabio <lui...@gm...>
>>>> wrote:
>>>>
>>>>
>>>> Hi, not much is already existing, I'm afraid. You can have a look at
>>>> Goutham's post at
>>>> https://gouthamanbalaraman.com/blog/hull-white-simulation-quantlib-python.html
>>>> (also in the cookbook if you have it) for a few ideas; he generates
>>>> interest-rate paths based on a Hull/White model, but something similar
>>>> should work for G2 as well.
>>>>
>>>> Hope this helps,
>>>> Luigi
>>>>
>>>>
>>>> On Wed, Jan 24, 2024 at 8:03 PM Philippe Hatstadt <
>>>> phi...@ex...> wrote:
>>>>
>>>>> I was able to calibrate a G2++ model to normal UST swaption
>>>>> volatilities (heroically using SOFR swaptions and re-scaling by rates ratio
>>>>> to generate so-called Treasury Swaption vol surface).
>>>>> Code is below:
>>>>>
>>>>> model = G2(term_structure);
>>>>> # engine = TreeSwaptionEngine(model, 25)
>>>>> # engine = ql.G2SwaptionEngine(model, 10, 400)
>>>>> engine = ql.FdG2SwaptionEngine(model)
>>>>> swaptions = create_swaption_helpers_normal(data, index,
>>>>> term_structure, engine)
>>>>> optimization_method = LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8)
>>>>> end_criteria = EndCriteria(1000, 100, 1e-6, 1e-8, 1e-8)
>>>>> model.calibrate(swaptions, optimization_method, end_criteria)
>>>>> a, sigma, b, eta, rho = model.params()\
>>>>>
>>>>> The question now is as follows: I want to use this model towards a
>>>>> GNMA OAS model for which I would need monte-carlo paths of 2y/5y/10y
>>>>> forward CMT rates spaced say monthly.
>>>>>
>>>>> I assume that I would first need to use the 5 G2++ parameters
>>>>> calibrated above and then generate paths of the short rate, then somehow
>>>>> compute forward CMT at each forward monthly epoch Ti by computing the
>>>>> break-even coupon C10(Ti) such that PV(Ti, bond(cpn=C10(Ti)) == 100?
>>>>> Are there existing QL classes or modules that do all that from a given
>>>>> calibrated model like above?
>>>>> By the same token, I would also need stochastic pathwise discount
>>>>> factor vectors DF(Ti, path j), i=0 to 30y monthly. Is there also a QL
>>>>> module that generates those? I can obviously do it manually, but I am on
>>>>> the python side, so I want to re-use as much of existing libraries as I can
>>>>> to use efficient C++ code indirectly via SWIG.
>>>>>
>>>>> Regards
>>>>>
>>>>> Philippe Hatstadt
>>>>>
>>>>> 1370 Broadway, Suite 1450 | New York, NY | 10018
>>>>>
>>>>> [image: https://www.exosfinancial.com/]
>>>>> <https://www.exosfinancial.com/> [image:
>>>>> https://www.linkedin.com/company/meetexos/about/]
>>>>> <https://www.linkedin.com/company/meetexos/about/>
>>>>>
>>>>> Broker-Dealer services offered through Exos Securities LLC, Member
>>>>> SIPC, FINRA. For important disclosures including Form CRS and Regulation BI
>>>>> click here <https://www.exosfinancial.com/general-disclosures>.
>>>>>
>>>>>
>>>>> Confidentiality Notice: The information contained in this email
>>>>> (including attachments) is only for the personal and confidential use of
>>>>> the sender and recipient named above. If the reader is not the intended
>>>>> recipient, you are notified that you have received this message in error
>>>>> and that any review, dissemination, copying or distribution is prohibited.
>>>>> If you have received this communication in error, please notify the sender
>>>>> immediately by e-mail and delete or destroy the original message and all
>>>>> copies.
>>>>> _______________________________________________
>>>>> QuantLib-users mailing list
>>>>> Qua...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>>>
>>>>
>>>> 1370 Broadway, Suite 1450 | New York, NY | 10018
>>>>
>>>> [image: https://www.exosfinancial.com/]
>>>> <https://www.exosfinancial.com/> [image:
>>>> https://www.linkedin.com/company/meetexos/about/]
>>>> <https://www.linkedin.com/company/meetexos/about/>
>>>>
>>>> Broker-Dealer services offered through Exos Securities LLC, Member
>>>> SIPC, FINRA. For important disclosures including Form CRS and Regulation BI
>>>> click here <https://www.exosfinancial.com/general-disclosures>.
>>>>
>>>>
>>>> Confidentiality Notice: The information contained in this email
>>>> (including attachments) is only for the personal and confidential use of
>>>> the sender and recipient named above. If the reader is not the intended
>>>> recipient, you are notified that you have received this message in error
>>>> and that any review, dissemination, copying or distribution is prohibited.
>>>> If you have received this communication in error, please notify the sender
>>>> immediately by e-mail and delete or destroy the original message and all
>>>> copies.
>>>>
>>>
>>> 1370 Broadway, Suite 1450 | New York, NY | 10018
>>>
>>> [image: https://www.exosfinancial.com/] <https://www.exosfinancial.com/> [image:
>>> https://www.linkedin.com/company/meetexos/about/]
>>> <https://www.linkedin.com/company/meetexos/about/>
>>>
>>> Broker-Dealer services offered through Exos Securities LLC, Member SIPC,
>>> FINRA. For important disclosures including Form CRS and Regulation BI click
>>> here <https://www.exosfinancial.com/general-disclosures>.
>>>
>>>
>>> Confidentiality Notice: The information contained in this email
>>> (including attachments) is only for the personal and confidential use of
>>> the sender and recipient named above. If the reader is not the intended
>>> recipient, you are notified that you have received this message in error
>>> and that any review, dissemination, copying or distribution is prohibited.
>>> If you have received this communication in error, please notify the sender
>>> immediately by e-mail and delete or destroy the original message and all
>>> copies.
>>>
>>
> 31 East 32nd Street, 3rd Floor | New York, NY | 10016
>
> [image: https://www.exosfinancial.com/] <https://www.exosfinancial.com/> [image:
> https://www.linkedin.com/company/meetexos/about/]
> <https://www.linkedin.com/company/meetexos/about/>
>
> Broker-Dealer services offered through Exos Securities LLC, Member SIPC,
> FINRA. For important disclosures including Form CRS and Regulation BI click
> here <https://www.exosfinancial.com/general-disclosures>.
>
>
> Confidentiality Notice: The information contained in this email
> (including attachments) is only for the personal and confidential use of
> the sender and recipient named above. If the reader is not the intended
> recipient, you are notified that you have received this message in error
> and that any review, dissemination, copying or distribution is prohibited.
> If you have received this communication in error, please notify the sender
> immediately by e-mail and delete or destroy the original message and all
> copies.
>
|
|
From: Wei Li <ttl...@gm...> - 2024-03-28 10:45:52
|
Dear all, I am trying to bootstrap a currency interest rate curve with a base currency curve and a set of FX forward point quotes. So I am generating a list of FxSwapRateHelper objects, each would have a forward point quote, a fx spot quote, a tenor and some other properties. For example, I have a USD curve already, a 6M forward point quote of 85 for EURUSD, and the fx spot quote is 1.084, The fixing lag is 2 business days. I would then generate this rate helper like this: instrument = ql.FxSwapRateHelper(ql.QuoteHandle(ql.SimpleQuote(85/10000)), ql.SimpleQuote(1.084)), ql.Period(6, ql.Months), 2, ql.JointCalendar(ql.UnitedStates(), ql.TARGET()), ql.Following, IS_SPOT_DATE_END_OF_MONTH, False, USD_CURVE) The USD_CURVE is the IR curve for USD that I already have. And the FX forward convention is if the spot date (T+2) is the end of its month, then all maturity date of forwards must also be the end of months, hence the IS_SPOT_DATE_END_OF_MONTH parameter. Now I am having trouble on how to decide the T+2 / spot date. Because from what I learned, the convention is if T+1 is a US holiday and T+2 is not, then the T+2 day is the spot day. But if T+1 is not a US holiday and yet an EU holiday, then we use the T+3, My description might not be accurate since when we say +1, +2 we would mean business day already. So let me use some examples: case 1: if today is 20240112 Friday, and next Monday 20240115 is Martin Luther King Jr. day, which is a holiday in US but not in EU, then the spot date would be the next business day of 20240115 which is 20240116. case 2: if today is 20240111 Thursday, the spot day would also be 20240116 since the "normal" T+2 is Martin Luther King Jr. day. case 3: if today is 20240430 Tuesday, 20240501 is Labour day which is an EU holiday but not one in US, then the spot day is 20240503. Now I can't handle the case 1 using the code I gave above, since the joint calendar always takes all holidays in both US and EU, so it would give 20240117. Is there any way that I can handle this kind of convention? Thank you very much! Cheers, Wei |