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: Dr O. <Do...@li...> - 2024-02-28 01:11:00
|
Hi, I followed the steps in the link below, since this is the most up to date. https://benjaminwhiteside.com/2023/09/26/building-quantlib-in-vs2022-64-bit/ [https://benjaminwhiteside.files.wordpress.com/2023/09/build_quantlib_in_vs2022_64bit.png?w=1200]<https://benjaminwhiteside.com/2023/09/26/building-quantlib-in-vs2022-64-bit/> Building QuantLib in VS2022 64-bit<https://benjaminwhiteside.com/2023/09/26/building-quantlib-in-vs2022-64-bit/> Build Boost and QuantLib in Windows 11 64-bit using Visual Studio 2022. benjaminwhiteside.com I am getting the following errors after i build the solution, testsuite compiles fine. Severity Code Description Project File Line Suppression State Details Error C1083 Cannot open include file: 'boost/config.hpp': No such file or directory LatentModel C:\Program Files\QuantLib-1.33\QuantLib-1.33\ql\qldefines.hpp 38 Severity Code Description Project File Line Suppression State Details Error LNK1104 cannot open file 'kernel32.lib' BasketLosses C:\Program Files\QuantLib-1.33\QuantLib-1.33\Examples\BasketLosses\LINK 1 I am using the following boost version and MSVC. boost_1_84_0-msvc-14.3-64 [cid:7e092454-603a-481d-a427-2fd0aaa0ea76] ________________________________ From: Luigi Ballabio <lui...@gm...> Sent: Tuesday, 27 February 2024 8:24 PM To: Dr Ocean <do...@li...> Cc: qua...@li... <qua...@li...> Subject: Re: [Quantlib-users] Where can i get help for Quantlib configuration Hello, what operating system are you using? In what way exactly the instructions don't work? Also, are you referring to the instructions at <https://www.quantlib.org/install.shtml> or some other ones? Thanks, Luigi On Tue, Feb 27, 2024 at 12:03 PM Dr Ocean <do...@li...<mailto:do...@li...>> wrote: Hi, Can anyone tell me which distribution should i use to get support for quantlib configuration? the posted instructions don't work. Regards. _______________________________________________ QuantLib-users mailing list Qua...@li...<mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Josua M. <jos...@gm...> - 2024-02-27 22:51:38
|
Dear community, I installed QuantLibXL for Excel. Im looking for example how to use the function qlLevenbergMarquardt in excel. Perhaps somebody has good excel example form me? I want to use the function for SABR calibration. Best Regards from Germany Josh |
|
From: Luigi B. <lui...@gm...> - 2024-02-27 20:24:30
|
Hello,
what operating system are you using? In what way exactly the
instructions don't work? Also, are you referring to the instructions at <
https://www.quantlib.org/install.shtml> or some other ones?
Thanks,
Luigi
On Tue, Feb 27, 2024 at 12:03 PM Dr Ocean <do...@li...> wrote:
> Hi,
>
> Can anyone tell me which distribution should i use to get support for
> quantlib configuration? the posted instructions don't work.
>
> Regards.
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Denys U. <de...@aq...> - 2024-02-27 18:06:30
|
This might come useful to those who are thinking of using QuantLib in Python. As part of my recent consulting project I created a wrapper around QuantLib which allows working at a higher level than what the swig-generated Python library provides. Anyways, I open sourced the package since I think it may be useful to others: https://github.com/Aqumen-Tech/aqumenlib Hopefully the README there answers most questions. Currently it only handles basic rates and fixed income and a bit of FX, since that was all I needed, but the structure should make it easy to add new pricers; the hard bits were modeling and risk calcs and that wiring is all in place. |
|
From: Dr O. <do...@li...> - 2024-02-27 10:58:54
|
Hi, Can anyone tell me which distribution should i use to get support for quantlib configuration? the posted instructions don't work. Regards. |
|
From: Lluis P. <lp...@ti...> - 2024-02-26 13:58:17
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hello,<br>
<br>
Have you seen Luigi's notebook video here? <a
moz-do-not-send="true"
href="https://www.youtube.com/watch?v=qh68IQYciFs&list=PLu_PrO8j6XAvOAlZND9WUPwTHY_GYhJVr&index=18">QuantLib
notebooks: discount margin calculation</a><br>
<br>
I've not experienced the issue you mention other than the
difference between compounded vs simple discount margin but I
don't think this is explaining your issue.<br>
Difficult to tell without more details.<br>
<br>
Lluís<br>
<br>
<br>
El 25/2/24 a les 20:28, Quant ha escrit:<br>
</div>
<blockquote type="cite"
cite="mid:CAG...@ma...">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hi All,
<div dir="auto"><br>
</div>
<div dir="auto">I have valued a 5-year Floating Rate Bond (FRB) in
Quantlib that has a coupon spread of 160bps over the reference
index. The FRB is issued at par (face value 100) and
theoretically the Discount Margin should exactly be the same as
the coupon spread on issue. In this instance, the Discount
Margin should be equal to 160bps as well to have the fair value
as 100. However, on solving for a Discount Margin using
ZeroSpreadedTermStructure in Quantlib, I am getting a slightly
different Discount Margin of 169.75bps.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Has anyone encountered the same issue? If so, how
do we get to the Discount Margin which is exactly the same as
the coupon spread on issue date?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks & regards,</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QuantLib-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qua...@li...">Qua...@li...</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/quantlib-users">https://lists.sourceforge.net/lists/listinfo/quantlib-users</a>
</pre>
</blockquote>
<br>
</body>
</html>
|
|
From: Quant <qua...@gm...> - 2024-02-25 21:17:11
|
Hi All, I have valued a 5-year Floating Rate Bond (FRB) in Quantlib that has a coupon spread of 160bps over the reference index. The FRB is issued at par (face value 100) and theoretically the Discount Margin should exactly be the same as the coupon spread on issue. In this instance, the Discount Margin should be equal to 160bps as well to have the fair value as 100. However, on solving for a Discount Margin using ZeroSpreadedTermStructure in Quantlib, I am getting a slightly different Discount Margin of 169.75bps. Has anyone encountered the same issue? If so, how do we get to the Discount Margin which is exactly the same as the coupon spread on issue date? Thanks & regards, |
|
From: Luigi B. <lui...@gm...> - 2024-02-22 09:19:23
|
Hello Rishi,
the required tolerance is an absolute target for the estimated
statistical error, so if you're passing 0.01 that would mean that the
simulation goes on until the error estimate goes below 1 cent in absolute
terms. During the simulation, the error estimate is calculated as the
standard deviation of the results divided by the square root of N, the
number of samples so far.
It's not always obvious what should happen if you increase the number of
instruments. It's true that you're doing more work for each sample; and in
fact, you should see that if you pass requiredSamples instead of
requiredTolerance as an input. In that case, the simulation will run
exactly that number of samples, and the time will depend only on how much
time it takes to run one sample.
However, when passing a tolerance as a target, things are not so clear.
Depending on the correlation between instruments and the way the payoff is
defined, it might be that adding an instrument decreases the standard
deviation of the results, and therefore it will take fewer samples to reach
the required tolerance. If you're running fewer samples, the total time
might decrease, even if a single sample takes longer.
Unfortunately, the standard deviation and the number of samples are not
currently available from the results returned by the engine, so this is
difficult to investigate.
If you wanted to check them, you'd have to modify the underlying C++ code
and recompile the library and the Python wheel. Let me know if you need
guidance on that.
Hope this helps,
Luigi
On Sat, Feb 10, 2024 at 6:47 PM Rishi Sreedhar <ris...@gm...>
wrote:
> Dear QuantLib community,
>
> I've been exploring how to price American Basket options
> using MCAmericanBasketEngine, when I found something strange. The time it
> took to produce a result for a requiredTolerance of 1e-2 was decreasing as
> I increased the number of assets [d]. (See attached plot for reference).
>
> Isn't this surprising? The landscape from where monte carlo should sample
> becomes significantly more complex when simulating larger baskets, and
> hence shouldn't the time increase with the number of assets?
>
> The parameters I am using are:
>
> d = 4 #number of assets
> underlying_r = np.array([0.3 for i in range(d)])
> underlying_volatilities = np.array([0.5 for i in range(d)])
> underlying_spots = np.array([100.0 for i in range(d)])
> underlying_dividend_rate = np.zeros(d)
>
> β = 0.5
> underlying_correlation_mat = (β*np.ones((d,d))
> +np.identity(d))/(1+β)
>
> Also, could someone please point me to where I can learn more about the
> actual algorithms implemented behind the pricing engines, and what the
> parameters like requiredTolerance mean? I see that the requiredTolerance
> sets an upper bound to the errorEstimate(), but how is this errorEstimate
> also calculated?
>
> Thank you so much again for taking the time to answer these very beginner
> questions!
> Most Cordially,
> Rishi
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Rishi S. <ris...@gm...> - 2024-02-20 18:11:38
|
Hi all, A small reminder about this. Since asking this question and playing around with the parameters, I found that a similar observation of first rapidly decreasing and then slowly increasing runtimes with the number of assets when pricing American Basket options even on using different tolerances and also using random values for the underlying asset spots, interest rates, volatilities etc. A Flat forward yield term structure was also used for both dividends and interest rates, and a constant volatility was also assumed. To reiterate the questions: 1. Why would the run-time for pricing American Basket options price decrease rapidly with increasing the number of assets first before slowly increasing again? I am very new to quantitative finance and hence want to make sure I'm not doing anything obviously wrong. 2. Is the errorEstimate() calculated on the options price a moving standard deviation of the MonteCarlo values obtained for some fixed window size before convergence? If not, how is this estimated? 3. Is the requiredTolerance referring to absolute tolerance or relative tolerance? Thanks again for looking into this! Most Cordially, Rishi On Sat, Feb 10, 2024 at 11:14 PM Rishi Sreedhar <ris...@gm...> wrote: > Dear QuantLib community, > > I've been exploring how to price American Basket options > using MCAmericanBasketEngine, when I found something strange. The time it > took to produce a result for a requiredTolerance of 1e-2 was decreasing as > I increased the number of assets [d]. (See attached plot for reference). > > Isn't this surprising? The landscape from where monte carlo should sample > becomes significantly more complex when simulating larger baskets, and > hence shouldn't the time increase with the number of assets? > > The parameters I am using are: > > d = 4 #number of assets > underlying_r = np.array([0.3 for i in range(d)]) > underlying_volatilities = np.array([0.5 for i in range(d)]) > underlying_spots = np.array([100.0 for i in range(d)]) > underlying_dividend_rate = np.zeros(d) > > β = 0.5 > underlying_correlation_mat = (β*np.ones((d,d)) > +np.identity(d))/(1+β) > > Also, could someone please point me to where I can learn more about the > actual algorithms implemented behind the pricing engines, and what the > parameters like requiredTolerance mean? I see that the requiredTolerance > sets an upper bound to the errorEstimate(), but how is this errorEstimate > also calculated? > > Thank you so much again for taking the time to answer these very beginner > questions! > Most Cordially, > Rishi > > |
|
From: Luigi B. <lui...@gm...> - 2024-02-19 08:20:54
|
Thanks! On Sat, Feb 17, 2024 at 1:27 PM Marco Inacio <m...@ma...> wrote: > Hi, everyone. Just like to announce that I've created a FOSS repo with an > example on how to call Quantlib functionalities from Rust using CxxBridge: > > https://github.com/randommm/quantlib-on-rust > > If you clone the repo recursively, you will get quantlib as a submodule > and then when you run "cargo run" then it will automatically run > autogen.sh, configure --prefix, make and make install for you. For now the > example is quite simple, but I plan to make it more robust with time. > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Marco I. <m...@ma...> - 2024-02-17 12:24:02
|
Hi, everyone. Just like to announce that I've created a FOSS repo with an example on how to call Quantlib functionalities from Rust using CxxBridge: https://github.com/randommm/quantlib-on-rust If you clone the repo recursively, you will get quantlib as a submodule and then when you run "cargo run" then it will automatically run autogen.sh, configure --prefix, make and make install for you. For now the example is quite simple, but I plan to make it more robust with time. |
|
From: Rishi S. <ris...@gm...> - 2024-02-10 17:44:25
|
Dear QuantLib community,
I've been exploring how to price American Basket options
using MCAmericanBasketEngine, when I found something strange. The time it
took to produce a result for a requiredTolerance of 1e-2 was decreasing as
I increased the number of assets [d]. (See attached plot for reference).
Isn't this surprising? The landscape from where monte carlo should sample
becomes significantly more complex when simulating larger baskets, and
hence shouldn't the time increase with the number of assets?
The parameters I am using are:
d = 4 #number of assets
underlying_r = np.array([0.3 for i in range(d)])
underlying_volatilities = np.array([0.5 for i in range(d)])
underlying_spots = np.array([100.0 for i in range(d)])
underlying_dividend_rate = np.zeros(d)
β = 0.5
underlying_correlation_mat = (β*np.ones((d,d))
+np.identity(d))/(1+β)
Also, could someone please point me to where I can learn more about the
actual algorithms implemented behind the pricing engines, and what the
parameters like requiredTolerance mean? I see that the requiredTolerance
sets an upper bound to the errorEstimate(), but how is this errorEstimate
also calculated?
Thank you so much again for taking the time to answer these very beginner
questions!
Most Cordially,
Rishi
|
|
From: Peter C. <pca...@gm...> - 2024-02-06 19:06:10
|
If you are willing to use the ORE libraries (extension to QuantLib), there is a nF-Hull-White Model. It is work in progress, calibration to options and time-dependent parameters are still missing. It's particularly suitable to reproduce movements taken from a PCA on historical curve data. Here are links to some demos: https://github.com/OpenSourceRisk/Engine/tree/master/Examples/Example_37 https://github.com/OpenSourceRisk/Engine/tree/master/Examples/Example_38 Best Peter On Tue, 6 Feb 2024 at 17:01, Luigi Ballabio <lui...@gm...> wrote: > No, I'm afraid G2 is the only two-factor model we have in that framework. > There's also an implementation of LMM from the late Mark Joshi, but I'm not > familiar with it. > > Luigi > > > On Tue, Feb 6, 2024 at 1:29 PM Philippe Hatstadt < > phi...@ex...> wrote: > >> Thanks Luigi. Wow 18 years… >> Are there other models that can de-correlate CMS2Y versus CMS10Y and >> longer? Working in OAS model where slope of the curve is a principal >> component. >> Regards >> >> Philippe Hatstadt >> +1-203-252-0408 >> >> >> On Feb 6, 2024, at 7:00 AM, Luigi Ballabio <lui...@gm...> >> wrote: >> >> >> Hmm—you're right, it looks like the G2 processes are only half-done. >> From the git logs of the C++ library, it looks like they were added 18 >> years ago and never updated (and probably never used either). They should >> be fixed there. I've opened >> https://github.com/lballabio/QuantLib/issues/1904 but I don't know when >> someone will pick it up. >> >> 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. >>> >> >> 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. >> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Luigi B. <lui...@gm...> - 2024-02-06 16:24:17
|
I would say so, yes. On Tue, Feb 6, 2024 at 5:09 PM Martin Aussenhof <mau...@pe...> wrote: > Thank you Luigi. > > I presume it is not possible to extract normal vols using quantlib until > OISs and pricing engines amended for them can be covered by the Swaption > class. Is that correct? > > > On Tue, 6 Feb 2024 at 16:00, Luigi Ballabio <lui...@gm...> > wrote: > >> No, I don't think that would work. VanillaSwap assumes a single fixing >> at the beginning of the coupon. >> >> On Fri, Feb 2, 2024 at 2:16 PM Martin Aussenhof <mau...@pe...> >> wrote: >> >>> Hi Luigi, >>> >>> Is it safe to use the VanillaSwap class to create a SOFR swaption? If >>> so, is there an example somewhere. I’ve searched through the archive of >>> this mailing list and found plenty of information, but am struggling to >>> create a swaption based on sofr that correctly solves for normal vol. >>> >>> Thanks, >>> Martin >>> >>> On Fri, 2 Feb 2024 at 12:25, Luigi Ballabio <lui...@gm...> >>> wrote: >>> >>>> Hello Jason, >>>> SOFR-based swaptions are still an open implementation problem—see >>>> https://github.com/lballabio/QuantLib/pull/1593 for an attempt at >>>> adding them. The vol cubes might need to be modified as well once we have >>>> them. I don't think we have a corresponding swap index to pass right now. >>>> I'm not sure how this is managed in ORE; Peter, do you have any info on >>>> this? >>>> >>>> Luigi >>>> >>>> >>>> >>>> On Thu, Feb 1, 2024 at 7:55 PM Jason Lee <lee...@gm...> wrote: >>>> >>>>> Hi, >>>>> >>>>> For fitting SwaptionVolCube2, we need to specify the swapindexbase and >>>>> shortswapindexbase. While Libor is available, I used swapindex class, with >>>>> familyname = usdliborswapisdafixa and tenor = 1y and 2y, as parameters. My >>>>> question is, most traded swaptions now are sofr1d based, how should I set >>>>> up the related parameters in this case? Also, some details on these two >>>>> parameters would be highly appreciated. I tried to research online but >>>>> couldn't seem to find a good resource. Is it related to the payment >>>>> frequency on fix or float leg? >>>>> >>>>> >>>>> Thank you so much! >>>>> >>>>> Best, >>>>> Jason >>>>> _______________________________________________ >>>>> 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...> - 2024-02-06 16:23:25
|
It's in the release. It's mostly in C++ (see https://github.com/lballabio/QuantLib/tree/master/ql/models/marketmodels), it's not integrated with the rest of the library, and it needs documenting. There are a number of tests for it that might work as a starting point, for instance https://github.com/lballabio/QuantLib/blob/master/test-suite/marketmodel.cpp. Some parts are exported to Python etc, but not a lot. On Tue, Feb 6, 2024 at 5:04 PM Philippe Hatstadt <pha...@ma...> wrote: > I'm interested in that. Is the LMM only in C++? Is t in the production > release or only in a branch? Anyone on this forum knows about it? > > Best regards Philippe Hatstadt 203-252-0408 > https://www.linkedin.com/in/philippe-hatstadt/ > > On Feb 6, 2024, at 10:59 AM, Luigi Ballabio <lui...@gm...> > wrote: > > > No, I'm afraid G2 is the only two-factor model we have in that framework. > There's also an implementation of LMM from the late Mark Joshi, but I'm not > familiar with it. > > Luigi > > > On Tue, Feb 6, 2024 at 1:29 PM Philippe Hatstadt < > phi...@ex...> wrote: > >> Thanks Luigi. Wow 18 years… >> Are there other models that can de-correlate CMS2Y versus CMS10Y and >> longer? Working in OAS model where slope of the curve is a principal >> component. >> Regards >> >> Philippe Hatstadt >> +1-203-252-0408 >> >> >> On Feb 6, 2024, at 7:00 AM, Luigi Ballabio <lui...@gm...> >> wrote: >> >> >> Hmm—you're right, it looks like the G2 processes are only half-done. >> From the git logs of the C++ library, it looks like they were added 18 >> years ago and never updated (and probably never used either). They should >> be fixed there. I've opened >> https://github.com/lballabio/QuantLib/issues/1904 but I don't know when >> someone will pick it up. >> >> 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. >>> >> >> 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: Philippe H. <pha...@ma...> - 2024-02-06 16:04:35
|
I'm interested in that. Is the LMM only in C++? Is t in the production release or only in a branch? Anyone on this forum knows about it? Best regards Philippe Hatstadt 203-252-0408 https://www.linkedin.com/in/philippe-hatstadt/ On Feb 6, 2024, at 10:59 AM, Luigi Ballabio <lui...@gm...> wrote: No, I'm afraid G2 is the only two-factor model we have in that framework. There's also an implementation of LMM from the late Mark Joshi, but I'm not familiar with it. Luigi On Tue, Feb 6, 2024 at 1:29 PM Philippe Hatstadt < phi...@ex... > wrote: Thanks Luigi. Wow 18 years… Are there other models that can de-correlate CMS2Y versus CMS10Y and longer? Working in OAS model where slope of the curve is a principal component. Regards Philippe Hatstadt +1-203-252-0408 On Feb 6, 2024, at 7:00 AM, Luigi Ballabio < lui...@gm... > wrote: Hmm—you're right, it looks like the G2 processes are only half-done. From the git logs of the C++ library, it looks like they were added 18 years ago and never updated (and probably never used either). They should be fixed there. I've opened https://github.com/lballabio/QuantLib/issues/1904 but I don't know when someone will pick it up. Luigi On Mon, Feb 5, 2024 at 8:44 PM Philippe Hatstadt < phi...@ex... > wrote: @Luigi Ballabio 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 Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click here . 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 Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click here . 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 Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click here . 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 Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click here . 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 Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click here . 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: Luigi B. <lui...@gm...> - 2024-02-06 16:01:12
|
No, I don't think that would work. VanillaSwap assumes a single fixing at the beginning of the coupon. On Fri, Feb 2, 2024 at 2:16 PM Martin Aussenhof <mau...@pe...> wrote: > Hi Luigi, > > Is it safe to use the VanillaSwap class to create a SOFR swaption? If so, > is there an example somewhere. I’ve searched through the archive of this > mailing list and found plenty of information, but am struggling to create a > swaption based on sofr that correctly solves for normal vol. > > Thanks, > Martin > > On Fri, 2 Feb 2024 at 12:25, Luigi Ballabio <lui...@gm...> > wrote: > >> Hello Jason, >> SOFR-based swaptions are still an open implementation problem—see >> https://github.com/lballabio/QuantLib/pull/1593 for an attempt at adding >> them. The vol cubes might need to be modified as well once we have them. >> I don't think we have a corresponding swap index to pass right now. I'm >> not sure how this is managed in ORE; Peter, do you have any info on this? >> >> Luigi >> >> >> >> On Thu, Feb 1, 2024 at 7:55 PM Jason Lee <lee...@gm...> wrote: >> >>> Hi, >>> >>> For fitting SwaptionVolCube2, we need to specify the swapindexbase and >>> shortswapindexbase. While Libor is available, I used swapindex class, with >>> familyname = usdliborswapisdafixa and tenor = 1y and 2y, as parameters. My >>> question is, most traded swaptions now are sofr1d based, how should I set >>> up the related parameters in this case? Also, some details on these two >>> parameters would be highly appreciated. I tried to research online but >>> couldn't seem to find a good resource. Is it related to the payment >>> frequency on fix or float leg? >>> >>> >>> Thank you so much! >>> >>> Best, >>> Jason >>> _______________________________________________ >>> 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...> - 2024-02-06 15:59:22
|
No, I'm afraid G2 is the only two-factor model we have in that framework. There's also an implementation of LMM from the late Mark Joshi, but I'm not familiar with it. Luigi On Tue, Feb 6, 2024 at 1:29 PM Philippe Hatstadt < phi...@ex...> wrote: > Thanks Luigi. Wow 18 years… > Are there other models that can de-correlate CMS2Y versus CMS10Y and > longer? Working in OAS model where slope of the curve is a principal > component. > Regards > > Philippe Hatstadt > +1-203-252-0408 > > > On Feb 6, 2024, at 7:00 AM, Luigi Ballabio <lui...@gm...> > wrote: > > > Hmm—you're right, it looks like the G2 processes are only half-done. From > the git logs of the C++ library, it looks like they were added 18 years ago > and never updated (and probably never used either). They should be fixed > there. I've opened https://github.com/lballabio/QuantLib/issues/1904 but > I don't know when someone will pick it up. > > 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. >> > > 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: Philippe H. <phi...@ex...> - 2024-02-06 12:35:48
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Thanks Luigi. Wow 18 years… <div>Are there other models that can de-correlate CMS2Y versus CMS10Y and longer? Working in OAS model where slope of the curve is a principal component.<br id="lineBreakAtBeginningOfSignature"><div dir="ltr">Regards<div><br></div><div>Philippe Hatstadt</div><div>+1-203-252-0408</div><div><br></div></div><div dir="ltr"><br><blockquote type="cite">On Feb 6, 2024, at 7:00 AM, Luigi Ballabio <lui...@gm...> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hmm—you're right, it looks like the G2 processes are only half-done. From the git logs of the C++ library, it looks like they were added 18 years ago and never updated (and probably never used either). They should be fixed there. I've opened <a href="https://github.com/lballabio/QuantLib/issues/1904">https://github.com/lballabio/QuantLib/issues/1904</a> but I don't know when someone will pick it up.<div><br></div><div>Luigi</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 5, 2024 at 8:44 PM Philippe Hatstadt <<a href="mailto:phi...@ex...">phi...@ex...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><a class="gmail_plusreply" id="m_5661415589927083342plusReplyChip-0" href="mailto:lui...@gm..." target="_blank">@Luigi Ballabio</a> trying to follow up on this discussion. Here is what I found at the Python level.<div><br></div><div>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:<div><br><div>hw_process = HullWhiteProcess(spot_curve_handle, a, sigma)<br>rng = GaussianRandomSequenceGenerator(<br> UniformRandomSequenceGenerator(timestep, UniformRandomGenerator()))<br>seq = GaussianPathGenerator(hw_process, length, timestep, rng, False)</div><div><br></div><div>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? </div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)"># Register G2Process in _QuantLib:</span></div><div><span style="font-family:arial,sans-serif;color:rgb(0,0,0)">_QuantLib.G2Process_swigregister(G2Process)</span></div><div><span style="font-family:arial,sans-serif;color:rgb(0,0,0)">class G2ForwardProcess(StochasticProcess):</span></div><div><span style="font-family:arial,sans-serif;color:rgb(0,0,0)"> r"""Proxy of C++ G2ForwardProcess class."""</span></div><div><pre style="color:rgb(0,0,0)"><font face="arial, sans-serif"> thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr</font></pre><pre style="color:rgb(0,0,0)"><font face="arial, sans-serif"> 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))</font></pre></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr">Philippe Hatstadt</div></div></div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 30, 2024 at 11:29 AM philippe hatstadt <<a href="mailto:pha...@ma..." target="_blank">pha...@ma...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Yeah that’s what I was thinking. At least I’d be making indirect C++ calls. I might try.<br id="m_5661415589927083342m_-6559702879327117141lineBreakAtBeginningOfSignature"><div dir="ltr">Regards<div><br></div><div>Philippe Hatstadt</div><div>+1-203-252-0408</div><div><br></div></div><div dir="ltr"><br><blockquote type="cite">On Jan 30, 2024, at 11:15 AM, Luigi Ballabio <<a href="mailto:lui...@gm..." target="_blank">lui...@gm...</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">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.<div><br></div><div>Luigi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 30, 2024 at 1:39 PM Philippe Hatstadt <<a href="mailto:phi...@ex..." target="_blank">phi...@ex...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">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++?<div><br id="m_5661415589927083342m_-6559702879327117141m_-5301017114382669129lineBreakAtBeginningOfSignature"><div dir="ltr">Regards<div><br></div><div>Philippe Hatstadt</div><div>+1-203-252-0408</div><div><br></div></div><div dir="ltr"><br><blockquote type="cite">On Jan 30, 2024, at 7:33 AM, Luigi Ballabio <<a href="mailto:lui...@gm..." target="_blank">lui...@gm...</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">It might not be so bad. The generation of the paths is driven from Python but performed by the <span style="color:rgb(0,0,0)">GaussianPathGenerator class in C++. I'd give it a try.</span><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Luigi</span></div><div><span style="color:rgb(0,0,0)"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 30, 2024 at 1:28 PM Philippe Hatstadt <<a href="mailto:phi...@ex..." target="_blank">phi...@ex...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">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++.<div><br><div>Thank you.<br><div><br id="m_5661415589927083342m_-6559702879327117141m_-5301017114382669129m_-1044749212735144493lineBreakAtBeginningOfSignature"><div dir="ltr">Regards<div><br></div><div>Philippe Hatstadt</div><div>+1-203-252-0408</div><div><br></div></div><div dir="ltr"><br><blockquote type="cite">On Jan 30, 2024, at 7:24 AM, Luigi Ballabio <<a href="mailto:lui...@gm..." target="_blank">lui...@gm...</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hi, not much is already existing, I'm afraid. You can have a look at Goutham's post at <a href="https://gouthamanbalaraman.com/blog/hull-white-simulation-quantlib-python.html" target="_blank">https://gouthamanbalaraman.com/blog/hull-white-simulation-quantlib-python.html</a> (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.<div><br></div><div>Hope this helps,</div><div> Luigi</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 24, 2024 at 8:03 PM Philippe Hatstadt <<a href="mailto:phi...@ex..." target="_blank">phi...@ex...</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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).</div><div>Code is below:</div><div><br></div><div>model = G2(term_structure);<br># engine = TreeSwaptionEngine(model, 25)<br># engine = ql.G2SwaptionEngine(model, 10, 400)<br>engine = ql.FdG2SwaptionEngine(model)<br>swaptions = create_swaption_helpers_normal(data, index, term_structure, engine)<br>optimization_method = LevenbergMarquardt(1.0e-8,1.0e-8,1.0e-8)<br>end_criteria = EndCriteria(1000, 100, 1e-6, 1e-8, 1e-8)<br>model.calibrate(swaptions, optimization_method, end_criteria)<br></div><div>a, sigma, b, eta, rho = model.params()\<br></div><div><br></div><div>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.</div><div><br></div><div>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?</div><div>Are there existing QL classes or modules that do all that from a given calibrated model like above?</div><div>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.</div><div><br></div><div>Regards </div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr">Philippe Hatstadt</div></div></div></div> <br> <p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1370 Broadway, Suite 1450 | New York, NY | 10018</span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="https://www.exosfinancial.com/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img1.jpg" alt="https://www.exosfinancial.com/" data-unique-identifier=""></a> <a href="https://www.linkedin.com/company/meetexos/about/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img3.jpg" alt="https://www.linkedin.com/company/meetexos/about/" data-unique-identifier=""></a> <br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click </span><a href="https://www.exosfinancial.com/general-disclosures" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">here</span></a>.<br></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Confidentiality Notice</span><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">: 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. </span><br></p>_______________________________________________<br> QuantLib-users mailing list<br> <a href="mailto:Qua...@li..." target="_blank">Qua...@li...</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/quantlib-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/quantlib-users</a><br> </blockquote></div> </div></blockquote></div></div></div></div> <br> <p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1370 Broadway, Suite 1450 | New York, NY | 10018</span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="https://www.exosfinancial.com/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img1.jpg" alt="https://www.exosfinancial.com/" data-unique-identifier=""></a> <a href="https://www.linkedin.com/company/meetexos/about/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img3.jpg" alt="https://www.linkedin.com/company/meetexos/about/" data-unique-identifier=""></a> <br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click </span><a href="https://www.exosfinancial.com/general-disclosures" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">here</span></a>.<br></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Confidentiality Notice</span><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">: 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. </span><br></p> </blockquote></div> </div></blockquote></div></div> <br> <p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1370 Broadway, Suite 1450 | New York, NY | 10018</span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="https://www.exosfinancial.com/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img1.jpg" alt="https://www.exosfinancial.com/" data-unique-identifier=""></a> <a href="https://www.linkedin.com/company/meetexos/about/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img3.jpg" alt="https://www.linkedin.com/company/meetexos/about/" data-unique-identifier=""></a> <br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click </span><a href="https://www.exosfinancial.com/general-disclosures" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">here</span></a>.<br></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Confidentiality Notice</span><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">: 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. </span><br></p> </blockquote></div> </div></blockquote></div></blockquote></div> <br> <p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">31 East 32nd Street, 3rd Floor | New York, NY | 10016</span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="https://www.exosfinancial.com/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img1.jpg" alt="https://www.exosfinancial.com/" data-unique-identifier=""></a> <a href="https://www.linkedin.com/company/meetexos/about/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img3.jpg" alt="https://www.linkedin.com/company/meetexos/about/" data-unique-identifier=""></a> <br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click </span><a href="https://www.exosfinancial.com/general-disclosures" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">here</span></a>.<br></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Confidentiality Notice</span><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">: 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. </span><br></p></blockquote></div> </div></blockquote></div></body></html> <br> <p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">31 East 32nd Street, 3rd Floor | New York, NY | 10016</span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="https://www.exosfinancial.com/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img1.jpg" alt="https://www.exosfinancial.com/"></a> <a href="https://www.linkedin.com/company/meetexos/about/" target="_blank"><img src="https://exos-website-media.s3.amazonaws.com/Disclosures/img3.jpg" alt="https://www.linkedin.com/company/meetexos/about/"></a> <br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Broker-Dealer services offered through Exos Securities LLC, Member SIPC, FINRA. For important disclosures including Form CRS and Regulation BI click </span><a href="https://www.exosfinancial.com/general-disclosures" target="_blank"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">here</span></a>.<br></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;background-color:rgb(239,239,239);margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Confidentiality Notice</span><span style="background-color:transparent;font-size:9pt;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap">: 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. </span><br></p> |
|
From: Luigi B. <lui...@gm...> - 2024-02-06 12:01:02
|
Hmm—you're right, it looks like the G2 processes are only half-done. From the git logs of the C++ library, it looks like they were added 18 years ago and never updated (and probably never used either). They should be fixed there. I've opened https://github.com/lballabio/QuantLib/issues/1904 but I don't know when someone will pick it up. 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: Philippe H. <phi...@ex...> - 2024-02-05 20:42:39
|
@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
<https://www.exosfinancial.com/>
<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: Ashish B. <ash...@gm...> - 2024-02-02 15:03:53
|
Hi Luigi, Thanks for your reply. I hope to keep my code the same in new version, we only need to remove the keywords on it. No other changes are required around IV code. Regards Ashish On Fri, 2 Feb 2024 at 20:25, Luigi Ballabio <lui...@gm...> wrote: > Hello, > in version 1.30, the impliedVolatility method was overloaded (it's now > also possible to pass a dividend schedule) and SWIG can't support keyword > arguments in this case. > > In previous versions, the implied volatility was given by default a > minimum value of 0.0001 because smaller values could cause problems in the > calculations. In more recent ones, those problems were solved and we could > lower the minimum value to 1e-7. My guess is that the correct value is > 5e-5, but in version 1.27 it was below the minimum value and couldn't be > returned. The minimum value was probably good enough within accuracy and > was returned instead of the correct one. > > Hope this helps, > Luigi > > > On Fri, Feb 2, 2024 at 12:15 PM Ashish Bansal <ash...@gm...> > wrote: > >> Hi all, >> >> We are using the QL v1.27 through Python which are upgrading to recent >> version v1.32. We are calculating the implied volatility of the vanilla >> option using the ImpliedVolatility method as following: >> self.IV = option.impliedVolatility(targetValue=self.marketPremium, >> process=process) >> >> This was working fine in v1.27 but in v1.32 it is given the following >> error: >> [image: image.png] >> >> I did look at the release change log but have not found anything around >> it. >> >> Secondly, the value of same put option is showing difference in IV as >> following when i remove the keywords and run: >> v1.27: 0.0001 >> v1.32: 0.00005 (5.0100000000000005e-05) >> >> Kindly help if we need to make more changes for this. >> >> Regards >> Ashish >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2024-02-02 14:55:15
|
Hello,
in version 1.30, the impliedVolatility method was overloaded (it's now
also possible to pass a dividend schedule) and SWIG can't support keyword
arguments in this case.
In previous versions, the implied volatility was given by default a minimum
value of 0.0001 because smaller values could cause problems in the
calculations. In more recent ones, those problems were solved and we could
lower the minimum value to 1e-7. My guess is that the correct value is
5e-5, but in version 1.27 it was below the minimum value and couldn't be
returned. The minimum value was probably good enough within accuracy and
was returned instead of the correct one.
Hope this helps,
Luigi
On Fri, Feb 2, 2024 at 12:15 PM Ashish Bansal <ash...@gm...>
wrote:
> Hi all,
>
> We are using the QL v1.27 through Python which are upgrading to recent
> version v1.32. We are calculating the implied volatility of the vanilla
> option using the ImpliedVolatility method as following:
> self.IV = option.impliedVolatility(targetValue=self.marketPremium,
> process=process)
>
> This was working fine in v1.27 but in v1.32 it is given the following
> error:
> [image: image.png]
>
> I did look at the release change log but have not found anything around it.
>
> Secondly, the value of same put option is showing difference in IV as
> following when i remove the keywords and run:
> v1.27: 0.0001
> v1.32: 0.00005 (5.0100000000000005e-05)
>
> Kindly help if we need to make more changes for this.
>
> Regards
> Ashish
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2024-02-02 13:51:57
|
Hello—you can unsubscribe from https://sourceforge.net/projects/quantlib/lists/quantlib-users/unsubscribe Luigi On Fri, Feb 2, 2024 at 1:32 PM Chilamakuri, Pavani <Chi...@eb...> wrote: > OFFICIAL USE > > > > Hi, > > > > Please unsubscribe/remove me from this list: chi...@eb.... > > > > I am subscribed to this on my personal email anyway so it’s duplicate at > the moment. > > > > Thank you > > > > > > Best Regards, > > Pav > > Phone: +44(0)7769003342 > > > > > > OFFICIAL USE > > > > To learn more about EBRD classifications, visit *www.ebrd.com/ic > <http://www.ebrd.com/ic>* > > ______________________________________________________________ > > This message may contain privileged information. If you have received this > message by mistake, please keep it confidential and return it to the > sender. > > Although we have taken steps to minimise the risk of transmitting software > viruses, the EBRD accepts no liability for any loss or damage caused by > computer viruses and would advise you to carry out your own virus checks. > > The contents of this e-mail do not necessarily represent the views of the > EBRD. > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Chilamakuri, P. <Chi...@eb...> - 2024-02-02 12:28:56
|
OFFICIAL USE Hi, Please unsubscribe/remove me from this list: chi...@eb...<mailto:chi...@eb...>. I am subscribed to this on my personal email anyway so it's duplicate at the moment. Thank you Best Regards, Pav Phone: +44(0)7769003342 OFFICIAL USE To learn more about EBRD classifications, visit www.ebrd.com/ic<http://www.ebrd.com/ic> ______________________________________________________________ This message may contain privileged information. If you have received this message by mistake, please keep it confidential and return it to the sender. Although we have taken steps to minimise the risk of transmitting software viruses, the EBRD accepts no liability for any loss or damage caused by computer viruses and would advise you to carry out your own virus checks. The contents of this e-mail do not necessarily represent the views of the EBRD. |