Skip to content

Commit 4046d32

Browse files
author
Sebastien Bouvard
committed
Merge branch 'feature/QPR-13664' into 'master'
QPR-13664: check for one period in index Closes QPR-13664 See merge request qs/oreplus!3087
2 parents acab1c3 + 1cf87e0 commit 4046d32

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OREData/ored/utilities/indexparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ string internalIndexName(const string& indexName) {
982982
// Check if we have an overnight index
983983
// This covers cases like USD-FedFunds-1D and returns USD-FedFunds
984984
// (no need to check convention based overnight indices, they are always of the form CCY-INDEX)
985-
if (parsePeriod(tokens[2]) == 1 * Days && isOvernightIndex(tmpName)) {
985+
if (isOnePeriod(tokens[2]) && parsePeriod(tokens[2]) == 1 * Days && isOvernightIndex(tmpName)) {
986986
return tmpName;
987987
}
988988

0 commit comments

Comments
 (0)