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
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: jian Xu <jia...@gm...> - 2021-02-11 20:13:00
|
Hi, I noticed that FixedRateBond has dayCounter() and frequency() methods, but the FloatingRateBond does not. What's the reason for that? It seems to me that dayCounter and frequency are equally valid concepts for floating and fixed rate bonds. Or am I missing something? Thanks. Jian |
|
From: Steven V. H. <sh...@op...> - 2021-02-10 15:37:01
|
Hi Jian, There is no business day rule applied to 25/12 and 26/12. So 28/12 is and should not be a holiday in Quantlib or in general. Kind regards, Steven > Op 10 feb. 2021 om 16:09 heeft jian Xu <jia...@gm...> het volgende geschreven: > > Hi, > My understanding is that the Target Calendar should have both Dec-25, > and Dec-26 as holiday. And since 2020-12-26 a Saturday, then > 2020-12-28 Monday should be a holiday. Is this correct? > > But when I tried quantlib, I got 2020-12-28 as a business day. Am I > missing something? Thanks. > >>>> target_cal = ql.TARGET() >>>> target_cal.isBusinessDay(ql.Date(28, 12, 2020)) > True > > Regards, > Jian > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users |
|
From: jian Xu <jia...@gm...> - 2021-02-10 15:08:14
|
Hi, My understanding is that the Target Calendar should have both Dec-25, and Dec-26 as holiday. And since 2020-12-26 a Saturday, then 2020-12-28 Monday should be a holiday. Is this correct? But when I tried quantlib, I got 2020-12-28 as a business day. Am I missing something? Thanks. >>> target_cal = ql.TARGET() >>> target_cal.isBusinessDay(ql.Date(28, 12, 2020)) True Regards, Jian |
|
From: Luigi B. <lui...@gm...> - 2021-02-10 09:22:57
|
Hello everybody,
I wanted to give you a heads-up on the fact that in the next release
we'll start using C++11 features in the library. As usual, the changes
shouldn't impact code you've written based on QuantLib, but just in case
I've written a post listing a few possible gotchas and relative workarounds:
https://www.implementingquantlib.com/2021/02/leaving-03-for-real.html
Regards,
Luigi
|
|
From: Michael M. <mic...@gm...> - 2021-02-05 17:52:01
|
Hello, I am new to QuantLib. I am building a system that prices CLO tranches, which produce arbitrary forward cash flows. The tranches are typically floating rate notes, although some are fixed-rate notes. I need to price both types of notes. I viewed the QuantLib videos that describe bond pricing (including the dm calc), which all make perfect sense... but my cashflows are arbitrary (the tranche balances vary, and do not always pay in full). Is there an appropriate QuantLib class to represent a credit-sensitive tranche, or would I simply represent the forward cash flows as a series of SimpleCashFlow instances? I am guessing the answer is here: https://quantlib-python-docs.readthedocs.io/en/latest/cashflows.html but I do not know quite where to start. Thanks for any assistance, -- Michael Megliola |
|
From: Aleksis A. R. <ale...@go...> - 2021-02-04 06:54:11
|
Hi, regarding 2/ - to my knowledge the swaptionvolmatrix only accepts either black, shifted black or normal vols as quotes. I believe you should be able to use something like bachelierBlackFormulaImpliedVol() to convert premiums to implied vols, which you can then feed into the swptionvolmatrix. > On 3 Feb 2021, at 23:21, T O <tm...@ho...> wrote: > > Hello, > > I have two somewhat unrelated questions. > > 1.) I was looking to implement Hagan's Delta risk hedging via waves. In order to calculate the box shifts in the instantaneous forward rate can I use the ForwardSpreadedTermStructure to revalue the portfolio? I don't actually see how you can set the spread between 2 dates, but was curious if there's a way. > > > 2.) Is there a way to feed SwaptionVolMatrix and swaptionvolcube2 forward premiums directly to imply normal vols? or do I have to do this in steps. convert to spot prem and get implied vol for each point on the surface/cube. > > Thanks, > TO > > > > > Sent from Outlook <http://aka.ms/weboutlook> > _______________________________________________ > QuantLib-users mailing list > Qua...@li... <mailto:Qua...@li...> > https://lists.sourceforge.net/lists/listinfo/quantlib-users <https://lists.sourceforge.net/lists/listinfo/quantlib-users> |
|
From: T O <tm...@ho...> - 2021-02-03 23:21:27
|
Hello, I have two somewhat unrelated questions. 1.) I was looking to implement Hagan's Delta risk hedging via waves. In order to calculate the box shifts in the instantaneous forward rate can I use the ForwardSpreadedTermStructure to revalue the portfolio? I don't actually see how you can set the spread between 2 dates, but was curious if there's a way. 2.) Is there a way to feed SwaptionVolMatrix and swaptionvolcube2 forward premiums directly to imply normal vols? or do I have to do this in steps. convert to spot prem and get implied vol for each point on the surface/cube. Thanks, TO Sent from Outlook<http://aka.ms/weboutlook> |
|
From: Eric E. <eri...@re...> - 2021-01-26 14:55:41
|
QuantLibXL / ObjectHandler 1.21 Released QuantLibXL, QuantLibAddin, ObjectHandler, and gensrc version 1.21 have been released and are available for download: https://bintray.com/quantlib/releases/QuantLibXL/1.21#files QuantLibAddin http://www.quantlibaddin.org QuantLibAddin exports the QuantLib interface to a variety of end user platforms. QuantLibXL http://www.quantlibxl.org QuantLibXL is the implementation of QuantLibAddin for Microsoft Excel. The QuantLibXL project includes a binary release comprising a compiled Addin and example workbooks. ObjectHandler http://www.objecthandler.org ObjectHandler implements a repository where objects can be stored, shared, updated, interrogated, and destroyed. This facilitates object orientation in procedural environments such as spreadsheets. |
|
From: Francois B. <ig...@gm...> - 2021-01-20 09:49:42
|
Hi Eric, I tested and it looks good to me. thanks Francois Botha On Mon, 18 Jan 2021 at 18:15, Eric Ehlers <eri...@re...> wrote: > Hi All, > > A preliminary build of QuantLibXL version 1.21 is available at this link: > > https://bintray.com/quantlib/prerelease/QuantLibXL/1.21_prerelease#files > > I would be grateful to anyone who could test it and let me know if it's OK. > > I believe that I have merged all of the pull requests that I have > received, and responded to other queries. If I forgot anything please > let me know. > > Kind Regards, > Eric > > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Luigi B. <lui...@gm...> - 2021-01-20 09:08:04
|
Hello everybody,
QuantLib 1.21 has been released and is available for download at <
https://www.quantlib.org/download.shtml>.
The list of changes for this release is at <
https://www.quantlib.org/reference/history.html>.
Please report any problems you have with this release to the QuantLib
mailing list (<qua...@li...>), or open a GitHub
issue at <https://github.com/lballabio/quantlib/issues>.
|
|
From: Amine I. <ami...@gm...> - 2021-01-19 11:37:07
|
Hi all, I am trying to use a classic Least Squares minimisation in QL. I came across the Least Sq cost function, and the value() method of this cost function makes a call to targetAndValue() method which is implemented in the FitAcfProblem class. I guess this has to do with the AutoCorrelationFunction implementation of Garch in the library. I would be grateful if someone could explain to me the logic behind the design, as all I want to use is a simple Least Squares regressor to calibrate certain parameters in a model. Do I maybe have to write a customised CostFunction? Thanks for your help, Amine N.B: I am using an old version of QuantLib (1.9.2) |
|
From: Peter C. <pca...@gm...> - 2021-01-19 08:37:59
|
HI Aleksis, what I meant was to keep the basket (i.e. strike,
maturity) constant, but still recalibrate the model under each
scenario.
Thanks, Peter
On Tue, 19 Jan 2021 at 09:29, Aleksis Ali Raza
<ale...@go...> wrote:
>
> Hi Peter. If I don't recompute and recalibrate the basket after each bump in the swaption vol cube, then I see no sensitivity impact at all when recomputing the bumped NPVs (so the bump risk returns a zero grid).
>
> I have resorted to using 16 points/3.0 std devs in the integration scheme - this has had made the computation bearable without too much loss of accuracy.
>
> Thanks, Aleksis
>
> > On 18 Jan 2021, at 16:57, Peter Caspers <pca...@gm...> wrote:
> >
> > Hi Aleksis,
> >
> > computing the calibration basket via 'MaturityStrikeByDeltaGamma' is
> > quite time consuming, so I'd try to compute the basket only once
> > (under the base scenario) and reuse it for each sensitivity bump
> > scenario.
> >
> > Thanks
> > Peter
> >
> > On Sun, 17 Jan 2021 at 13:52, Aleksis Ali Raza via QuantLib-users
> > <qua...@li...> wrote:
> >>
> >> Hi, a question on optimizing calculation time: the code I’ve written for bermudan swaption valuation in python (see below) takes forever when I run risks using source bumping (bucketed ATM and skew swaption vega are the really killers). I assume it’s the recalibration step I have added for the NPV attribute that’s the issue but I can’t figure a way around that. Any optimization tips would be appreciated (eg. different parameters for a less time-consuming integration scheme??).
> >>
> >> Thanks, Aleksis
> >>
> >>
> >> class bermudanswaption():
> >> 648
> >> 649 def __init__(self, calendar,settlement, used_model, swap, ratecurves, index, swvolcube_clean, swapbase,
> >> 650 mean_reversion,position,NC_periods):
> >> 651
> >> 652 discount_curve = ratecurves.loc['discountcurve', 'ratecurves']
> >> 653 self.swvolcube = swvolcube_clean
> >> 654 self.swapbase = swapbase
> >> 655 self.used_model = used_model
> >> 656 self.discount_curve = discount_curve
> >> 657 self.position=position
> >> 658
> >> 659 fixed_schedule=swap.fixedSchedule()
> >> 660 exerciseDates = [calendar.advance(i, -ql.Period('2D')) for i in fixed_schedule][1+NC_periods:-1]
> >> 661 exercise = ql.BermudanExercise(exerciseDates)
> >> 662 stepDates = exerciseDates
> >> 663 self.exerciseDates=exerciseDates
> >> 664 sigmas = [ql.QuoteHandle(ql.SimpleQuote(0.01))]*(1+len(exerciseDates))
> >> 665 self.used_model = used_model
> >> 666
> >> 667 if settlement == 'physical':
> >> 668 type = 0
> >> 669 method = 1
> >> 670 else:
> >> 671 type = 1
> >> 672 method = 2
> >> 673
> >> 674 self.nsswaption = ql.NonstandardSwaption(swap, exercise, type, method)
> >> 675 gsr = ql.Gsr(ratecurves.loc[index, 'ratecurves'],
> >> 676 stepDates, sigmas, [ql.QuoteHandle(ql.SimpleQuote(mean_reversion))])
> >> 677 engine = ql.Gaussian1dNonstandardSwaptionEngine(gsr, 64, 7.0, True, False,
> >> 678 ql.QuoteHandle(ql.SimpleQuote(0)),
> >> 679 discount_curve, 2)
> >> 680 self.engine = ql.Gaussian1dSwaptionEngine(gsr, 64, 7.0, True, False, discount_curve)
> >> 681 self.nsswaption.setPricingEngine(engine)
> >> 682 self.model = gsr
> >> 683 def NPV(self):
> >> 684 engine = ql.Gaussian1dSwaptionEngine(self.model, 64, 7.0, True, False, self.discount_curve)
> >> 685 basket = self.nsswaption.calibrationBasket(self.swapbase, self.swvolcube, 'MaturityStrikeByDeltaGamma')
> >> 686 for basket_i in basket:
> >> 687 ql.as_black_helper(basket_i).setPricingEngine(engine)
> >> 688 method = ql.LevenbergMarquardt()
> >> 689 ec = ql.EndCriteria(1000, 10, 1e-8, 1e-8, 1e-8)
> >> 690 self.model.calibrateVolatilitiesIterative(basket, method, ec)
> >> 691 npv = self.nsswaption.NPV()*self.position
> >>
> >> _______________________________________________
> >> QuantLib-users mailing list
> >> Qua...@li...
> >> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Aleksis A. R. <ale...@go...> - 2021-01-19 08:29:45
|
Hi Peter. If I don't recompute and recalibrate the basket after each bump in the swaption vol cube, then I see no sensitivity impact at all when recomputing the bumped NPVs (so the bump risk returns a zero grid).
I have resorted to using 16 points/3.0 std devs in the integration scheme - this has had made the computation bearable without too much loss of accuracy.
Thanks, Aleksis
> On 18 Jan 2021, at 16:57, Peter Caspers <pca...@gm...> wrote:
>
> Hi Aleksis,
>
> computing the calibration basket via 'MaturityStrikeByDeltaGamma' is
> quite time consuming, so I'd try to compute the basket only once
> (under the base scenario) and reuse it for each sensitivity bump
> scenario.
>
> Thanks
> Peter
>
> On Sun, 17 Jan 2021 at 13:52, Aleksis Ali Raza via QuantLib-users
> <qua...@li...> wrote:
>>
>> Hi, a question on optimizing calculation time: the code I’ve written for bermudan swaption valuation in python (see below) takes forever when I run risks using source bumping (bucketed ATM and skew swaption vega are the really killers). I assume it’s the recalibration step I have added for the NPV attribute that’s the issue but I can’t figure a way around that. Any optimization tips would be appreciated (eg. different parameters for a less time-consuming integration scheme??).
>>
>> Thanks, Aleksis
>>
>>
>> class bermudanswaption():
>> 648
>> 649 def __init__(self, calendar,settlement, used_model, swap, ratecurves, index, swvolcube_clean, swapbase,
>> 650 mean_reversion,position,NC_periods):
>> 651
>> 652 discount_curve = ratecurves.loc['discountcurve', 'ratecurves']
>> 653 self.swvolcube = swvolcube_clean
>> 654 self.swapbase = swapbase
>> 655 self.used_model = used_model
>> 656 self.discount_curve = discount_curve
>> 657 self.position=position
>> 658
>> 659 fixed_schedule=swap.fixedSchedule()
>> 660 exerciseDates = [calendar.advance(i, -ql.Period('2D')) for i in fixed_schedule][1+NC_periods:-1]
>> 661 exercise = ql.BermudanExercise(exerciseDates)
>> 662 stepDates = exerciseDates
>> 663 self.exerciseDates=exerciseDates
>> 664 sigmas = [ql.QuoteHandle(ql.SimpleQuote(0.01))]*(1+len(exerciseDates))
>> 665 self.used_model = used_model
>> 666
>> 667 if settlement == 'physical':
>> 668 type = 0
>> 669 method = 1
>> 670 else:
>> 671 type = 1
>> 672 method = 2
>> 673
>> 674 self.nsswaption = ql.NonstandardSwaption(swap, exercise, type, method)
>> 675 gsr = ql.Gsr(ratecurves.loc[index, 'ratecurves'],
>> 676 stepDates, sigmas, [ql.QuoteHandle(ql.SimpleQuote(mean_reversion))])
>> 677 engine = ql.Gaussian1dNonstandardSwaptionEngine(gsr, 64, 7.0, True, False,
>> 678 ql.QuoteHandle(ql.SimpleQuote(0)),
>> 679 discount_curve, 2)
>> 680 self.engine = ql.Gaussian1dSwaptionEngine(gsr, 64, 7.0, True, False, discount_curve)
>> 681 self.nsswaption.setPricingEngine(engine)
>> 682 self.model = gsr
>> 683 def NPV(self):
>> 684 engine = ql.Gaussian1dSwaptionEngine(self.model, 64, 7.0, True, False, self.discount_curve)
>> 685 basket = self.nsswaption.calibrationBasket(self.swapbase, self.swvolcube, 'MaturityStrikeByDeltaGamma')
>> 686 for basket_i in basket:
>> 687 ql.as_black_helper(basket_i).setPricingEngine(engine)
>> 688 method = ql.LevenbergMarquardt()
>> 689 ec = ql.EndCriteria(1000, 10, 1e-8, 1e-8, 1e-8)
>> 690 self.model.calibrateVolatilitiesIterative(basket, method, ec)
>> 691 npv = self.nsswaption.NPV()*self.position
>>
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Peter C. <pca...@gm...> - 2021-01-18 16:58:02
|
Hi Aleksis,
computing the calibration basket via 'MaturityStrikeByDeltaGamma' is
quite time consuming, so I'd try to compute the basket only once
(under the base scenario) and reuse it for each sensitivity bump
scenario.
Thanks
Peter
On Sun, 17 Jan 2021 at 13:52, Aleksis Ali Raza via QuantLib-users
<qua...@li...> wrote:
>
> Hi, a question on optimizing calculation time: the code I’ve written for bermudan swaption valuation in python (see below) takes forever when I run risks using source bumping (bucketed ATM and skew swaption vega are the really killers). I assume it’s the recalibration step I have added for the NPV attribute that’s the issue but I can’t figure a way around that. Any optimization tips would be appreciated (eg. different parameters for a less time-consuming integration scheme??).
>
> Thanks, Aleksis
>
>
> class bermudanswaption():
> 648
> 649 def __init__(self, calendar,settlement, used_model, swap, ratecurves, index, swvolcube_clean, swapbase,
> 650 mean_reversion,position,NC_periods):
> 651
> 652 discount_curve = ratecurves.loc['discountcurve', 'ratecurves']
> 653 self.swvolcube = swvolcube_clean
> 654 self.swapbase = swapbase
> 655 self.used_model = used_model
> 656 self.discount_curve = discount_curve
> 657 self.position=position
> 658
> 659 fixed_schedule=swap.fixedSchedule()
> 660 exerciseDates = [calendar.advance(i, -ql.Period('2D')) for i in fixed_schedule][1+NC_periods:-1]
> 661 exercise = ql.BermudanExercise(exerciseDates)
> 662 stepDates = exerciseDates
> 663 self.exerciseDates=exerciseDates
> 664 sigmas = [ql.QuoteHandle(ql.SimpleQuote(0.01))]*(1+len(exerciseDates))
> 665 self.used_model = used_model
> 666
> 667 if settlement == 'physical':
> 668 type = 0
> 669 method = 1
> 670 else:
> 671 type = 1
> 672 method = 2
> 673
> 674 self.nsswaption = ql.NonstandardSwaption(swap, exercise, type, method)
> 675 gsr = ql.Gsr(ratecurves.loc[index, 'ratecurves'],
> 676 stepDates, sigmas, [ql.QuoteHandle(ql.SimpleQuote(mean_reversion))])
> 677 engine = ql.Gaussian1dNonstandardSwaptionEngine(gsr, 64, 7.0, True, False,
> 678 ql.QuoteHandle(ql.SimpleQuote(0)),
> 679 discount_curve, 2)
> 680 self.engine = ql.Gaussian1dSwaptionEngine(gsr, 64, 7.0, True, False, discount_curve)
> 681 self.nsswaption.setPricingEngine(engine)
> 682 self.model = gsr
> 683 def NPV(self):
> 684 engine = ql.Gaussian1dSwaptionEngine(self.model, 64, 7.0, True, False, self.discount_curve)
> 685 basket = self.nsswaption.calibrationBasket(self.swapbase, self.swvolcube, 'MaturityStrikeByDeltaGamma')
> 686 for basket_i in basket:
> 687 ql.as_black_helper(basket_i).setPricingEngine(engine)
> 688 method = ql.LevenbergMarquardt()
> 689 ec = ql.EndCriteria(1000, 10, 1e-8, 1e-8, 1e-8)
> 690 self.model.calibrateVolatilitiesIterative(basket, method, ec)
> 691 npv = self.nsswaption.NPV()*self.position
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
|
|
From: Eric E. <eri...@re...> - 2021-01-18 16:13:33
|
Hi All, A preliminary build of QuantLibXL version 1.21 is available at this link: https://bintray.com/quantlib/prerelease/QuantLibXL/1.21_prerelease#files I would be grateful to anyone who could test it and let me know if it's OK. I believe that I have merged all of the pull requests that I have received, and responded to other queries. If I forgot anything please let me know. Kind Regards, Eric |
|
From: Ravi D. <rav...@gm...> - 2021-01-17 20:20:20
|
Hi, I'm new to Quantlib & QuantLib-SWIG-R...spent some time figuring out how to create a VanillaSwap in R, and get its NPV. I followed the demo examples for ZCBond, CouponBond in demos, and have configured working term structures in R, but so far got no luck creating an example for vanilla swap. Can someone help please? Thanks. |
|
From: Aleksis A. R. <ale...@go...> - 2021-01-17 12:51:36
|
Hi, a question on optimizing calculation time: the code I’ve written for bermudan swaption valuation in python (see below) takes forever when I run risks using source bumping (bucketed ATM and skew swaption vega are the really killers). I assume it’s the recalibration step I have added for the NPV attribute that’s the issue but I can’t figure a way around that. Any optimization tips would be appreciated (eg. different parameters for a less time-consuming integration scheme??).
Thanks, Aleksis
class bermudanswaption():
648
649 def __init__(self, calendar,settlement, used_model, swap, ratecurves, index, swvolcube_clean, swapbase,
650 mean_reversion,position,NC_periods):
651
652 discount_curve = ratecurves.loc['discountcurve', 'ratecurves']
653 self.swvolcube = swvolcube_clean
654 self.swapbase = swapbase
655 self.used_model = used_model
656 self.discount_curve = discount_curve
657 self.position=position
658
659 fixed_schedule=swap.fixedSchedule()
660 exerciseDates = [calendar.advance(i, -ql.Period('2D')) for i in fixed_schedule][1+NC_periods:-1]
661 exercise = ql.BermudanExercise(exerciseDates)
662 stepDates = exerciseDates
663 self.exerciseDates=exerciseDates
664 sigmas = [ql.QuoteHandle(ql.SimpleQuote(0.01))]*(1+len(exerciseDates))
665 self.used_model = used_model
666
667 if settlement == 'physical':
668 type = 0
669 method = 1
670 else:
671 type = 1
672 method = 2
673
674 self.nsswaption = ql.NonstandardSwaption(swap, exercise, type, method)
675 gsr = ql.Gsr(ratecurves.loc[index, 'ratecurves'],
676 stepDates, sigmas, [ql.QuoteHandle(ql.SimpleQuote(mean_reversion))])
677 engine = ql.Gaussian1dNonstandardSwaptionEngine(gsr, 64, 7.0, True, False,
678 ql.QuoteHandle(ql.SimpleQuote(0)),
679 discount_curve, 2)
680 self.engine = ql.Gaussian1dSwaptionEngine(gsr, 64, 7.0, True, False, discount_curve)
681 self.nsswaption.setPricingEngine(engine)
682 self.model = gsr
683 def NPV(self):
684 engine = ql.Gaussian1dSwaptionEngine(self.model, 64, 7.0, True, False, self.discount_curve)
685 basket = self.nsswaption.calibrationBasket(self.swapbase, self.swvolcube, 'MaturityStrikeByDeltaGamma')
686 for basket_i in basket:
687 ql.as_black_helper(basket_i).setPricingEngine(engine)
688 method = ql.LevenbergMarquardt()
689 ec = ql.EndCriteria(1000, 10, 1e-8, 1e-8, 1e-8)
690 self.model.calibrateVolatilitiesIterative(basket, method, ec)
691 npv = self.nsswaption.NPV()*self.position
|
|
From: SX L <han...@ho...> - 2021-01-10 03:42:41
|
Did anybody build QuantLib and test-suite successfully in Windows with clang? I want to see the performance difference between msvc and clang. I tried to change the platform toolset in vcxproj to clang, and link to boost libraries compiled with clang. However, I still get some undefined symbol errors. I must have had missed something. |
|
From: David D. <nh...@gm...> - 2021-01-06 13:41:00
|
Hi Luigi, All QuantLib 1.21-rc tests ran fine on Ubuntu 20.10: Running 861 test cases... Tests completed in 8 m 31 s *** No errors detected All QuantLib-SWIG 1.21-rc tests also ran fine (Ubuntu 20.10 and Python 3.7) : Ran 114 tests in 17.041s OK Regards, David On Tue, 5 Jan 2021 at 17:05, Luigi Ballabio <lui...@gm...> wrote: > Hello everybody, > I've uploaded release candidates for version 1.21 at < > https://bintray.com/quantlib/prerelease/QuantLib/1.21rc>. If you have > some spare time, please give them a try and report back any problems. > Thanks! > > Luigi > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Marcin R. <mry...@gm...> - 2021-01-06 09:18:55
|
Hi Luigi, All tests ran successfully on Windows 10: Running 861 test cases... Tests completed in 12 m 41 s *** No errors detected For QuantLib-SWIG, also on Windows 10 and Python 3.8 all tests are successful: ---------------------------------------------------------------------- Ran 114 tests in 21.964s OK I repeated the same exercise on Ubuntu 20.04 focal (both QuantLib and QuantLib-SWIG in Python 3.7), with the same outcome. Regards, Marcin wt., 5 sty 2021 o 18:05 Luigi Ballabio <lui...@gm...> napisał(a): > Hello everybody, > I've uploaded release candidates for version 1.21 at < > https://bintray.com/quantlib/prerelease/QuantLib/1.21rc>. If you have > some spare time, please give them a try and report back any problems. > Thanks! > > Luigi > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Luigi B. <lui...@gm...> - 2021-01-05 17:04:17
|
Hello everybody,
I've uploaded release candidates for version 1.21 at <
https://bintray.com/quantlib/prerelease/QuantLib/1.21rc>. If you have some
spare time, please give them a try and report back any problems. Thanks!
Luigi
|
|
From: Luigi B. <lui...@gm...> - 2020-12-29 09:05:09
|
Hello,
there are not a lot of implementations of Quote in the library - mostly
SimpleQuote, plus a couple of others like DerivedQuote. But the handle is
in there anyway, in case someone had another implementation (for instance,
connected to some data-provider API) and wanted to switch it.
Luigi
On Sat, Dec 19, 2020 at 10:25 AM SX L <han...@ho...> wrote:
> I am looking at GeneralizedBSProcess. I can understand the usage of
> Handle<YieldTermStructure>. Say, you wanna switch from LIBOR based discount
> curve to SOFR based one. You could do "USDDiscount.linkTo(USDSOFRCurve)".
> However, what's the usage of Handle<Quote>? For cases of SimpleQuote, can
> we just use SimpleQuote::setValue()? Thanks.
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|