Skip to content

Commit 1cf87e0

Browse files
committed
QPR-13664: check for one period in index
1 parent 4dd84d4 commit 1cf87e0

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)