Skip to content

Commit fa5d9a5

Browse files
committed
Add check quotes size matches found market data
1 parent d7015de commit fa5d9a5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

OREData/ored/marketdata/yieldcurve.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,14 @@ void YieldCurve::buildDiscountCurve() {
948948
}
949949
}
950950

951+
// Some logging and checks
951952
QL_REQUIRE(data.size() > 0, "No market data found for curve spec " << curveSpec_.name() << " with as of date "
952953
<< io::iso_date(asofDate_));
954+
if (!wildcard) {
955+
QL_REQUIRE(data.size() == quotes.size(), "Found " << data.size() << " quotes, but "
956+
<< quotes.size()
957+
<< " quotes given in config " << curveConfig_->curveID());
958+
}
953959

954960
if (data.begin()->first > asofDate_) {
955961
DLOG("Insert discount curve point at time zero for " << curveSpec_.name());

0 commit comments

Comments
 (0)