Not sure if it is a bug in schedule.cpp
Posted by Schmidt on Jun 02, 2016; 7:00am
URL: http://quantlib.414.s1.nabble.com/Not-sure-if-it-is-a-bug-in-schedule-cpp-tp17498.html
Hi dear QuantLib developers
I'm curious about line#415 code in schedule.cpp. When I use DateGeneration::ThirdWednesday
to generate a schedule when:
effectiveDate = 2016/01/15
terminationDate = 2016/7/18
tenor = 1*Months
calendar = Taiwan()
businessdayConvention = Following
terminationDateConvention = Following
endOfMonth = false
before the execution of code starts from line#414
the member vector dates_ and isRegular_ of my schedule are:
dates_:{42384 42417 42445 42480 42508 42536 42571 42569}
isRegular_:{true true true true true true false}
since dates_[dates_.size()-2] >= dates_.back() is true (in my case dates_.size() = 8)
code line#415&416 will assign "false" to isRegular_[6]
and it is weired that this "false" value should be assigned to isRegular_[5] or more specifically
isRegular_[isRegular.size()-2]
the final dates_ will be {42384 42417 42445 42480 42508 42536 42569}
and 42569 is not an regular date, so the isRegular_ vector should be: {true true true true true false}however now my QuantLib 1.7 will generate a isRegular_ vector with all true in it. is it a little bug? or I'm somwhere wrong or misunderstanding?