Login  Register

Schedule's termination date question

Posted by Shuo Wang-2 on Dec 15, 2011; 12:50pm
URL: http://quantlib.414.s1.nabble.com/Schedule-s-termination-date-question-tp6299.html

Hi all,

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?


--
王硕
邮箱:[hidden email]
Whatever your journey, keep walking.

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users