Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CDS2015, a new DateGeneration rule #212

Merged
merged 5 commits into from
Mar 9, 2017

Conversation

thrasibule
Copy link
Contributor

This closes #138.

Integer skip = 3 - m%3;
result += skip*Months;
}
Month m = result.month();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible that this is called when rule is Twentieth, and in this case the adjustment to IMM month shouldn't be performed, should it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! Let me revert that.

Date next20th = nextTwentieth(effectiveDate, *rule_);
*rule_ == DateGeneration::CDS ||
*rule_ == DateGeneration::CDS2015) {
Date next20th = nextTwentieth(effectiveDate);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rule might be Twentieth here, see comment above.

isRegular_.push_back(true);
*rule_ == DateGeneration::CDS ||
*rule_ == DateGeneration::CDS2015) {
if (*rule_ == DateGeneration::CDS2015) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be an else if branch of the previous if, instead of being nested.

@lballabio lballabio added this to the 1.10 release milestone Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rolling frequency for single name CDS (and indices)
2 participants