Repository navigation
Don't adjust explicit effective and termination dates to end of month - #1509
Conversation
|
Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it. |
|
This PR was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks. |
|
This PR was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks. |
| for (Size i=1; i<dates_.size()-1; ++i) | ||
| dates_[i] = Date::endOfMonth(dates_[i]); | ||
| } else { | ||
| dates_.front() = calendar_.adjust(dates_.front(), convention); |
There was a problem hiding this comment.
This might need the same check for DateGeneration::OldCDS as in the non-EOM branch...
| if(d1 != d2) { | ||
| dates_.front() = d1; | ||
| dates_.back() = d2; | ||
| dates_.back() = calendar_.adjust(dates_.back(), terminationDateConvention); |
There was a problem hiding this comment.
...and similarly this might need the checks for DateGeneration::CDS or DateGeneration::CDS2015.
If so, the adjustments for first date and last date would be the same and they could be moved out of the if/else.
There was a problem hiding this comment.
Checks are optimized as suggested.
Schedule end of month adjustments removed for effective and termination dates as they are explicitly fixed. Fixes #1173