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: Luigi B. <lui...@gm...> - 2024-02-02 12:24:38
|
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
>
|
|
From: Ashish B. <ash...@gm...> - 2024-02-02 11:12:19
|
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 |
|
From: Jason L. <lee...@gm...> - 2024-02-01 18:51:58
|
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 |
|
From: Luigi B. <lui...@gm...> - 2024-01-31 16:51:55
|
Hello Rishi,
both stepsPerYear and timeSteps specify how many steps the generated
Monte Carlo paths will have, but in different ways: by passing timeSteps
you're specifying the total number of steps independently of the maturity,
and by passing stepsPerYear instead you're specifying, well, the steps per
year from now to the maturity. You can't pass both, as you might suspect.
>From your plots, you see that the time increases linearly with the steps,
mostly because they need work to be generated.
In the case of your option, the price doesn't change noticeably because
it's a European option. Regardless of the number of steps between now and
maturity, your simulation will end up with the same generated distribution
of underlying prices at maturity (because it only depends on the drift and
vol of the process), so the price will also be the same. To see an effect,
you could try using MCAmericanBasketEngine instead. It's not documented in
the page you linked, but it exists and the parameters it takes are the same.
Hope this helps,
Luigi
On Wed, Jan 31, 2024 at 11:57 AM Rishi Sreedhar <ris...@gm...>
wrote:
> Hi, very happy to have found this list!
>
> I am a beginner in quantitative finance and just started learning about
> options pricing for a project at work.
>
> I was using the code given here (
> https://quantlib-python-docs.readthedocs.io/en/latest/pricing_engines.html#basket-options)
> to price a vanilla European call min-basket option, but couldn't understand
> the role of the 'stepsPerYear' parameter.
>
> 1.) On running the calculations, I found that the stepsPerYear parameter
> has zero influence on the price of the option. Could someone please explain
> why that is so? [attaching a plot of the option price vs stepsPerYear with
> this email]
>
> 2.) How is the stepsPerYear parameter also different from the *timeSteps *
> parameter?
>
> 3.) What are some options for which the price does depend on the
> stepsPerYear parameter?
>
> Thank you so much for looking into this!
> Cordially,
> Rishi
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Rishi S. <ris...@gm...> - 2024-01-31 10:53:48
|
Hi, very happy to have found this list! I am a beginner in quantitative finance and just started learning about options pricing for a project at work. I was using the code given here ( https://quantlib-python-docs.readthedocs.io/en/latest/pricing_engines.html#basket-options) to price a vanilla European call min-basket option, but couldn't understand the role of the 'stepsPerYear' parameter. 1.) On running the calculations, I found that the stepsPerYear parameter has zero influence on the price of the option. Could someone please explain why that is so? [attaching a plot of the option price vs stepsPerYear with this email] 2.) How is the stepsPerYear parameter also different from the *timeSteps * parameter? 3.) What are some options for which the price does depend on the stepsPerYear parameter? Thank you so much for looking into this! Cordially, Rishi |
|
From: philippe h. <pha...@ma...> - 2024-01-30 16:29:41
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Yeah that’s what I was thinking. At least I’d be making indirect C++ calls. I might try.<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 Jan 30, 2024, at 11:15 AM, Luigi Ballabio <lui...@gm...> 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...">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_-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_-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></body></html> |
|
From: Luigi B. <lui...@gm...> - 2024-01-30 16:14:21
|
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. > |
|
From: Philippe H. <phi...@ex...> - 2024-01-30 13:35:43
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body 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="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 Jan 30, 2024, at 7:24 AM, Luigi Ballabio <lui...@gm...> 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">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...">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></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">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/"></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: Philippe H. <phi...@ex...> - 2024-01-30 13:05:51
|
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body 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="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 Jan 30, 2024, at 7:33 AM, Luigi Ballabio <lui...@gm...> 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...">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_-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></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">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/"></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-01-30 12:32:15
|
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. > |
|
From: Luigi B. <lui...@gm...> - 2024-01-30 12:23:43
|
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 > |
|
From: Luigi B. <lui...@gm...> - 2024-01-30 10:29:21
|
Yes, same issue as https://github.com/lballabio/QuantLib/issues/1855. Right now the helper assumes dates are either IMM or ASX dates depending on what it's told. We should probably implement a third case that leaves the dates free. We can also implement more rules if we want to check those. Luigi On Mon, Jan 1, 2024 at 4:41 PM Francois Botha <ig...@gm...> wrote: > Hi Robert, > > I don't know much about ASX dates, but I can see in the code at > https://github.com/lballabio/QuantLib/blob/7dfe04c3797552f8853f0368eb8f7c07ef7051cd/ql/time/asx.cpp#L38 > that if the relevant date is not a Friday, it is not considered valid. 13 > March 2024 is a Thursday and that's why you're seeing the message. > > Whether the business logic behind that function is sound... I don't know. > > regards > Francois Botha > > > On Mon, 1 Jan 2024 at 11:28, Robert Chapman <rob...@gm...> > wrote: > >> Has anyone run into this problem? I'm trying to use New Zealand 90 Day >> Bank Bill Futures to build a curve. >> When I try to create the helper, I'm getting: March 13th, 2024 is not a >> valid ASX date >> >> >> >> ############################################################### >> >> # ZBH4 Comdty >> >> # SFE NZ 90 Day Bank Bill Future Contract (Sydney >> Futures Exchange) >> >> # RuntimeError: March 13th, 2024 is not a valid ASX >> date >> >> helper = ql.FuturesRateHelper(94.46, >> >> ql.Date(13, 3, 2024), >> >> ql.Date(), >> >> ql.Actual365Fixed(), >> >> 0.0, >> >> ql.Futures.ASX) >> >> >> >> It works for an ASX futures contract: >> >> >> >> ############################################################### >> >> # IRH4 Comdty >> >> # ASX 90 Day Bank Accepted Bills Future Contract >> >> # *works fine !* >> >> helper = ql.FuturesRateHelper(95.720, >> >> ql.Date(8, 3, 2024), >> >> ql.Date(), >> >> ql.Actual365Fixed(), >> >> 0.0, >> >> ql.Futures.ASX) >> >> >> >> print(f'helper maturity date: {helper.maturityDate()} >> ') >> >> >> ############################################################### >> >> Do I need to build a custom helper or something? >> >> >> >> Robert Chapman >> +61 418 693 633 >> rob...@gm... >> au.linkedin.com/in/robertchapman2095 >> >> _______________________________________________ >> 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-01-30 09:36:22
|
Hello Amir,
the call in your code:
ql_rc = ql.CashFlows.yieldRate(BondLeg, dirty_val,
ql.Actual365Fixed(), ql.Compounded, ql.Continuous, True)
should instead be:
ql_rc = ql.CashFlows.yieldRate(BondLeg, dirty_val,
ql.Actual365Fixed(), ql.Continuous, ql.NoFrequency, True)
that is, "continuous" is not a frequency to associate to "compounded", but
a compounding method in its own right. Unfortunately Python doesn't have
real enums so it can't warn of this, and the first call was interpreting
the numeric value of ql.Continuous, 2, as semiannual frequency. The second
call gives the result you expect.
May you point us to the documentation you used to write the call? It's
probably in need of clarification. Thanks!
Luigi
On Mon, Jan 29, 2024 at 11:20 PM Amir Lakha <ami...@gm...> wrote:
> Hi Quantlib Users,
>
> I am having some difficulties in reconciling the yield to maturity
> calculation for a stream of cashflows.
>
> I have attached the jupyter notebook with my code.
>
> In the code, I take vectors of dates and amounts to create a BondLeg, to
> which I assign a dirty_value.
>
> I use ql.Cashflows.yieldRate to calculate an Annually Compounding and
> Continuous Compounding Yield to Maturity.
>
> I generate the yearFraction for the dates using the same daycount basis
> used to calculate the yields.
>
>
> I then use a PYOMO Non Linear Optimization Solver (ipopt) to solve for the
> yield to maturities using the yearfractions, cashflow amounts and
> dirty_value.
>
> The PYOMO annually compounding yield is within 1bp of the QuantLib yield.
> However, the QuantLib continuously compounding yield is 13bp higher than
> the PYOMO yield.
>
> Any help in figuring out what I am doing wrong would be much appreciated.
>
> PS, Excel using Goal Seek gives me the same answers as PYOMO as one would
> expect.
>
> Many thanks in advance,
>
> Best,
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Amir L. <ami...@gm...> - 2024-01-29 22:16:39
|
Hi Quantlib Users, I am having some difficulties in reconciling the yield to maturity calculation for a stream of cashflows. I have attached the jupyter notebook with my code. In the code, I take vectors of dates and amounts to create a BondLeg, to which I assign a dirty_value. I use ql.Cashflows.yieldRate to calculate an Annually Compounding and Continuous Compounding Yield to Maturity. I generate the yearFraction for the dates using the same daycount basis used to calculate the yields. I then use a PYOMO Non Linear Optimization Solver (ipopt) to solve for the yield to maturities using the yearfractions, cashflow amounts and dirty_value. The PYOMO annually compounding yield is within 1bp of the QuantLib yield. However, the QuantLib continuously compounding yield is 13bp higher than the PYOMO yield. Any help in figuring out what I am doing wrong would be much appreciated. PS, Excel using Goal Seek gives me the same answers as PYOMO as one would expect. Many thanks in advance, Best, |
|
From: Michael K. <mk...@ya...> - 2024-01-29 03:22:52
|
Hi Ben, I utilize the following approach to serialize JSON to and from QuantLib calls; however, this process relies on the QuantLibAddinCpp-Old interface. By using the GenSrc package, I create serializable Python classes and C++ classes to make QuantLibAddin interface calls. This approach enables me to serialize JSON to C++/QuantLibAddin and build REST services that invoke QuantLib. Project - ql_rest: https://github.com/mkipnis/ql_rest QuantLibAddin - OLD https://github.com/eehlers/QuantLibAddin-Old GenSrc - https://github.com/eehlers/QuantLibAddin-Old/tree/master/gensrc Example of the generated serializable Python file: https://github.com/mkipnis/ql_rest/blob/master/qlrest/python_package/src/ql_rest/vanillaswap.py Example of the generated C++ file that de-serializes JSON to QuantLibAddin calls: https://github.com/mkipnis/ql_rest/blob/master/qlrest/vanillaswap_reader.cpp Use cases: Pricing of US Government bonds over the REST-API : https://github.com/mkipnis/ql_rest/tree/master/Examples/bond_pricer https://ustreasuries.online <https://ustreasuries.online/> Pricing options from the React front-end through the Django proxy: https://github.com/mkipnis/ql_rest/tree/master/Examples/options_monitor https://www.greeksandvols.com Hope this helps, Mike > On Jan 26, 2024, at 7:21 AM, qua...@li... wrote: > > Send QuantLib-users mailing list submissions to > qua...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/quantlib-users > or, via email, send a message with subject or body 'help' to > qua...@li... > > You can reach the person managing the list at > qua...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of QuantLib-users digest..." > Today's Topics: > > 1. Re: [Quantlib-dev] Serialization of Quantlib in Python > (Luigi Ballabio) > > From: Luigi Ballabio <lui...@gm...> > Subject: Re: [Quantlib-users] [Quantlib-dev] Serialization of Quantlib in Python > Date: January 25, 2024 at 10:27:59 AM EST > To: Ben Watson <ben...@ma...> > Cc: QuantLib users <qua...@li...>, QuantLib developers <qua...@li...>, QuantLib announce <qua...@li...> > > > Hello Ben, > no, as you guessed there's no serializer in C++. > > Best, > Luigi > > > On Tue, Jan 23, 2024 at 8:21 AM Ben Watson <ben...@ma... <mailto:ben...@ma...>> wrote: >> I probably know the answer to this already, but I have a number of use cases to serialise Quantlib objects. I do know that it is possible with QuantlibXL. But I have not see anything viable for python. Is there a C++ serialiser? If so is there any possibility to port it to Python? >> >> I am working on an interface to Quantlib will have all of the parameters in JSON and can easily reconstruct the objects, but this is just parameter serialization. Ideally having full object serialization would be the go. >> >> Regards >> >> Ben >> >> >> >> >> >> _______________________________________________ >> QuantLib-dev mailing list >> Qua...@li... <mailto:Qua...@li...> >> https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: Luigi B. <lui...@gm...> - 2024-01-26 15:29:03
|
Hi, unfortunately the type for both the vol spreads and the parameter
guesses is a bit clumsy—it's std::vector<std::vector<Handle<Quote>>>.
Before creating the cube you'll have to write
volSpreads = [[ql.QuoteHandle(ql.SimpleQuote(x)) for x in row] for row in
volSpreads]
paramGuesses = [[ql.QuoteHandle(ql.SimpleQuote(x)) for x in row] for row in
[(0.1,0.1,0.1,0.1)] * 6]
after which the following call works:
ql.SabrSwaptionVolatilityCube( swaptionVolHandle,
optionTenors,
swapTenors,
strikeSpreads,
volSpreads,
swapIndexBase,
shortSwapIndexBase,
vegaWeightedSmileFit,
paramGuesses,
(False, False, False, False),
True
)
Hope this helps,
Luigi
On Sat, Dec 23, 2023 at 1:39 AM Renren Dong <dr...@gm...> wrote:
> Hi Quantlib Users,
>
> I am very new to QuantLib and its Python interface, so apologies if this
> was obvious.
>
> I was trying to figure out how to use ql.SabrSwaptionVolatilityCube, I
> can't seem to find a working example on how to work.
>
> Here are the closest I got so far.
>
> many thanks in advance,
> thank you
> -Renren
>
>
>
> optionTenors = ['1y', '2y', '3y']
> swapTenors = [ '5Y', '10Y']
>
> normal_vols = [
> [50, 60],
> [70, 80],
> [90, 95]]
>
> normal_vols = [[vol / 10000 for vol in row] for row in normal_vols]
> swapTenors = [ql.Period(tenor) for tenor in swapTenors]
> optionTenors = [ql.Period(tenor) for tenor in optionTenors]
> normal_vols = [[vol / 10000 for vol in row] for row in normal_vols]
>
>
> calendar = ql.TARGET()
> bdc = ql.ModifiedFollowing
> dayCounter = ql.ActualActual(1)
>
> swaptionVolMatrix = ql.SwaptionVolatilityMatrix(calendar
> , bdc
> , optionTenors
> , swapTenors
> , ql.Matrix(normal_vols)
> , dayCounter
> , False
> , ql.Normal)
>
> swaptionVolHandle = ql.SwaptionVolatilityStructureHandle(swaptionVolMatrix)
>
>
> strikeSpreads = [ -0.01, 0.0, 0.01]
> volSpreads = [
> [0.5, 0.55, 0.6],
> [0.5, 0.55, 0.6],
> [0.5, 0.55, 0.6],
> [0.5, 0.55, 0.6],
> [0.5, 0.55, 0.6],
> [0.5, 0.55, 0.6],
> ]
>
> ###
>
> oisQuote = ql.QuoteHandle(ql.SimpleQuote(0.04))
>
> ytsOis = ql.FlatForward(today, oisQuote, ql.Actual360())
> ytsOis.enableExtrapolation()
> t0_Ois = ql.YieldTermStructureHandle(ytsOis)
>
> swapIndexBase = ql.EuriborSwapIsdaFixA(ql.Period(1, ql.Years), t0_Ois,
> t0_Ois)
> shortSwapIndexBase = ql.EuriborSwapIsdaFixA(ql.Period(1, ql.Years),
> t0_Ois, t0_Ois)
>
>
> ##
> vegaWeightedSmileFit = False
>
> ql.SabrSwaptionVolatilityCube( swaptionVolHandle,
> optionTenors,
> swapTenors,
> strikeSpreads,
> volSpreads,
> swapIndexBase,
> shortSwapIndexBase,
> vegaWeightedSmileFit,
> [(0.1,0.1,0.1,0.1) ] * 6,
> (False, False, False, False),
> True
> )
>
>
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2024-01-25 15:28:19
|
Hello Ben,
no, as you guessed there's no serializer in C++.
Best,
Luigi
On Tue, Jan 23, 2024 at 8:21 AM Ben Watson <ben...@ma...>
wrote:
> I probably know the answer to this already, but I have a number of use
> cases to serialise Quantlib objects. I do know that it is possible with
> QuantlibXL. But I have not see anything viable for python. Is there a C++
> serialiser? If so is there any possibility to port it to Python?
>
> I am working on an interface to Quantlib will have all of the parameters
> in JSON and can easily reconstruct the objects, but this is just parameter
> serialization. Ideally having full object serialization would be the go.
>
> Regards
>
> Ben
>
>
>
>
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
|
|
From: Philippe H. <phi...@ex...> - 2024-01-24 18:59:49
|
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 <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: Ben W. <ben...@ma...> - 2024-01-23 07:19:25
|
I probably know the answer to this already, but I have a number of use cases to serialise Quantlib objects. I do know that it is possible with QuantlibXL. But I have not see anything viable for python. Is there a C++ serialiser? If so is there any possibility to port it to Python? I am working on an interface to Quantlib will have all of the parameters in JSON and can easily reconstruct the objects, but this is just parameter serialization. Ideally having full object serialization would be the go. Regards Ben |
|
From: Luigi B. <lui...@gm...> - 2024-01-22 10:06:00
|
QuantLib 1.33 is available for download at < https://www.quantlib.org/download.shtml>. The list of changes for this release is at < https://www.quantlib.org/reference/history.html>. If you have any problems with this release, please report them here on the QuantLib mailing list (<qua...@li...>), or open a GitHub issue at <https://github.com/lballabio/quantlib/issues>. Starting from release 1.32, a semi-official C# package is also available from NuGet (see <https://www.nuget.org/packages/QuantLib/>). It should work on Windows and OS X, but it's not guaranteed to work on all Linux distributions; we'll be grateful for any reports, either of successes or failures. |
|
From: Wei Li <ttl...@gm...> - 2024-01-19 02:20:14
|
Sure thing Luigi, I'll try to do that. Thank you for your explanation! Cheers, Wei On Thu, Jan 18, 2024 at 11:08 PM Luigi Ballabio <lui...@gm...> wrote: > Hello, > there's no such class at this time, but it can be written in much the > same way as ZeroSpreadedTermStructure, so that it takes a handle to a > generic vol structure and adds the spread. In fact, it would be great if > you contributed it. > > Cheers, > Luigi > > > Il Mer 17 Gen 2024, 04:26 Wei Li <ttl...@gm...> ha scritto: > >> Hello Luigi, >> >> Thank you for your reply. I actually discovered >> the ZeroSpreadedTermStructure after my original post, and I think it can >> solve half of my problem. The other half is for the volatility surfaces. We >> have our derived class from BlackVolatilityTermStructure to store the smile >> sections, as well as a constant spread handle. And it is this class that we >> are caching (in the cache the spread value now is 0). And now we need to >> assign different spreads to different trades. So is there an equivalent >> class for spreaded BlackVolatilityTermStructure? If not , I guess I can >> modify our derived class . >> >> Cheers, >> Wei >> >> On Tue, Jan 16, 2024 at 6:31 PM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello, >>> shallow copy is the C++ default, and I'm afraid we never bothered >>> with deep copy since most of the time ters structures are passed around by >>> shared_ptr anyway. >>> If BASE_TS is your derived class, you can implement a copy constructor. >>> Otherwise, do you really need a copy to add a spread? As an alternative, >>> you might pass around your original base term structure and add a constant >>> spread by means of a class like ZeroSpreadedTermStructure (see >>> https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/yield/zerospreadedtermstructure.hpp >>> ). >>> >>> Hope this helps, >>> Luigi >>> >>> >>> On Tue, Jan 2, 2024 at 6:55 AM Wei Li <ttl...@gm...> wrote: >>> >>>> Dear all, >>>> >>>> Happy new year to all! >>>> >>>> In our c++ project we are caching our term structures / vol surfaces >>>> calibrated from real time market data. And during the calculation we need >>>> to assign different spread values for different trades. For example, for >>>> TRADE_A, the risk free term structure would be BASE_TS with a constant 0.01 >>>> spread, and for TRADE_B, it would be the same BASE_TS with a constant 0.02 >>>> spread. And we are caching BASE_TS since it makes only sense to us (we have >>>> our derived classes of YieldTermStructure and VolTermStructure to add the >>>> spreads, in case you were wondering). >>>> >>>> But how can I make a deep copy of BASE_TS and use this copy with >>>> arbitrary spread values to the calculation? I tried the (default) copy >>>> constructors of the classes and they are apparently shallow-copied. So how >>>> can I achieve this? It doesn't need to be the deep copy of the bases, it >>>> can also be the deep copy of the shared_ptr / handle, as long as it does >>>> the trick. >>>> >>>> Thank you very much! >>>> >>>> Cheers, >>>> Wei >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> |
|
From: Luigi B. <lui...@gm...> - 2024-01-18 15:08:58
|
Hello,
there's no such class at this time, but it can be written in much the
same way as ZeroSpreadedTermStructure, so that it takes a handle to a
generic vol structure and adds the spread. In fact, it would be great if
you contributed it.
Cheers,
Luigi
Il Mer 17 Gen 2024, 04:26 Wei Li <ttl...@gm...> ha scritto:
> Hello Luigi,
>
> Thank you for your reply. I actually discovered
> the ZeroSpreadedTermStructure after my original post, and I think it can
> solve half of my problem. The other half is for the volatility surfaces. We
> have our derived class from BlackVolatilityTermStructure to store the smile
> sections, as well as a constant spread handle. And it is this class that we
> are caching (in the cache the spread value now is 0). And now we need to
> assign different spreads to different trades. So is there an equivalent
> class for spreaded BlackVolatilityTermStructure? If not , I guess I can
> modify our derived class .
>
> Cheers,
> Wei
>
> On Tue, Jan 16, 2024 at 6:31 PM Luigi Ballabio <lui...@gm...>
> wrote:
>
>> Hello,
>> shallow copy is the C++ default, and I'm afraid we never bothered
>> with deep copy since most of the time ters structures are passed around by
>> shared_ptr anyway.
>> If BASE_TS is your derived class, you can implement a copy constructor.
>> Otherwise, do you really need a copy to add a spread? As an alternative,
>> you might pass around your original base term structure and add a constant
>> spread by means of a class like ZeroSpreadedTermStructure (see
>> https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/yield/zerospreadedtermstructure.hpp
>> ).
>>
>> Hope this helps,
>> Luigi
>>
>>
>> On Tue, Jan 2, 2024 at 6:55 AM Wei Li <ttl...@gm...> wrote:
>>
>>> Dear all,
>>>
>>> Happy new year to all!
>>>
>>> In our c++ project we are caching our term structures / vol surfaces
>>> calibrated from real time market data. And during the calculation we need
>>> to assign different spread values for different trades. For example, for
>>> TRADE_A, the risk free term structure would be BASE_TS with a constant 0.01
>>> spread, and for TRADE_B, it would be the same BASE_TS with a constant 0.02
>>> spread. And we are caching BASE_TS since it makes only sense to us (we have
>>> our derived classes of YieldTermStructure and VolTermStructure to add the
>>> spreads, in case you were wondering).
>>>
>>> But how can I make a deep copy of BASE_TS and use this copy with
>>> arbitrary spread values to the calculation? I tried the (default) copy
>>> constructors of the classes and they are apparently shallow-copied. So how
>>> can I achieve this? It doesn't need to be the deep copy of the bases, it
>>> can also be the deep copy of the shared_ptr / handle, as long as it does
>>> the trick.
>>>
>>> Thank you very much!
>>>
>>> Cheers,
>>> Wei
>>> _______________________________________________
>>> QuantLib-users mailing list
>>> Qua...@li...
>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>
>>
|
|
From: Wei Li <ttl...@gm...> - 2024-01-17 03:27:07
|
Hello Luigi, Thank you for your reply. I actually discovered the ZeroSpreadedTermStructure after my original post, and I think it can solve half of my problem. The other half is for the volatility surfaces. We have our derived class from BlackVolatilityTermStructure to store the smile sections, as well as a constant spread handle. And it is this class that we are caching (in the cache the spread value now is 0). And now we need to assign different spreads to different trades. So is there an equivalent class for spreaded BlackVolatilityTermStructure? If not , I guess I can modify our derived class . Cheers, Wei On Tue, Jan 16, 2024 at 6:31 PM Luigi Ballabio <lui...@gm...> wrote: > Hello, > shallow copy is the C++ default, and I'm afraid we never bothered with > deep copy since most of the time ters structures are passed around by > shared_ptr anyway. > If BASE_TS is your derived class, you can implement a copy constructor. > Otherwise, do you really need a copy to add a spread? As an alternative, > you might pass around your original base term structure and add a constant > spread by means of a class like ZeroSpreadedTermStructure (see > https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/yield/zerospreadedtermstructure.hpp > ). > > Hope this helps, > Luigi > > > On Tue, Jan 2, 2024 at 6:55 AM Wei Li <ttl...@gm...> wrote: > >> Dear all, >> >> Happy new year to all! >> >> In our c++ project we are caching our term structures / vol surfaces >> calibrated from real time market data. And during the calculation we need >> to assign different spread values for different trades. For example, for >> TRADE_A, the risk free term structure would be BASE_TS with a constant 0.01 >> spread, and for TRADE_B, it would be the same BASE_TS with a constant 0.02 >> spread. And we are caching BASE_TS since it makes only sense to us (we have >> our derived classes of YieldTermStructure and VolTermStructure to add the >> spreads, in case you were wondering). >> >> But how can I make a deep copy of BASE_TS and use this copy with >> arbitrary spread values to the calculation? I tried the (default) copy >> constructors of the classes and they are apparently shallow-copied. So how >> can I achieve this? It doesn't need to be the deep copy of the bases, it >> can also be the deep copy of the shared_ptr / handle, as long as it does >> the trick. >> >> Thank you very much! >> >> Cheers, >> Wei >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2024-01-16 10:51:42
|
Hi,
the settlement days passed to the constructor are used to calculate a
default settlement date based on the evaluation date. Some of the methods
of the Bond class allow to override the settlement date, others don't and
will use the default.
Luigi
On Wed, Nov 29, 2023 at 8:49 PM Philippe Hatstadt via QuantLib-users <
qua...@li...> wrote:
> I use Python, but this obviouslyt appleis to C++. Most/all signatures
> require settlementDays like this one: ql.FixedRateBond(settlementDays,
> faceAmount, schedule, coupon, paymentConvention).
> I do not really understand why settlement days (or settlement date) needs
> to be an attribute of a Bond, as the latter should be immutable.
> Furthermore, methods such as ql.FixedrateBond.bondYield() requires a
> settlement date, which is quite normal. But then what is the point of
> having settle days/ date as a mandatory attribute of the Bond class
> constructor when it is correctly required to do any type of bond math
> calculations?
> Now, let's assume I build a US Govt bond with settlementDays=1. What
> happens if I want to compute a forward bond price with say T+5 settlement
> lag. I could directly pass such settlement date to bondYield() without
> rebuilding the bond object with settleDays=5 instead of 1.
> So can you confirm that doing the above effectively overrides the
> settleDays lag built in the bond class?Although passing settleDays=1 to
> build the bond seems redundant, I suppsoe it it required, which is fine.
>
> Regards Philippe Hatstadt 203-252-0408 pha...@ma...
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2024-01-16 10:38:17
|
Hello,
it looks like it should work, but I can't really try your code since
it's missing a few bits (the code for build_ql_schedule and
schedule_builder.build_schedule). Any chance you can provide a runnable
example? Thanks!
Luigi
On Mon, Dec 18, 2023 at 12:39 AM Chilamakuri, Pavani <Chi...@eb...>
wrote:
> OFFICIAL USE
>
>
>
> Having issues instantiating a Vanilla swap using ql.VanillaSwap. I read
> online and tried ql.Actual365Fixed() as well as
> q.Actual365Fixed(q.Actual365Fixed.Standard). Not sure if the daycounter is
> the problem or the EUR3M_index. I also tried index_curve_handle and no
> luck. My goal is to get the par swap rate.
>
> I cannot seem to find a resolution and no idea exactly which argument to
> ql.ValillaSwap has the problem:
>
> Exception has occurred: TypeError Wrong number or type of arguments for
> overloaded function 'new_VanillaSwap'. Possible C/C++ prototypes are:
> VanillaSwap::VanillaSwap(Swap::Type,Real,Schedule const &,Rate,DayCounter
> const &,Schedule const &,ext::shared_ptr< IborIndex > const
> &,Spread,DayCounter const &,boost::optional< bool >)
> VanillaSwap::VanillaSwap(Swap::Type,Real,Schedule const &,Rate,DayCounter
> const &,Schedule const &,ext::shared_ptr< IborIndex > const
> &,Spread,DayCounter const &) File
> "C:\Pavani\aValidations\AMC_SwapSingleCcy_Bermudan\PythonCode\ASwapSingleCcyBermPricer_v2\swap.py",
> line 136, in get_par_swap_rate ir_swap =
> ql.VanillaSwap(ql.VanillaSwap.Receiver, notional, fixed_schedule, File
>
>
>
>
>
> My code below:
>
> def get_par_swap_rate(self, exp_date, market_index: YieldCurve, market_disc: YieldCurve, calendar):
>
> ql_mat_dates = []
>
> maturity_date = exp_date + relativedelta(years=1)
>
> schedule_builder = build_ql_schedule()
>
> fixed_tenor = "1Y"
>
> fixed_calendar = "TAR"
>
> fixed_convention = "MODFOLLOWING"
>
> fixed_schedule = schedule_builder.build_schedule(exp_date,
>
> maturity_date,
>
> fixed_tenor,
>
> fixed_calendar,
>
> fixed_convention,
>
> fixed_convention,
>
> date_generation =
> ql.DateGeneration.Forward,
>
> end_of_month = False)
>
> floating_tenor = "3M"
>
> floating_calendar = "TAR"
>
> floating_convention = "MODFOLLOWING"
>
>
>
> floating_schedule = schedule_builder.build_schedule(exp_date,
>
> maturity_date,
>
> floating_tenor,
>
> floating_calendar,
>
>
> floating_convention,
>
> floating_convention,
>
> date_generation =
> ql.DateGeneration.Forward,
>
> end_of_month = False)
>
>
>
>
>
> notional = 50000000
>
> currency = 'EUR'
>
> fixed_rate = 0.00192
>
> # fixed_rate = 0.025
>
> fixed_leg_daycount = ql.Actual365Fixed()
>
> float_spread = -0.0033
>
> float_leg_daycount = ql.Actual360()
>
>
>
> startDateList = exp_date.year, exp_date.month, exp_date.day
>
> # parse python datetime.date into QuantLib date format
>
> ql_start_date = ql.Date(startDateList[2], startDateList[1],
> startDateList[0])
>
>
>
> # set up index_curve in QuantLib
>
> index_tenors = market_index.tenors
>
> for tnr in index_tenors:
>
> period = ql.Period(tnr, ql.Days)
>
> ql_mat_date = ql_start_date + period
>
> ql_mat_dates.append(ql_mat_date)
>
> index_rates = market_index.rates
>
> ql_day_count = ql.Actual365Fixed(ql.Actual365Fixed.Standard)
>
> ql_calendar = ql.TARGET()
>
> interpolation = ql.Linear()
>
> compounding = ql.Compounded
>
> compounding_frequency = ql.Daily
>
> index_term_structure = ql.ZeroCurve( ql_mat_dates, index_rates,
> ql_day_count,
>
> ql_calendar, interpolation,
>
> compounding, compounding_frequency)
>
> index_curve_handle = ql.YieldTermStructureHandle(index_term_structure)
>
>
>
> # set up index_curve in QuantLib
>
> ql_mat_dates.clear()
>
> discount_tenors = market_disc.tenors
>
> for tnr in discount_tenors:
>
> period = ql.Period(tnr, ql.Days)
>
> ql_mat_date = ql_start_date + period
>
> ql_mat_dates.append(ql_mat_date)
>
> disc_curve_rates = market_disc.rates
>
> ql_day_count = ql.Actual365Fixed(ql.Actual365Fixed.Standard)
>
> ql_calendar = ql.TARGET()
>
> interpolation = ql.Linear()
>
> compounding = ql.Compounded
>
> compounding_frequency = ql.Daily
>
> disc_term_structure = ql.ZeroCurve(ql_mat_dates, disc_curve_rates,
> ql_day_count,
>
> ql_calendar, interpolation,
>
> compounding, compounding_frequency)
>
> disc_curve_handle = ql.YieldTermStructureHandle(disc_term_structure)
>
>
>
> EUR3M_index = ql.Euribor3M(index_curve_handle)
>
> libor3M_index = ql.USDLibor(ql.Period(3, ql.Months),
> index_curve_handle)
>
> #swap = ql.VanillaSwap(
>
> # ql.VanillaSwap.Payer, 10000.0,
>
> # fixed_schedule, 0.02, ql.Thirty360(ql.Thirty360.BondBasis),
>
> # floating_schedule, index, 0.0, ql.Actual360()
>
> # )
>
> ir_swap = ql.VanillaSwap(ql.VanillaSwap.Receiver, notional,
> fixed_schedule,
>
> fixed_rate, fixed_leg_daycount,
> floating_schedule,
>
> EUR3M_index, float_spread, float_leg_daycount)
>
> swap_engine = ql.DiscountingSwapEngine(disc_curve_handle)
>
> ir_swap.setPricingEngine(swap_engine)
>
> par_swap_rate = ir_swap.fairRate()
>
> return par_swap_rate
>
>
>
>
>
> 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
>
|