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
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Luigi B. <lui...@gm...> - 2022-04-20 08:51:03
|
QuantLib 1.26 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: Dmitri G. <dm...@ma...> - 2022-04-19 09:17:25
|
Hi Mohammad, These two projects were implemented by Compatibl. I'm not sure if they continue to support this. I work for Matlogica and we develop an AADC product that allows us to speed up MC simulations, historical analysis and optional AAD. We have exemplary integration with QuantLib. Here https://matlogica.com/practical-AAD-minimizer-demo.php you can see how integration works and used to construct yield curves using multidimensional minimizer and demonstrate "live-risk" for a portfolio of swaps. Kind regards, Dmitri Goloubentsev Head of Automatic Adjoint Differentiation, Matlogica LTD http://matlogica.com +447378414528 See my schedule and book <https://calendly.com/matlogica> a meeting with me On Mon, 18 Apr 2022 at 12:08, Mohammad Shoja-talab <msh...@gm...> wrote: > Hi all, > > I've come across the following two projects: > https://github.com/compatibl/tapescript > https://github.com/compatibl/QuantLibAdjoint > > and it looks to me that both of them are not maintained and discontinued > as the last commit goes back to many years ago. > > I was wondering if someone here could confirm that it give information > about any similar active project? Do you know if these projects, at the > time, have been used to implement AAD? i.e can the code be used as a > starting point, even though it's not maintained? > > Thanks and regards > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-04-18 11:06:14
|
Hi all, I've come across the following two projects: https://github.com/compatibl/tapescript https://github.com/compatibl/QuantLibAdjoint and it looks to me that both of them are not maintained and discontinued as the last commit goes back to many years ago. I was wondering if someone here could confirm that it give information about any similar active project? Do you know if these projects, at the time, have been used to implement AAD? i.e can the code be used as a starting point, even though it's not maintained? Thanks and regards |
|
From: Laurent N <lau...@gm...> - 2022-04-18 00:02:01
|
So the combination of -g0 and -O3 indeed does the trick. (-O3 alone doesn't, in case that helps). Thanks again Luigi On Tue, Apr 12, 2022 at 9:36 AM Laurent N <lau...@gm...> wrote: > Hi Luigi > > Many thanks, I'll give it a try with those parameters. > > On Tue, Apr 12, 2022 at 1:10 AM Luigi Ballabio <lui...@gm...> > wrote: > >> Also, I'm using those flags when building both the C++ library and the >> Python module. >> >> >> On Tue, Apr 12, 2022 at 10:07 AM Luigi Ballabio <lui...@gm...> >> wrote: >> >>> Hello Laurent, >>> try passing -g0 to gcc to avoid storing debug information. Also, >>> passing -O3 might try to optimize for size as well as speed. >>> >>> Hope this helps, >>> Luigi >>> >>> >>> On Tue, Apr 12, 2022 at 9:33 AM Laurent N <lau...@gm...> >>> wrote: >>> >>>> Hi, >>>> >>>> I wonder if you can share how you build the python library for linux. >>>> When i install the python addin via pip install, the .so file from the >>>> distribution is ~30Mo. >>>> >>>> However when I build it from scratch on centos 7, i am getting a file >>>> _QuantLib.cpython[xxx].so which is 130Mo+. I am trrying to reproduce what >>>> you did before i make some changes for my own use. I tried modifying the >>>> options passed to gcc, to no avail. >>>> >>>> I am using QuantLib 1.24 and QuantLib-SWIG 1.24 and python 3.7. >>>> >>>> Appreciate any help or pointers. >>>> >>>> Thanks >>>> Laurent >>>> _______________________________________________ >>>> QuantLib-users mailing list >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>> >>> |
|
From: Luigi B. <lui...@gm...> - 2022-04-14 15:48:53
|
Hello everybody, a release candidate for QuantLib 1.26 is available at < https://github.com/lballabio/QuantLib/releases/tag/1.26rc>. Please try it out if you have some spare time. Thanks! Luigi |
|
From: Laurent N <lau...@gm...> - 2022-04-12 16:37:41
|
Hi Luigi Many thanks, I'll give it a try with those parameters. On Tue, Apr 12, 2022 at 1:10 AM Luigi Ballabio <lui...@gm...> wrote: > Also, I'm using those flags when building both the C++ library and the > Python module. > > > On Tue, Apr 12, 2022 at 10:07 AM Luigi Ballabio <lui...@gm...> > wrote: > >> Hello Laurent, >> try passing -g0 to gcc to avoid storing debug information. Also, >> passing -O3 might try to optimize for size as well as speed. >> >> Hope this helps, >> Luigi >> >> >> On Tue, Apr 12, 2022 at 9:33 AM Laurent N <lau...@gm...> >> wrote: >> >>> Hi, >>> >>> I wonder if you can share how you build the python library for linux. >>> When i install the python addin via pip install, the .so file from the >>> distribution is ~30Mo. >>> >>> However when I build it from scratch on centos 7, i am getting a file >>> _QuantLib.cpython[xxx].so which is 130Mo+. I am trrying to reproduce what >>> you did before i make some changes for my own use. I tried modifying the >>> options passed to gcc, to no avail. >>> >>> I am using QuantLib 1.24 and QuantLib-SWIG 1.24 and python 3.7. >>> >>> Appreciate any help or pointers. >>> >>> Thanks >>> Laurent >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Luigi B. <lui...@gm...> - 2022-04-12 08:10:10
|
Also, I'm using those flags when building both the C++ library and the Python module. On Tue, Apr 12, 2022 at 10:07 AM Luigi Ballabio <lui...@gm...> wrote: > Hello Laurent, > try passing -g0 to gcc to avoid storing debug information. Also, > passing -O3 might try to optimize for size as well as speed. > > Hope this helps, > Luigi > > > On Tue, Apr 12, 2022 at 9:33 AM Laurent N <lau...@gm...> > wrote: > >> Hi, >> >> I wonder if you can share how you build the python library for linux. >> When i install the python addin via pip install, the .so file from the >> distribution is ~30Mo. >> >> However when I build it from scratch on centos 7, i am getting a file >> _QuantLib.cpython[xxx].so which is 130Mo+. I am trrying to reproduce what >> you did before i make some changes for my own use. I tried modifying the >> options passed to gcc, to no avail. >> >> I am using QuantLib 1.24 and QuantLib-SWIG 1.24 and python 3.7. >> >> Appreciate any help or pointers. >> >> Thanks >> Laurent >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2022-04-12 08:07:35
|
Hello Laurent,
try passing -g0 to gcc to avoid storing debug information. Also,
passing -O3 might try to optimize for size as well as speed.
Hope this helps,
Luigi
On Tue, Apr 12, 2022 at 9:33 AM Laurent N <lau...@gm...>
wrote:
> Hi,
>
> I wonder if you can share how you build the python library for linux.
> When i install the python addin via pip install, the .so file from the
> distribution is ~30Mo.
>
> However when I build it from scratch on centos 7, i am getting a file
> _QuantLib.cpython[xxx].so which is 130Mo+. I am trrying to reproduce what
> you did before i make some changes for my own use. I tried modifying the
> options passed to gcc, to no avail.
>
> I am using QuantLib 1.24 and QuantLib-SWIG 1.24 and python 3.7.
>
> Appreciate any help or pointers.
>
> Thanks
> Laurent
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Laurent N <lau...@gm...> - 2022-04-12 07:30:30
|
Hi, I wonder if you can share how you build the python library for linux. When i install the python addin via pip install, the .so file from the distribution is ~30Mo. However when I build it from scratch on centos 7, i am getting a file _QuantLib.cpython[xxx].so which is 130Mo+. I am trrying to reproduce what you did before i make some changes for my own use. I tried modifying the options passed to gcc, to no avail. I am using QuantLib 1.24 and QuantLib-SWIG 1.24 and python 3.7. Appreciate any help or pointers. Thanks Laurent |
|
From: Peter C. <pca...@gm...> - 2022-04-10 11:31:21
|
That’s exactly right, Mike. Mike DelMedico <mik...@gm...> schrieb am Mi. 6. Apr. 2022 um 19:32: > Hi everyone, > > Since OIS (Fed Fund) swaps are discounted at SOFR at LCH, I just wanted to > make sure I was using the OIS rate helper constructor properly. I'm using > the following: > > > https://github.com/lballabio/QuantLib/blob/08994cc5df150345ec4a1f756ff7f5c524c1147c/ql/termstructures/yield/oisratehelper.cpp#L29 > > It looks like the 5th parameter "Handle<YieldTermStructure> discount," is > where I should be passing the discounting curve. Is this right? > > Thanks, > Mike > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Mike D. <mik...@gm...> - 2022-04-06 17:31:08
|
Hi everyone, Since OIS (Fed Fund) swaps are discounted at SOFR at LCH, I just wanted to make sure I was using the OIS rate helper constructor properly. I'm using the following: https://github.com/lballabio/QuantLib/blob/08994cc5df150345ec4a1f756ff7f5c524c1147c/ql/termstructures/yield/oisratehelper.cpp#L29 It looks like the 5th parameter "Handle<YieldTermStructure> discount," is where I should be passing the discounting curve. Is this right? Thanks, Mike |
|
From: <lis...@pm...> - 2022-04-03 20:51:38
|
Hi everyone - first post here - hopefully doing it right. Some question about the proper setup for CdsOption using Python-QuantLib. Here's the link: https://github.com/lballabio/QuantLib/issues/1341 Many thanks! |
|
From: Mike D. <mik...@gm...> - 2022-03-29 21:01:14
|
Maybe try using the weights input for the below function? https://numpy.org/doc/stable/reference/generated/numpy.average.html On Tue, Mar 29, 2022 at 3:53 PM Michael (DataDriven portal) < mi...@da...> wrote: > Hi All, > > I have a 2D matrix with each cell that is backed by observations with > certain characteristics and shows weighted average performance values (see > below for an example). > > Some of the cells are backed by too few observations and therefore this 2D > surface is not smooth enough in those cells (see yellow cells below e.g.) > > What is the best algo for smoothing this surface taking into account the > number of observations (e.g. cells with more observations should we > weighted heavier). E.g. is there a Python weighted spline lib available or > something similar? > > [image: image.png] > > Thanks, > > Michael > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Michael (D. portal) <mi...@da...> - 2022-03-29 20:48:55
|
Hi All, I have a 2D matrix with each cell that is backed by observations with certain characteristics and shows weighted average performance values (see below for an example). Some of the cells are backed by too few observations and therefore this 2D surface is not smooth enough in those cells (see yellow cells below e.g.) What is the best algo for smoothing this surface taking into account the number of observations (e.g. cells with more observations should we weighted heavier). E.g. is there a Python weighted spline lib available or something similar? [image: image.png] Thanks, Michael |
|
From: Ashish B. <ash...@gm...> - 2022-03-17 12:58:51
|
Hi Matthew,
Thanks for your email with details. I didn't get a chance to look and try
it out. I am using QL in Python language and don't have much knowledge of
C++. Could this be done in Python too? Please guide how.
Thanks
Ashish
On Fri, 10 Dec 2021 at 22:33, Matthew Kolbe <mat...@gm...> wrote:
> This is an interesting question and thank you for bringing it up. One
> reason I think an impliedVolatility function is omitted from AsianOption
> instruments is that there isn't a canonical definition for what implied
> volatility means to an Asian option. Sure, there's always a definition of
> IV for Black-Scholes type models where you can solve for the volatility
> parameter, but if you notice in the VanillaOption class, impliedVolatility
> is hard coded as the solution to an AnalyticEuropeanEngine if the
> instrument has European exercise and FdBlackScholesVanillaEngine otherwise.
> QL actually ties the definition of IV to an instrument, giving no used
> control over what engine generates it. So, I would vote we never add an
> impliedVolatility function to Asian options, because there isn't a
> broadly-accepted definition of what engine should be used to define IV for
> Asian options.
>
> That said, if you want to just have some code in your local repo that
> replicates the VanillaOption behavior, add this to the
> DiscreteAveragingAsianOption header class:
>
> Volatility impliedVolatility(Real price,
> const
> ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
> Real accuracy = 1.0e-4,
> Size maxEvaluations = 100,
> Volatility minVol = 1.0e-7,
> Volatility maxVol = 4.0) const;
>
> And add this to the DiscreteAveragingAsianOption cpp file:
>
> Volatility DiscreteAveragingAsianOption::impliedVolatility(
> Real targetValue,
> const ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
> Real accuracy,
> Size maxEvaluations,
> Volatility minVol,
> Volatility maxVol) const
> {
> QL_REQUIRE(!isExpired(), "option expired");
>
> ext::shared_ptr<SimpleQuote> volQuote(new SimpleQuote);
>
> ext::shared_ptr<GeneralizedBlackScholesProcess> newProcess =
> detail::ImpliedVolatilityHelper::clone(process, volQuote);
>
> std::unique_ptr<PricingEngine> engine;
> engine.reset(new
> AnalyticDiscreteGeometricAveragePriceAsianEngine(newProcess));
>
> return detail::ImpliedVolatilityHelper::calculate(*this, *engine,
> *volQuote, targetValue,
> accuracy,
> maxEvaluations, minVol, maxVol);
> }
>
> You'll need to resolve some new dependencies in those files and recompile,
> but that's it. Also note that I defaulted to using the
> AnalyticDiscreteGeometricAveragePriceAsianEngine engine, but you can use
> whatever you want there.
>
> On Tue, Dec 7, 2021 at 6:03 AM Ashish Bansal <ash...@gm...>
> wrote:
>
>> Hi,
>>
>> I am trying to evaluate the Arithmetic averaging Asian option using QL
>> class called DiscreteAveragingAsianOption. However, there is no method
>> under it to calculate the implied volatility, which is present for plain
>> vanilla and barrier options.
>>
>> Please help how can I calculate IV for Asian options.
>>
>> Regards,
>> Ashish
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>
>
> --
> Matthew P. Kolbe
> (312) 218-6595
> mat...@gm...
>
|
|
From: Xu R. <xur...@ho...> - 2022-03-16 06:45:14
|
Hi, everyone How to calculate currentAverage for ContinuousArithmeticAsianLevyEngine and ContinuousArithmeticAsianVecerEngine? If my Asian option started yesterday, and close price was 100. I evaluate it today, and spot price is 110 now. So, currentAverage = 100, or currentAverage = (100 + 110)/2. Shall I use the spot price at evaluation date? Thanks, Ruilong 从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送 |
|
From: Luigi B. <lui...@gm...> - 2022-03-14 09:02:22
|
Hi Mike,
your new code is correct.
Regards,
Luigi
On Mon, Mar 14, 2022 at 12:39 AM Mike DelMedico <mik...@gm...>
wrote:
> Hi everyone,
>
> I just recently upgraded from 1.19 to 1.25 and noticed that the
> constructor I had been using was depreciated then removed. I just want to
> make sure I'm using the replacement constructor correctly as intended, if
> anyone has a moment to comment.
>
> Old way:
>
> curveDiscount = ql.PiecewiseLogCubicDiscount(valuationDate,
> rateHelpers,
> dayCounter,
> jumpQuotes,
> jumpDates,
> accuracy)
>
> New way:
>
> curveDiscount = ql.PiecewiseLogCubicDiscount(valuationDate,
> rateHelpers,
> dayCounter,
> jumpQuotes,
> jumpDates,
> ql.MonotonicLogCubic(),
> ql.IterativeBootstrap(accuracy, None, None))
>
> From what I can tell the accuracy should now be passed via the iterative
> bootstrap and the min/max can remain null via passing None. I was a little
> confused though because the file here
> <https://github.com/lballabio/QuantLib-SWIG/blob/4afcbcfc10775b5750f5931ed4488df78dfdd329/SWIG/piecewiseyieldcurve.i#L84>
> still has accuracy as a separate parameter. I'm using 3.9 Python in case
> that matters at all.
>
> I also tried using ql.YieldTermStructure() constructor, but I get a 'no
> constructor defined' error so I guess that is not supported via SWIG at
> this time.
>
> Thanks,
> Mike
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Mike D. <mik...@gm...> - 2022-03-13 23:36:23
|
Hi everyone,
I just recently upgraded from 1.19 to 1.25 and noticed that the constructor
I had been using was depreciated then removed. I just want to make sure
I'm using the replacement constructor correctly as intended, if anyone has
a moment to comment.
Old way:
curveDiscount = ql.PiecewiseLogCubicDiscount(valuationDate,
rateHelpers,
dayCounter,
jumpQuotes,
jumpDates,
accuracy)
New way:
curveDiscount = ql.PiecewiseLogCubicDiscount(valuationDate,
rateHelpers,
dayCounter,
jumpQuotes,
jumpDates,
ql.MonotonicLogCubic(),
ql.IterativeBootstrap(accuracy, None, None))
>From what I can tell the accuracy should now be passed via the iterative
bootstrap and the min/max can remain null via passing None. I was a little
confused though because the file here
<https://github.com/lballabio/QuantLib-SWIG/blob/4afcbcfc10775b5750f5931ed4488df78dfdd329/SWIG/piecewiseyieldcurve.i#L84>
still has accuracy as a separate parameter. I'm using 3.9 Python in case
that matters at all.
I also tried using ql.YieldTermStructure() constructor, but I get a 'no
constructor defined' error so I guess that is not supported via SWIG at
this time.
Thanks,
Mike
|
|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-03-10 17:39:45
|
erm... Looking into this a bit more closely, I actually think a PlainVanillaPayoff can be used, but I need a new pricer. My pricer should be very similar to ArithmeticAPOPathPricer but should calculate S*(1-C/Avg) and pass that to the payoff, strike is zero in this case. On Sat, Feb 26, 2022 at 5:11 AM Jonathan Sweemer <sw...@gm...> wrote: > Hi Mohammad, > > There's a test suite for pricing various kinds of averaging (Asian) > options under different engines that you can use as a reference. > > > https://github.com/lballabio/QuantLib/blob/master/test-suite/asianoptions.cpp > > Not sure whether the available payoff types can fully capture the > expression that you require. If not, then you may have to extend one of the > payoff types and pass it into the instrument constructor instead of what > you see in the test suite. > > Jonathan > > > On Sat, Feb 26, 2022 at 1:09 AM Mohammad Shoja-talab < > msh...@gm...> wrote: > >> Hi All, >> >> I'd like to price a payoff which looks like this: max( S - C * S/Avg(S), >> 0) >> Where S is the spot price, Avg(S) is average of spot price in specified >> (future) fixing dates and C is a constant. How best can I do that using >> quantlib? >> >> Thanks >> >> -- >> Mo Shoja >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > -- Mohammad Shojatalab |
|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-03-09 09:26:39
|
Hi Luigi,
Thank you very much. That (moving curves) did the trick.
Kind regards,
Mo
On Tue, 8 Mar 2022, 16:07 Luigi Ballabio, <lui...@gm...> wrote:
> Using moving curves should work, too, without having to reset anything;
> that is, instead of using FlatForward(referenceDate, rate, dayCount), use
> FlatForward(0, calendar, rate, dayCount) to create a curve that resets
> automatically when the evaluation date changes. 0 as the first argument
> will keep the reference date the same as the evaluation date, but it's
> possible to pass e.g. 2 to have a curve starting spot (on the second
> business day from the evaluation date).
>
> Luigi
>
>
> On Tue, Mar 8, 2022 at 3:29 PM Mohammad Shoja-talab <msh...@gm...>
> wrote:
>
>> Hi,
>>
>> Answering my own question here as I found out the reason;
>> inside the loop i need to re-set rTS (i'm a bit surprised i must say as
>> its flat rate and I thought should extrapolate correctly), and also reset
>> stochProcess and also re-set engine.
>>
>>
>> On Tue, Mar 8, 2022 at 12:20 PM Mohammad Shoja-talab <
>> msh...@gm...> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to re-evaluate an option with different today's date and a
>>> fixed maturity date, in a loop, but I keep getting the same result as if
>>> today's date doesn't get updated to new value.
>>>
>>> my code roughly looks like this:
>>>
>>>
>>>
>>> boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff(new
>>> PlainVanillaPayoff(QuantLib::Option::Call, faceValue));
>>>
>>> boost::shared_ptr<QuantLib::BlackScholesMertonProcess> stochProcess(new
>>>
>>>
>>> QuantLib::BlackScholesMertonProcess(QuantLib::Handle<QuantLib::Quote>(spot),
>>>
>>> QuantLib::Handle<QuantLib::YieldTermStructure>(qTS),
>>>
>>> QuantLib::Handle<QuantLib::YieldTermStructure>(rTS),
>>>
>>> QuantLib::Handle<QuantLib::BlackVolTermStructure>(volTS)));
>>>
>>>
>>>
>>> boost::shared_ptr<QuantLib::PricingEngine> engine =
>>>
>>>
>>> QuantLib::MakeMCDiscreteArithmeticAPEngine<QuantLib::LowDiscrepancy>(stochProcess)
>>>
>>> .withSamples(4095)
>>>
>>> .withControlVariate(true);
>>>
>>>
>>>
>>> boost::shared_ptr<QuantLib::Exercise> exercise(new
>>> QuantLib::EuropeanExercise(maturityDate));
>>>
>>>
>>>
>>> for (int i = 0; i <= 4; ++i)
>>>
>>> {
>>>
>>> auto tDay = QuantLib::Date(1, QuantLib::March, 2022 + i);
>>>
>>> QuantLib::Settings::instance().evaluationDate() = tDay;
>>>
>>>
>>>
>>> QuantLib::DiscreteAveragingAsianOption option(averageType,
>>> runningSum, pastFixings, fixingDates,
>>>
>>> payoff, exercise);
>>>
>>>
>>>
>>> option.setPricingEngine(engine);
>>>
>>> option.recalculate(); // even this doesn't help, or resetting of
>>> engine and stochProcess
>>>
>>>
>>>
>>> QuantLib::Real quantLibValue = option.NPV();
>>>
>>>
>>>
>>> BOOST_CHECK_CLOSE(expectedValue, quantLibValue, 0.3); // error less
>>> than 0.3%
>>>
>>> }
>>>
>>>
>>>
>>> Any idea what I'm doing wrong please?
>>>
>>>
>>> --
>>> Mohammad Shojatalab
>>>
>>
>>
>> --
>> Mohammad Shojatalab
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>
|
|
From: Luigi B. <lui...@gm...> - 2022-03-08 16:13:37
|
Using moving curves should work, too, without having to reset anything;
that is, instead of using FlatForward(referenceDate, rate, dayCount), use
FlatForward(0, calendar, rate, dayCount) to create a curve that resets
automatically when the evaluation date changes. 0 as the first argument
will keep the reference date the same as the evaluation date, but it's
possible to pass e.g. 2 to have a curve starting spot (on the second
business day from the evaluation date).
Luigi
On Tue, Mar 8, 2022 at 3:29 PM Mohammad Shoja-talab <msh...@gm...>
wrote:
> Hi,
>
> Answering my own question here as I found out the reason;
> inside the loop i need to re-set rTS (i'm a bit surprised i must say as
> its flat rate and I thought should extrapolate correctly), and also reset
> stochProcess and also re-set engine.
>
>
> On Tue, Mar 8, 2022 at 12:20 PM Mohammad Shoja-talab <
> msh...@gm...> wrote:
>
>> Hi,
>>
>> I'm trying to re-evaluate an option with different today's date and a
>> fixed maturity date, in a loop, but I keep getting the same result as if
>> today's date doesn't get updated to new value.
>>
>> my code roughly looks like this:
>>
>>
>>
>> boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff(new
>> PlainVanillaPayoff(QuantLib::Option::Call, faceValue));
>>
>> boost::shared_ptr<QuantLib::BlackScholesMertonProcess> stochProcess(new
>>
>>
>> QuantLib::BlackScholesMertonProcess(QuantLib::Handle<QuantLib::Quote>(spot),
>>
>> QuantLib::Handle<QuantLib::YieldTermStructure>(qTS),
>>
>> QuantLib::Handle<QuantLib::YieldTermStructure>(rTS),
>>
>> QuantLib::Handle<QuantLib::BlackVolTermStructure>(volTS)));
>>
>>
>>
>> boost::shared_ptr<QuantLib::PricingEngine> engine =
>>
>>
>> QuantLib::MakeMCDiscreteArithmeticAPEngine<QuantLib::LowDiscrepancy>(stochProcess)
>>
>> .withSamples(4095)
>>
>> .withControlVariate(true);
>>
>>
>>
>> boost::shared_ptr<QuantLib::Exercise> exercise(new
>> QuantLib::EuropeanExercise(maturityDate));
>>
>>
>>
>> for (int i = 0; i <= 4; ++i)
>>
>> {
>>
>> auto tDay = QuantLib::Date(1, QuantLib::March, 2022 + i);
>>
>> QuantLib::Settings::instance().evaluationDate() = tDay;
>>
>>
>>
>> QuantLib::DiscreteAveragingAsianOption option(averageType,
>> runningSum, pastFixings, fixingDates,
>>
>> payoff, exercise);
>>
>>
>>
>> option.setPricingEngine(engine);
>>
>> option.recalculate(); // even this doesn't help, or resetting of
>> engine and stochProcess
>>
>>
>>
>> QuantLib::Real quantLibValue = option.NPV();
>>
>>
>>
>> BOOST_CHECK_CLOSE(expectedValue, quantLibValue, 0.3); // error less
>> than 0.3%
>>
>> }
>>
>>
>>
>> Any idea what I'm doing wrong please?
>>
>>
>> --
>> Mohammad Shojatalab
>>
>
>
> --
> Mohammad Shojatalab
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2022-03-08 16:04:59
|
Hi Mohammad — how did you create the curves in the process (spot etc)? Is
it possible that they have a fixed reference date?
Luigi
On Tue, Mar 8, 2022 at 1:24 PM Mohammad Shoja-talab <msh...@gm...>
wrote:
> Hi,
>
> I'm trying to re-evaluate an option with different today's date and a
> fixed maturity date, in a loop, but I keep getting the same result as if
> today's date doesn't get updated to new value.
>
> my code roughly looks like this:
>
>
>
> boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff(new
> PlainVanillaPayoff(QuantLib::Option::Call, faceValue));
>
> boost::shared_ptr<QuantLib::BlackScholesMertonProcess> stochProcess(new
>
>
> QuantLib::BlackScholesMertonProcess(QuantLib::Handle<QuantLib::Quote>(spot),
>
> QuantLib::Handle<QuantLib::YieldTermStructure>(qTS),
>
> QuantLib::Handle<QuantLib::YieldTermStructure>(rTS),
>
> QuantLib::Handle<QuantLib::BlackVolTermStructure>(volTS)));
>
>
>
> boost::shared_ptr<QuantLib::PricingEngine> engine =
>
>
> QuantLib::MakeMCDiscreteArithmeticAPEngine<QuantLib::LowDiscrepancy>(stochProcess)
>
> .withSamples(4095)
>
> .withControlVariate(true);
>
>
>
> boost::shared_ptr<QuantLib::Exercise> exercise(new
> QuantLib::EuropeanExercise(maturityDate));
>
>
>
> for (int i = 0; i <= 4; ++i)
>
> {
>
> auto tDay = QuantLib::Date(1, QuantLib::March, 2022 + i);
>
> QuantLib::Settings::instance().evaluationDate() = tDay;
>
>
>
> QuantLib::DiscreteAveragingAsianOption option(averageType, runningSum,
> pastFixings, fixingDates,
>
> payoff, exercise);
>
>
>
> option.setPricingEngine(engine);
>
> option.recalculate(); // even this doesn't help, or resetting of
> engine and stochProcess
>
>
>
> QuantLib::Real quantLibValue = option.NPV();
>
>
>
> BOOST_CHECK_CLOSE(expectedValue, quantLibValue, 0.3); // error less
> than 0.3%
>
> }
>
>
>
> Any idea what I'm doing wrong please?
>
>
> --
> Mohammad Shojatalab
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-03-08 14:26:29
|
Hi,
Answering my own question here as I found out the reason;
inside the loop i need to re-set rTS (i'm a bit surprised i must say as its
flat rate and I thought should extrapolate correctly), and also reset
stochProcess and also re-set engine.
On Tue, Mar 8, 2022 at 12:20 PM Mohammad Shoja-talab <msh...@gm...>
wrote:
> Hi,
>
> I'm trying to re-evaluate an option with different today's date and a
> fixed maturity date, in a loop, but I keep getting the same result as if
> today's date doesn't get updated to new value.
>
> my code roughly looks like this:
>
>
>
> boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff(new
> PlainVanillaPayoff(QuantLib::Option::Call, faceValue));
>
> boost::shared_ptr<QuantLib::BlackScholesMertonProcess> stochProcess(new
>
>
> QuantLib::BlackScholesMertonProcess(QuantLib::Handle<QuantLib::Quote>(spot),
>
> QuantLib::Handle<QuantLib::YieldTermStructure>(qTS),
>
> QuantLib::Handle<QuantLib::YieldTermStructure>(rTS),
>
> QuantLib::Handle<QuantLib::BlackVolTermStructure>(volTS)));
>
>
>
> boost::shared_ptr<QuantLib::PricingEngine> engine =
>
>
> QuantLib::MakeMCDiscreteArithmeticAPEngine<QuantLib::LowDiscrepancy>(stochProcess)
>
> .withSamples(4095)
>
> .withControlVariate(true);
>
>
>
> boost::shared_ptr<QuantLib::Exercise> exercise(new
> QuantLib::EuropeanExercise(maturityDate));
>
>
>
> for (int i = 0; i <= 4; ++i)
>
> {
>
> auto tDay = QuantLib::Date(1, QuantLib::March, 2022 + i);
>
> QuantLib::Settings::instance().evaluationDate() = tDay;
>
>
>
> QuantLib::DiscreteAveragingAsianOption option(averageType, runningSum,
> pastFixings, fixingDates,
>
> payoff, exercise);
>
>
>
> option.setPricingEngine(engine);
>
> option.recalculate(); // even this doesn't help, or resetting of
> engine and stochProcess
>
>
>
> QuantLib::Real quantLibValue = option.NPV();
>
>
>
> BOOST_CHECK_CLOSE(expectedValue, quantLibValue, 0.3); // error less
> than 0.3%
>
> }
>
>
>
> Any idea what I'm doing wrong please?
>
>
> --
> Mohammad Shojatalab
>
--
Mohammad Shojatalab
|
|
From: Mohammad Shoja-t. <msh...@gm...> - 2022-03-08 12:20:40
|
Hi,
I'm trying to re-evaluate an option with different today's date and a fixed
maturity date, in a loop, but I keep getting the same result as if today's
date doesn't get updated to new value.
my code roughly looks like this:
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff(new
PlainVanillaPayoff(QuantLib::Option::Call, faceValue));
boost::shared_ptr<QuantLib::BlackScholesMertonProcess> stochProcess(new
QuantLib::BlackScholesMertonProcess(QuantLib::Handle<QuantLib::Quote>(spot),
QuantLib::Handle<QuantLib::YieldTermStructure>(qTS),
QuantLib::Handle<QuantLib::YieldTermStructure>(rTS),
QuantLib::Handle<QuantLib::BlackVolTermStructure>(volTS)));
boost::shared_ptr<QuantLib::PricingEngine> engine =
QuantLib::MakeMCDiscreteArithmeticAPEngine<QuantLib::LowDiscrepancy>(stochProcess)
.withSamples(4095)
.withControlVariate(true);
boost::shared_ptr<QuantLib::Exercise> exercise(new
QuantLib::EuropeanExercise(maturityDate));
for (int i = 0; i <= 4; ++i)
{
auto tDay = QuantLib::Date(1, QuantLib::March, 2022 + i);
QuantLib::Settings::instance().evaluationDate() = tDay;
QuantLib::DiscreteAveragingAsianOption option(averageType, runningSum,
pastFixings, fixingDates,
payoff, exercise);
option.setPricingEngine(engine);
option.recalculate(); // even this doesn't help, or resetting of
engine and stochProcess
QuantLib::Real quantLibValue = option.NPV();
BOOST_CHECK_CLOSE(expectedValue, quantLibValue, 0.3); // error less
than 0.3%
}
Any idea what I'm doing wrong please?
--
Mohammad Shojatalab
|
|
From: jian Xu <jia...@gm...> - 2022-03-02 15:11:48
|
OK, I found out the answer. Basically, by checking
>>> calendar.isBusinessDay(ql.Date(30, 3, 2018))
False
I can see that the effective date 2018-03-29 (Thursday) is indeed an
"end of month". This is because 2018-03-30 (Friday) is a Good Friday.
So everything makes sense. Thanks.
Jian
On Wed, Mar 2, 2022 at 12:07 AM jian Xu <jia...@gm...> wrote:
>
> Hi,
> I'm confused by the "endOfMonth" setting. The document says:
> ```
> endOfMonth : If the start date is at the end of the month, whether
> other dates are required to be scheduled at the end of the month
> (except the last date).
> ```
>
> So my understanding is that if the start date is NOT the end of the
> month, then this setting doesn't matter. (is this correct?)
>
> However, it does matter in the following example. As the input
> suggests, I expect the first date in the schedule should be 2018-03-29
> (Thursday, NOT end of the month). However, I only get this result
> when I set endOfMonth=False. If I set it to true, the first date in
> the schedule will be 2018-03-31 (Saturday). Why?
>
> Thanks a lot.
>
> import QuantLib as ql
> calendar = ql.UnitedStates(ql.UnitedStates.GovernmentBond)
> schedule = ql.MakeSchedule(effectiveDate=ql.Date(29,3,2018),
> terminationDate=ql.Date(29, 3, 2021),
> tenor=ql.Period("3M"),
> calendar=calendar,
> convention=ql.Unadjusted,
> terminalDateConvention=ql.Unadjusted,
> rule=ql.DateGeneration.Forward,
> endOfMonth=True,
> firstDate=ql.Date(29, 6, 2018),
> nextToLastDate=ql.Date())
>
> print(schedule[0])
|