|
From: Tom A. <tw...@ur...> - 2020-06-09 10:30:15
|
Done - i hope this is clear: https://github.com/lballabio/QuantLib/issues/833 tom On Tue, 9 Jun 2020, Luigi Ballabio wrote: > Thanks, Tom. If you think it would be useful to add code to calculate a > default termination date for the IMM case, may you open an issue on GitHub > so someone may eventually pick it up? > > Luigi > > > On Sun, Jun 7, 2020 at 10:25 PM Tom Anderson <tw...@ur...> wrote: > >> (following up mostly for the sake of anyone reading the archives!) >> >> I'm starting with an effective date and a tenor ("computer, what is the >> rate for the two year out of IMM, IMM rolls?"), so i don't have a >> termination date to begin with. I am using MakeVanillaSwap, which requires >> a tenor and index, but makes everything else optional and tries to work it >> out. If you use MakeVanillaSwap with a two-year tenor, an IMM effective >> date, and a ThirdWednesday date generation rule, you get a standard >> termination date, rather than an IMM one. Hence, i need to work out the >> right termination date, and explicitly give it to MakeVanillaSwap. >> >> tom >> >> On Tue, 2 Jun 2020, Mike DelMedico wrote: >> >>> Glad it worked. When I build the schedules, the dates seem to flow fine, >>> so not sure why your end date wouldn't line up with the proper final IMM >>> date. See below: >>> >>> floatSchedule = ql.Schedule(effectiveDate, >>> maturityDate, >>> ql.Period(3, ql.Months), >>> calendarUSD_FedFund, >>> ql.ModifiedFollowing, >>> ql.ModifiedFollowing, >>> ql.DateGeneration.ThirdWednesday, >>> False) >>> >>> for i in floatSchedule: >>> print(i) >>> >>> June 17th, 2020 >>> September 16th, 2020 >>> December 16th, 2020 >>> March 17th, 2021 >>> June 16th, 2021 >>> September 15th, 2021 >>> December 15th, 2021 >>> March 16th, 2022 >>> June 15th, 2022 >>> September 21st, 2022 >>> December 21st, 2022 >>> March 15th, 2023 >>> June 21st, 2023 >>> >>> >>> On Tue, Jun 2, 2020 at 2:50 PM Tom Anderson <tw...@ur...> >> wrote: >>> >>>> That mostly does it, thanks! >>>> >>>> For some reason, i had assumed that the accrual periods for each coupon >>>> were based directly on the frequency or index tenor, rather than running >>>> to the next date. Too much time spent looking at futures bundles >> probably. >>>> >>>> It seems like i also need to tweak the end date. ThirdWednesday >>>> specifically doesn't do that. >>>> >>>> tom >>>> >>>> On Fri, 29 May 2020, Mike DelMedico wrote: >>>> >>>>> I’m pretty sure you just flip the generator from ‘Backward” to >>>>> “ThirdWednesday” and you should be good to go. >>>>> >>>>> These are very common use now given everyone’s desire to minimize line >>>>> items. Much easier to compress a book of swaps that have all the >> cashflow >>>>> dates lined up instead of a book with dozens of different reset dates. >>>>> >>>>> The other popular flavor is IMM effective but with standard rolls. >>>>> >>>>> -Mike >>>>> >>>>> >>>>> On Fri, May 29, 2020 at 12:45 Tom Anderson <tw...@ur...> >> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> There are some dreadful interest rate swaps which use "IMM rolls" - >> the >>>>>> cashflows are on quarterly IMM dates, and the cashflow reflects an >>>> accrual >>>>>> over the period from that IMM date to the next one. >>>>>> >>>>>> (I think. I can't find a precise definition of how these swaps work. >>>> They >>>>>> just exist.) >>>>>> >>>>>> Does QuantLib support such swaps? >>>>>> >>>>>> I can generate a custom Schedule where cashflows are on IMM dates, >> but i >>>>>> don't know of a way to tweak the accrual periods for each cashflow. >>>>>> >>>>>> Thanks, >>>>>> tom >>>>>> >>>>>> -- >>>>>> 12:28 <@ashak> why wouldn't you run it as root? Yuo don't get >> permission >>>>>> denied's on things then ;) >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>>>> >>>> >>>> -- >>>> There are only two hard things in computer science: cache invalidation, >>>> naming things, and off-by-one errors. -- anonymous >>> >> >> -- >> Wikipedia topics: lists of trains, Mortal Kombat characters, one-time >> villains from Mario games, road intersections, boring suburban schools, >> garage bands, cats, webcomics, Digimon, Bionicle characters, webforums, >> characters from English soap operas, and Mortal Kombat characters that >> don't exist -- Uncyclopedia_______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > -- X is for ... EXECUTION! |