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: Jake H. <jak...@gm...> - 2023-02-26 13:49:48
|
Hi Damiano, I never tried to implement the paper in Python but I can suggest David Duarte's resource: https://quantlib-python-docs.readthedocs.io/_/downloads/en/latest/pdf/ As far as I know he is maintaining a pretty huge piece of document about the usage of the QuantLib C++ objects in Python. I don't know if you already check them all, maybe you can find also something interesting here: https://www.quantlib.org/docs.shtml It will probably require a good amount of digging :-) Hope that helps! Il giorno dom 26 feb 2023 alle ore 09:52 Damiano Peinetti < dap...@gm...> ha scritto: > Hi, I'm trying to replicate the paper MATCHING THE BLOOMBERG CURVE S45 > WITH QUANTLIB > available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3640517 > > My problem is to translate the c++ code in Python, I looked at this > example: > > https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/global-bootstrap.py > > but I have no clue on how to correctly implement the additionalErrors > function (what is its return type, how I link the FraHelpers to the > iteratively bootstrapped termstructure...). > > Could you help me with this? > Thanks in advance, > Damiano > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Damiano P. <dap...@gm...> - 2023-02-26 08:51:36
|
Hi, I'm trying to replicate the paper MATCHING THE BLOOMBERG CURVE S45 WITH QUANTLIB available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3640517 My problem is to translate the c++ code in Python, I looked at this example: https://github.com/lballabio/QuantLib-SWIG/blob/master/Python/examples/global-bootstrap.py but I have no clue on how to correctly implement the additionalErrors function (what is its return type, how I link the FraHelpers to the iteratively bootstrapped termstructure...). Could you help me with this? Thanks in advance, Damiano |
|
From: Jake H. <jak...@gm...> - 2023-02-25 19:29:58
|
Got it. Thanks Jack and Luigi for the kind answer. Il giorno sab 25 feb 2023 alle ore 13:12 Luigi Ballabio < lui...@gm...> ha scritto: > For a single test case I use > > ./quantlib-test-suite --log_level=message > --run_test='*/*/*BarrierOptionTest__testParity*' > > > > On Sat, Feb 25, 2023 at 12:28 PM Jack G <jac...@gm...> wrote: > >> Something like this: >> >> ./quantlib-test-suite --log_level=test_suite --run_test='*/Forward*' >> >> On Sat, Feb 25, 2023 at 6:13 PM Jake Heke <jak...@gm...> wrote: >> >>> Hello experts, >>> According to your experience, is there a way to run the >>> quantlib-test-suite executable only for a specific test case? >>> Because running all the 983 test cases is quite time consuming, and >>> sometimes you just need to run and check only a specific test. >>> I apologize for the newbie question and thank you in advance for your >>> time. >>> _______________________________________________ >>> 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...> - 2023-02-25 12:13:04
|
For a single test case I use ./quantlib-test-suite --log_level=message --run_test='*/*/*BarrierOptionTest__testParity*' On Sat, Feb 25, 2023 at 12:28 PM Jack G <jac...@gm...> wrote: > Something like this: > > ./quantlib-test-suite --log_level=test_suite --run_test='*/Forward*' > > On Sat, Feb 25, 2023 at 6:13 PM Jake Heke <jak...@gm...> wrote: > >> Hello experts, >> According to your experience, is there a way to run the >> quantlib-test-suite executable only for a specific test case? >> Because running all the 983 test cases is quite time consuming, and >> sometimes you just need to run and check only a specific test. >> I apologize for the newbie question and thank you in advance for your >> time. >> _______________________________________________ >> 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: Jack G <jac...@gm...> - 2023-02-25 11:26:07
|
Something like this: ./quantlib-test-suite --log_level=test_suite --run_test='*/Forward*' On Sat, Feb 25, 2023 at 6:13 PM Jake Heke <jak...@gm...> wrote: > Hello experts, > According to your experience, is there a way to run the > quantlib-test-suite executable only for a specific test case? > Because running all the 983 test cases is quite time consuming, and > sometimes you just need to run and check only a specific test. > I apologize for the newbie question and thank you in advance for your time. > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Jake H. <jak...@gm...> - 2023-02-25 10:13:08
|
Hello experts, According to your experience, is there a way to run the quantlib-test-suite executable only for a specific test case? Because running all the 983 test cases is quite time consuming, and sometimes you just need to run and check only a specific test. I apologize for the newbie question and thank you in advance for your time. |
|
From: Luigi B. <lui...@gm...> - 2023-02-16 08:26:23
|
Hello Steve,
yes, two calendars for the same market share their holidays. There's
no easy way to change that. May I ask what is the use case?
Luigi
On Tue, Feb 14, 2023 at 7:50 AM Steve Hsieh <war...@gm...> wrote:
> Hi Luigi,
>
> Can I ask one more question?
>
> I have two calendar variables which link to same US calendar.
>
> When I remove cdr2’s holiday, it also changes cdr1’s holiday?
>
> It looks like that the Calendar in QuantLib is a default global object ?
>
> If it is, is there any way I can separate the object ?
>
>
>
> import QuantLib as ql
>
>
>
> cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact)
>
> cdr2=ql.UnitedStates(ql.UnitedStates.LiborImpact)
>
>
>
> print(cdr1.isBusinessDay(date1)) =>return false
>
> cdr2.removeHoliday(date1)
>
> print(cdr1.isBusinessDay(date1)) =>return true , why ?
>
> Regards,
> Steve
>
>
>
> On Mon, Feb 13, 2023 at 8:17 PM Steve Hsieh <war...@gm...>
> wrote:
>
>> Hi Luigi,
>> Thank you very much for your reply.
>> It does help.
>>
>> Regards,
>> Steve
>>
>>
>> Luigi Ballabio <lui...@gm...> 於 2023年2月13日 週一 下午7:34寫道:
>>
>>> Hello Steve,
>>> when you join two calendars, you can join their holidays (i.e., a
>>> day is a holiday if it is for any of them) or you can join their business
>>> days (i.e., a day is a holiday if it is for both of them). The default is
>>> the first behavior, so date1 is a holiday for the joint calendar because
>>> it's a holiday for cdr2 and date2 because it's a holiday for cdr1.
>>> If you want the opposite behavior, use cdr3=ql.JointCalendar(cdr1,cdr2,ql.JoinBusinessDays)
>>> instead.
>>>
>>> Luigi
>>>
>>>
>>> On Mon, Feb 13, 2023 at 9:45 AM Steve Hsieh <war...@gm...>
>>> wrote:
>>>
>>>>
>>>> Hi all,
>>>>
>>>> I’m doing some study on JointCalendar.
>>>>
>>>> I make two calendar and remove one holiday for each calendar
>>>> respectively.
>>>>
>>>> Then I make a joint calendar to combine the above calendars.
>>>>
>>>> I use isBusinessDay to check if I can get the desired result.
>>>>
>>>> I find joint calendar doesn’t return the expected result as both
>>>> calendars.
>>>>
>>>> If I am not using JointCalendar correctly?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> import QuantLib as ql
>>>>
>>>> cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact)
>>>>
>>>> cdr2=ql.UnitedStates(ql.UnitedStates.Settlement)
>>>>
>>>> date1=ql.Date(11, 2 , 2023)
>>>>
>>>> date2=ql.Date(12, 2 , 2023)
>>>>
>>>> cdr1.removeHoliday(date1)
>>>>
>>>> cdr2.removeHoliday(date2)
>>>>
>>>> cdr3=ql.JointCalendar(cdr1,cdr2)
>>>>
>>>>
>>>>
>>>> print(cdr1.isBusinessDay(date1))
>>>>
>>>> =>return True
>>>>
>>>>
>>>>
>>>> print(cdr2.isBusinessDay(date2))
>>>>
>>>> =>return True
>>>>
>>>>
>>>>
>>>> print(cdr3.isBusinessDay(date1))
>>>>
>>>> =>return False , why ?
>>>>
>>>>
>>>>
>>>> print(cdr3.isBusinessDay(date2))
>>>>
>>>> =>return Fasle , why ?
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Steve
>>>>
>>>>
>>>> _______________________________________________
>>>> QuantLib-users mailing list
>>>> Qua...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>>
>>>
|
|
From: Luigi B. <lui...@gm...> - 2023-02-16 08:23:54
|
[Note: adding the list back in cc -- please keep it in the loop so these
exchanges can be useful to others.]
Hello,
I haven't written that part, so I'm not sure myself. My understanding
is that Asian options under FD methods are calculated by using a
2-dimensional model in which the underlying is one variable and the average
is the other. The applyTo method updates the average at each point (i,j)
of the mesh, with x_[i] being the value of the underlying and a_[j] being
the value of the current average. I hope this can help decoding the
implementation. If not, I guess someone involved with that code should
step in.
Luigi
On Mon, Feb 13, 2023 at 1:02 PM Lucky Man <vol...@gm...> wrote:
> Thank you for the quick response, but I am wondering where would you put
> vector of weights inside FdmArithmeticAverageCondition?
>
>
> пн, 13 февр. 2023 г. в 13:27, Luigi Ballabio <lui...@gm...>:
>
>> Also, the two locations Jonathan pointed out deal with the average of any
>> past fixings. The calculation of the total average (including those) is in
>> the FdmArithmeticAverageCondition class instantiated at <
>> https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L103
>> >
>>
>> Luigi
>>
>>
>> On Mon, Feb 13, 2023 at 11:55 AM Jonathan Sweemer <sw...@gm...>
>> wrote:
>>
>>> Hi Lucky Man,
>>>
>>> The following two code locations should point you in the right direction:
>>>
>>>
>>> https://github.com/lballabio/QuantLib/blob/master/ql/instruments/asianoption.cpp#L90-L98
>>>
>>> https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L67-L68
>>>
>>> If you think your weighted average type would be useful to others, you
>>> can submit a pull request. Currently only arithmetic and geometric average
>>> types are implemented for that instrument.
>>>
>>>
>>> On Sat, Feb 11, 2023 at 9:18 PM Lucky Man <vol...@gm...>
>>> wrote:
>>>
>>>> What is exact place where we implement arithmetical mean while
>>>> calculating asianOption.NPV() using FdBlackScholesAsianEngine and
>>>> DiscreteAveragingAsianOption. Because my idea is to compute asian option,
>>>> but using a weighted arithmetic mean. Thanks in advance
>>>> _______________________________________________
>>>> 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: Francois B. <ig...@gm...> - 2023-02-14 12:54:37
|
This is a terribly belated email, but thanks for the reply, Peter.
Luigi, sure, I'll do that.
thanks
Francois Botha
On Fri, 3 Feb 2023 at 15:41, Luigi Ballabio <lui...@gm...>
wrote:
> Hello Francois, may you open an issue on GitHub for this if you haven't
> already? Thanks!
>
> Luigi
>
>
> On Sun, Jul 31, 2022 at 7:19 PM Francois Botha <ig...@gm...> wrote:
>
>> Hi all,
>>
>> I'm doing some fixed rate bond forward calculations and I'm trying to
>> understand the forward value.
>>
>> In forward.cpp, the code is:
>> Real Forward::forwardValue() const {
>> calculate();
>> return (underlyingSpotValue_ - underlyingIncome_ )/
>> discountCurve_->discount(maturityDate_);
>> }
>>
>> and in bondforward.cpp, the fields are set as:
>> underlyingSpotValue_ = spotValue();
>> underlyingIncome_ = spotIncome(incomeDiscountCurve_);
>> and
>> Real BondForward::spotValue() const {
>> return bond_->dirtyPrice();
>> }
>>
>> So underlyingSpotValue_ is hence the bond dirty price (per 100 nominal)
>> and underlyingIncome_ is the value of the bond coupons, but not per 100
>> nominal, but rather per the actual nominal of the bond.
>>
>> This looks like an unintended discrepancy in notional amounts and would
>> explain why the forward price and NPV for the bond forwards aren't close to
>> what I expect.
>>
>> There are however unit tests (e.g. testFuturesPriceReplication()) that
>> explicitly test this.
>>
>> Looking forward to an expert opinion here.
>>
>> thanks
>> Francois Botha
>>
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>
|
|
From: Steve H. <war...@gm...> - 2023-02-14 06:50:21
|
Hi Luigi, Can I ask one more question? I have two calendar variables which link to same US calendar. When I remove cdr2’s holiday, it also changes cdr1’s holiday? It looks like that the Calendar in QuantLib is a default global object ? If it is, is there any way I can separate the object ? import QuantLib as ql cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact) cdr2=ql.UnitedStates(ql.UnitedStates.LiborImpact) print(cdr1.isBusinessDay(date1)) =>return false cdr2.removeHoliday(date1) print(cdr1.isBusinessDay(date1)) =>return true , why ? Regards, Steve On Mon, Feb 13, 2023 at 8:17 PM Steve Hsieh <war...@gm...> wrote: > Hi Luigi, > Thank you very much for your reply. > It does help. > > Regards, > Steve > > > Luigi Ballabio <lui...@gm...> 於 2023年2月13日 週一 下午7:34寫道: > >> Hello Steve, >> when you join two calendars, you can join their holidays (i.e., a day >> is a holiday if it is for any of them) or you can join their business days >> (i.e., a day is a holiday if it is for both of them). The default is the >> first behavior, so date1 is a holiday for the joint calendar because it's a >> holiday for cdr2 and date2 because it's a holiday for cdr1. >> If you want the opposite behavior, use cdr3=ql.JointCalendar(cdr1,cdr2,ql.JoinBusinessDays) >> instead. >> >> Luigi >> >> >> On Mon, Feb 13, 2023 at 9:45 AM Steve Hsieh <war...@gm...> >> wrote: >> >>> >>> Hi all, >>> >>> I’m doing some study on JointCalendar. >>> >>> I make two calendar and remove one holiday for each calendar >>> respectively. >>> >>> Then I make a joint calendar to combine the above calendars. >>> >>> I use isBusinessDay to check if I can get the desired result. >>> >>> I find joint calendar doesn’t return the expected result as both >>> calendars. >>> >>> If I am not using JointCalendar correctly? >>> >>> >>> >>> >>> >>> import QuantLib as ql >>> >>> cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact) >>> >>> cdr2=ql.UnitedStates(ql.UnitedStates.Settlement) >>> >>> date1=ql.Date(11, 2 , 2023) >>> >>> date2=ql.Date(12, 2 , 2023) >>> >>> cdr1.removeHoliday(date1) >>> >>> cdr2.removeHoliday(date2) >>> >>> cdr3=ql.JointCalendar(cdr1,cdr2) >>> >>> >>> >>> print(cdr1.isBusinessDay(date1)) >>> >>> =>return True >>> >>> >>> >>> print(cdr2.isBusinessDay(date2)) >>> >>> =>return True >>> >>> >>> >>> print(cdr3.isBusinessDay(date1)) >>> >>> =>return False , why ? >>> >>> >>> >>> print(cdr3.isBusinessDay(date2)) >>> >>> =>return Fasle , why ? >>> >>> >>> >>> Regards, >>> >>> Steve >>> >>> >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>> >> |
|
From: Steve H. <war...@gm...> - 2023-02-13 12:17:37
|
Hi Luigi, Thank you very much for your reply. It does help. Regards, Steve Luigi Ballabio <lui...@gm...> 於 2023年2月13日 週一 下午7:34寫道: > Hello Steve, > when you join two calendars, you can join their holidays (i.e., a day > is a holiday if it is for any of them) or you can join their business days > (i.e., a day is a holiday if it is for both of them). The default is the > first behavior, so date1 is a holiday for the joint calendar because it's a > holiday for cdr2 and date2 because it's a holiday for cdr1. > If you want the opposite behavior, use cdr3=ql.JointCalendar(cdr1,cdr2,ql.JoinBusinessDays) > instead. > > Luigi > > > On Mon, Feb 13, 2023 at 9:45 AM Steve Hsieh <war...@gm...> > wrote: > >> >> Hi all, >> >> I’m doing some study on JointCalendar. >> >> I make two calendar and remove one holiday for each calendar respectively. >> >> Then I make a joint calendar to combine the above calendars. >> >> I use isBusinessDay to check if I can get the desired result. >> >> I find joint calendar doesn’t return the expected result as both >> calendars. >> >> If I am not using JointCalendar correctly? >> >> >> >> >> >> import QuantLib as ql >> >> cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact) >> >> cdr2=ql.UnitedStates(ql.UnitedStates.Settlement) >> >> date1=ql.Date(11, 2 , 2023) >> >> date2=ql.Date(12, 2 , 2023) >> >> cdr1.removeHoliday(date1) >> >> cdr2.removeHoliday(date2) >> >> cdr3=ql.JointCalendar(cdr1,cdr2) >> >> >> >> print(cdr1.isBusinessDay(date1)) >> >> =>return True >> >> >> >> print(cdr2.isBusinessDay(date2)) >> >> =>return True >> >> >> >> print(cdr3.isBusinessDay(date1)) >> >> =>return False , why ? >> >> >> >> print(cdr3.isBusinessDay(date2)) >> >> =>return Fasle , why ? >> >> >> >> Regards, >> >> Steve >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2023-02-13 11:34:42
|
Hello Steve,
when you join two calendars, you can join their holidays (i.e., a day
is a holiday if it is for any of them) or you can join their business days
(i.e., a day is a holiday if it is for both of them). The default is the
first behavior, so date1 is a holiday for the joint calendar because it's a
holiday for cdr2 and date2 because it's a holiday for cdr1.
If you want the opposite behavior, use
cdr3=ql.JointCalendar(cdr1,cdr2,ql.JoinBusinessDays)
instead.
Luigi
On Mon, Feb 13, 2023 at 9:45 AM Steve Hsieh <war...@gm...> wrote:
>
> Hi all,
>
> I’m doing some study on JointCalendar.
>
> I make two calendar and remove one holiday for each calendar respectively.
>
> Then I make a joint calendar to combine the above calendars.
>
> I use isBusinessDay to check if I can get the desired result.
>
> I find joint calendar doesn’t return the expected result as both calendars.
>
> If I am not using JointCalendar correctly?
>
>
>
>
>
> import QuantLib as ql
>
> cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact)
>
> cdr2=ql.UnitedStates(ql.UnitedStates.Settlement)
>
> date1=ql.Date(11, 2 , 2023)
>
> date2=ql.Date(12, 2 , 2023)
>
> cdr1.removeHoliday(date1)
>
> cdr2.removeHoliday(date2)
>
> cdr3=ql.JointCalendar(cdr1,cdr2)
>
>
>
> print(cdr1.isBusinessDay(date1))
>
> =>return True
>
>
>
> print(cdr2.isBusinessDay(date2))
>
> =>return True
>
>
>
> print(cdr3.isBusinessDay(date1))
>
> =>return False , why ?
>
>
>
> print(cdr3.isBusinessDay(date2))
>
> =>return Fasle , why ?
>
>
>
> Regards,
>
> Steve
>
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Luigi B. <lui...@gm...> - 2023-02-13 11:27:55
|
Also, the two locations Jonathan pointed out deal with the average of any past fixings. The calculation of the total average (including those) is in the FdmArithmeticAverageCondition class instantiated at < https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L103 > Luigi On Mon, Feb 13, 2023 at 11:55 AM Jonathan Sweemer <sw...@gm...> wrote: > Hi Lucky Man, > > The following two code locations should point you in the right direction: > > > https://github.com/lballabio/QuantLib/blob/master/ql/instruments/asianoption.cpp#L90-L98 > > https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L67-L68 > > If you think your weighted average type would be useful to others, you can > submit a pull request. Currently only arithmetic and geometric average > types are implemented for that instrument. > > > On Sat, Feb 11, 2023 at 9:18 PM Lucky Man <vol...@gm...> wrote: > >> What is exact place where we implement arithmetical mean while >> calculating asianOption.NPV() using FdBlackScholesAsianEngine and >> DiscreteAveragingAsianOption. Because my idea is to compute asian option, >> but using a weighted arithmetic mean. Thanks in advance >> _______________________________________________ >> 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: Jonathan S. <sw...@gm...> - 2023-02-13 10:53:09
|
Hi Lucky Man, The following two code locations should point you in the right direction: https://github.com/lballabio/QuantLib/blob/master/ql/instruments/asianoption.cpp#L90-L98 https://github.com/lballabio/QuantLib/blob/master/ql/pricingengines/asian/fdblackscholesasianengine.cpp#L67-L68 If you think your weighted average type would be useful to others, you can submit a pull request. Currently only arithmetic and geometric average types are implemented for that instrument. On Sat, Feb 11, 2023 at 9:18 PM Lucky Man <vol...@gm...> wrote: > What is exact place where we implement arithmetical mean while calculating > asianOption.NPV() using FdBlackScholesAsianEngine and > DiscreteAveragingAsianOption. Because my idea is to compute asian option, > but using a weighted arithmetic mean. Thanks in advance > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Steve H. <war...@gm...> - 2023-02-13 08:43:18
|
Hi all, I’m doing some study on JointCalendar. I make two calendar and remove one holiday for each calendar respectively. Then I make a joint calendar to combine the above calendars. I use isBusinessDay to check if I can get the desired result. I find joint calendar doesn’t return the expected result as both calendars. If I am not using JointCalendar correctly? import QuantLib as ql cdr1=ql.UnitedStates(ql.UnitedStates.LiborImpact) cdr2=ql.UnitedStates(ql.UnitedStates.Settlement) date1=ql.Date(11, 2 , 2023) date2=ql.Date(12, 2 , 2023) cdr1.removeHoliday(date1) cdr2.removeHoliday(date2) cdr3=ql.JointCalendar(cdr1,cdr2) print(cdr1.isBusinessDay(date1)) =>return True print(cdr2.isBusinessDay(date2)) =>return True print(cdr3.isBusinessDay(date1)) =>return False , why ? print(cdr3.isBusinessDay(date2)) =>return Fasle , why ? Regards, Steve |
|
From: Lucky M. <vol...@gm...> - 2023-02-11 12:15:59
|
What is exact place where we implement arithmetical mean while calculating asianOption.NPV() using FdBlackScholesAsianEngine and DiscreteAveragingAsianOption. Because my idea is to compute asian option, but using a weighted arithmetic mean. Thanks in advance |
|
From: Luigi B. <lui...@gm...> - 2023-02-03 13:41:15
|
Hello Francois, may you open an issue on GitHub for this if you haven't
already? Thanks!
Luigi
On Sun, Jul 31, 2022 at 7:19 PM Francois Botha <ig...@gm...> wrote:
> Hi all,
>
> I'm doing some fixed rate bond forward calculations and I'm trying to
> understand the forward value.
>
> In forward.cpp, the code is:
> Real Forward::forwardValue() const {
> calculate();
> return (underlyingSpotValue_ - underlyingIncome_ )/
> discountCurve_->discount(maturityDate_);
> }
>
> and in bondforward.cpp, the fields are set as:
> underlyingSpotValue_ = spotValue();
> underlyingIncome_ = spotIncome(incomeDiscountCurve_);
> and
> Real BondForward::spotValue() const {
> return bond_->dirtyPrice();
> }
>
> So underlyingSpotValue_ is hence the bond dirty price (per 100 nominal)
> and underlyingIncome_ is the value of the bond coupons, but not per 100
> nominal, but rather per the actual nominal of the bond.
>
> This looks like an unintended discrepancy in notional amounts and would
> explain why the forward price and NPV for the bond forwards aren't close to
> what I expect.
>
> There are however unit tests (e.g. testFuturesPriceReplication()) that
> explicitly test this.
>
> Looking forward to an expert opinion here.
>
> thanks
> Francois Botha
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Ioannis R. <qua...@de...> - 2023-01-30 12:13:53
|
Hi Tom, It is a financial feature part of the OIS term sheet and called "Rate Cutoff". I have written about this at https://www.deriscope.com/products/Key_OI_Term_Rate__Rate_Cutoff.html Regards, Ioannis On 1/30/2023 12:38 PM, Tom Anderson wrote: > Hello, > > I have a rather basic question. > OvernightIndexedCouponPricer::averageRate has a special case for when > "the last fixing is not used for its full period": > > https://github.com/lballabio/QuantLib/blob/38bf3fa4a728d82a9975b2ae5fb86eee0433f3ce/ql/cashflows/overnightindexedcoupon.cpp#L107 > > > Is this for when the coupon ends on a day that is not a business day? > Looking at how the list of dates is put together (in the telescopic > case), that seems to be the only reason the last date would not be the > end of the accrual period: > > https://github.com/lballabio/QuantLib/blob/38bf3fa4a728d82a9975b2ae5fb86eee0433f3ce/ql/cashflows/overnightindexedcoupon.cpp#L188 > > > If so, out of interest, does this ultimately flow from ISDA rules for > OISs, or is this just financial common sense? > > Thanks, > tom > -- Diese E-Mail wurde von Avast-Antivirussoftware auf Viren geprüft. www.avast.com |
|
From: Tom A. <tw...@ur...> - 2023-01-30 11:54:00
|
Hello, I have a rather basic question. OvernightIndexedCouponPricer::averageRate has a special case for when "the last fixing is not used for its full period": https://github.com/lballabio/QuantLib/blob/38bf3fa4a728d82a9975b2ae5fb86eee0433f3ce/ql/cashflows/overnightindexedcoupon.cpp#L107 Is this for when the coupon ends on a day that is not a business day? Looking at how the list of dates is put together (in the telescopic case), that seems to be the only reason the last date would not be the end of the accrual period: https://github.com/lballabio/QuantLib/blob/38bf3fa4a728d82a9975b2ae5fb86eee0433f3ce/ql/cashflows/overnightindexedcoupon.cpp#L188 If so, out of interest, does this ultimately flow from ISDA rules for OISs, or is this just financial common sense? Thanks, tom -- I would advise students to pay more attention to the fundamental ideas rather than the latest technology. The technology will be out-of-date before they graduate. Fundamental ideas never get out of date. However, what worries me about what I just said is that some people would think of Turing machines and Goedel's theorem as fundamentals. I think those things are fundamental but they are also nearly irrelevant. -- David Parnas |
|
From: Jonathan S. <sw...@gm...> - 2023-01-28 08:13:25
|
Hi Amine, Not sure if this is exactly what you're looking for, but there are some test cases in the C++ code for bootstrapping a SOFR yield term structure from futures quotes. You might be able to use this as a reference for your python code. https://github.com/lballabio/QuantLib/blob/master/test-suite/sofrfutures.cpp#L45 On Thu, Jan 26, 2023 at 8:44 PM Amine Ifri <ami...@gm...> wrote: > Dear Quantlib teams/users, > > Currently looking to use the QL Python library for ETD contracts. Went to > check the doc but couldn’t find any concrete class of a term structure that > would take only a ref date, a list of anchor dates, and a list of > corresponding quotes corresponding to each contract expiry. > > Grateful if someone could tell me if such impl exists. Many thanks. > > Amine Ifri > > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > |
|
From: Luigi B. <lui...@gm...> - 2023-01-25 17:12:27
|
Hello,
you need `#define QL_ENABLE_SESSIONS`, and yes, you'll have to
recompile the C++ library. If you're using 1.29, disregard the mention of a
`sessionId` function in the documentation; that's out of date.
Luigi
On Wed, Jan 25, 2023 at 4:27 PM Zebang Ni <zeb...@da...>
wrote:
> Thank you Josep and Luigi! These are all very helpful.
>
> I have a follow-up question though. I am using the QuantLib python library
> now. If I want to compile the library, can I do that directly through the
> python library or I have to compile C++ library?
>
> Also, @Luigi, I only found #define QL_HIGH_RESOLUTION_DATE but no
> evaluation date. Do we have any more detailed documentation that tells us
> how to compile that specific configuration?
>
> Best regards,
>
> Zebang
>
>
>
>
>
> On Tue, Jan 24, 2023 at 6:32 AM Luigi Ballabio <lui...@gm...>
> wrote:
>
>> Hello Zebang,
>> you can compile the library so that the evaluation date is
>> thread-local, see <https://www.quantlib.org/reference/config.html>.
>> However, there's no support for sharing objects such as curves or
>> instruments between threads. Each thread will need to
>> recreate instruments, curves, engines etc.
>>
>> Hope this helps,
>> Luigi
>>
>> On Mon, Jan 23, 2023 at 8:51 PM Zebang Ni via QuantLib-users <
>> qua...@li...> wrote:
>>
>>> Hi,
>>>
>>> Does anyone experience using ql.Settings.instance().evaluationDate
>>> asynchronously?
>>>
>>> I tried the calculation option Greek theta by changing a small increment
>>> on time variable, which is ql.Settings.instance().evaluationDate here on
>>> ql.DividendVanillaOption.
>>>
>>> It is easy when we do everything one by one. But we are experiencing a
>>> large amount of calculation which requires us to run the calculation
>>> asynchronously. So I need to change ql.Settings.instance().evaluationDate
>>> for each calculation.
>>>
>>> Is there a way I can overwrite this setting parameters for each option
>>> object?
>>>
>>> Thanks,
>>>
>>> Zebang
>>>
>>> _______________________________________________
>>> QuantLib-users mailing list
>>> Qua...@li...
>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>>
>>
|
|
From: Zebang Ni <zeb...@da...> - 2023-01-25 15:27:54
|
Thank you Josep and Luigi! These are all very helpful. I have a follow-up question though. I am using the QuantLib python library now. If I want to compile the library, can I do that directly through the python library or I have to compile C++ library? Also, @Luigi, I only found #define QL_HIGH_RESOLUTION_DATE but no evaluation date. Do we have any more detailed documentation that tells us how to compile that specific configuration? Best regards, Zebang On Tue, Jan 24, 2023 at 6:32 AM Luigi Ballabio <lui...@gm...> wrote: > Hello Zebang, > you can compile the library so that the evaluation date is > thread-local, see <https://www.quantlib.org/reference/config.html>. > However, there's no support for sharing objects such as curves or > instruments between threads. Each thread will need to > recreate instruments, curves, engines etc. > > Hope this helps, > Luigi > > On Mon, Jan 23, 2023 at 8:51 PM Zebang Ni via QuantLib-users < > qua...@li...> wrote: > >> Hi, >> >> Does anyone experience using ql.Settings.instance().evaluationDate >> asynchronously? >> >> I tried the calculation option Greek theta by changing a small increment >> on time variable, which is ql.Settings.instance().evaluationDate here on >> ql.DividendVanillaOption. >> >> It is easy when we do everything one by one. But we are experiencing a >> large amount of calculation which requires us to run the calculation >> asynchronously. So I need to change ql.Settings.instance().evaluationDate >> for each calculation. >> >> Is there a way I can overwrite this setting parameters for each option >> object? >> >> Thanks, >> >> Zebang >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |
|
From: Luigi B. <lui...@gm...> - 2023-01-24 11:32:09
|
Hello Zebang,
you can compile the library so that the evaluation date is
thread-local, see <https://www.quantlib.org/reference/config.html>.
However, there's no support for sharing objects such as curves or
instruments between threads. Each thread will need to
recreate instruments, curves, engines etc.
Hope this helps,
Luigi
On Mon, Jan 23, 2023 at 8:51 PM Zebang Ni via QuantLib-users <
qua...@li...> wrote:
> Hi,
>
> Does anyone experience using ql.Settings.instance().evaluationDate
> asynchronously?
>
> I tried the calculation option Greek theta by changing a small increment
> on time variable, which is ql.Settings.instance().evaluationDate here on
> ql.DividendVanillaOption.
>
> It is easy when we do everything one by one. But we are experiencing a
> large amount of calculation which requires us to run the calculation
> asynchronously. So I need to change ql.Settings.instance().evaluationDate
> for each calculation.
>
> Is there a way I can overwrite this setting parameters for each option
> object?
>
> Thanks,
>
> Zebang
>
> _______________________________________________
> QuantLib-users mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|
|
From: Josep R. <jos...@gm...> - 2023-01-23 20:03:00
|
Hello, If with asynchronously you mean with multiple threads I would say the standard answer is no (or it used to be). I think using some compiling flags and taking care of some things it would be possible but is not meant to be used that way. Check the answer from Luigi Ballabio. below as it might help. https://stackoverflow.com/a/47098133/1644395 Thank you, Josep On Mon, Jan 23, 2023 at 1:51 PM Zebang Ni via QuantLib-users < qua...@li...> wrote: > Hi, > > Does anyone experience using ql.Settings.instance().evaluationDate > asynchronously? > > I tried the calculation option Greek theta by changing a small increment > on time variable, which is ql.Settings.instance().evaluationDate here on > ql.DividendVanillaOption. > > It is easy when we do everything one by one. But we are experiencing a > large amount of calculation which requires us to run the calculation > asynchronously. So I need to change ql.Settings.instance().evaluationDate > for each calculation. > > Is there a way I can overwrite this setting parameters for each option > object? > > Thanks, > > Zebang > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Zebang Ni <zeb...@da...> - 2023-01-23 19:48:46
|
Hi, Does anyone experience using ql.Settings.instance().evaluationDate asynchronously? I tried the calculation option Greek theta by changing a small increment on time variable, which is ql.Settings.instance().evaluationDate here on ql.DividendVanillaOption. It is easy when we do everything one by one. But we are experiencing a large amount of calculation which requires us to run the calculation asynchronously. So I need to change ql.Settings.instance().evaluationDate for each calculation. Is there a way I can overwrite this setting parameters for each option object? Thanks, Zebang |