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

Periodic schedule deduplication does not work when there are same elements in more than 2 count #2597

Open
lfathimakn opened this issue Aug 11, 2023 · 0 comments

Comments

@lfathimakn
Copy link
Contributor

When creating a schedule from a periodic schedule, there is a deduplication logic if we pass "combinePeriodsIfNecessary" flag as true:
https://github.com/OpenGamma/Strata/blob/main/modules/basics/src/main/java/com/opengamma/strata/basics/schedule/PeriodicSchedule.java#L453-L462

But if there are more than 2 duplicates of same element, the deduplication is only removing first instance of duplicate.
Eg:
adj = ["2020-01-01","2020-01-02","2020-01-03","2020-01-06","2020-01-06","2020-01-06","2020-01-07"]
After deuplcation:
adj = ["2020-01-01","2020-01-02","2020-01-03","2020-01-06","2020-01-06","2020-01-07"]

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

No branches or pull requests

1 participant