|
From: Luigi B. <lui...@gm...> - 2012-01-30 12:34:35
|
Seeing as nobody seems to oppose it, I'm checking in the change. "Unadjusted" now doesn't perform any adjustment. Luigi 2012/1/20 Luigi Ballabio <lui...@gm...>: > On second thought, we might leave the adjustment if > terminationDateConvention is not 'Unadjusted' and remove it otherwise. > > Thoughts anyone? > > Luigi > > > 2011/12/29 Luigi Ballabio <lui...@gm...>: >> Hello, >> it looks like a bug. The endOfMonth=true flag you're passing as >> the last argument to the Schedule constructor is taking precedence and >> moving the termination date to the end of June (you get June 15th if >> you pass false, but also March 30th instead of the two March 31st). >> That's probably not the desired behavior. >> >> I'll check the code and see what I can do (of course, if anyone wants >> to have a shot at it instead, you're welcome: just drop me a line). >> >> Thanks for the heads-up. >> >> Luigi >> >> >> On Thu, Dec 15, 2011 at 1:50 PM, Shuo Wang <shu...@gm...> wrote: >>> I have run the example in >>> http://quantlib.org/slides/dima-ql-intro-1.pdf , the code is as below >>> >>> >>> Date begin(30, September, 2009), end(15, Jun, 2012); Calendar myCal >>> = Japan(); BusinessDayConvention bdC = >>> BusinessDayConvention(Following); Period myTenor(6, >>> Months); DateGeneration::Rule >>> myRule=DateGeneration::Forward; Schedule mySched(begin, end, myTenor, >>> myCal, bdC, bdC, myRule, true); std::vector<Date> >>> finalSched=mySched.dates(); BOOST_FOREACH(Date d, finalSched) >>> std::cout << d << std::endl; >>> >>> And this gives this result >>> >>> September 30th, 2009 >>> March 31st, 2010 >>> September 30th, 2010 >>> March 31st, 2011 >>> September 30th, 2011 >>> March 30th, 2012 >>> June 29th, 2012 <---termination date >>> >>> >>> But the intro presentation the termination date is June 15, 2012, >>> which I think is more reasonable result. >>> >>> I would like to ask is this behavior by design or a bug? >>> >>> >>> -- >>> 王硕 >>> 邮箱:shu...@gm... >>> Whatever your journey, keep walking. |