Skip to content

Commit f29e4e7

Browse files
mgronckijenkins
authored andcommitted
QPR-12108 QPR-12126 QPR-12107: todays fixings should be marked optional, because we can fallback to estimate it if its missing
1 parent 0ef4e07 commit f29e4e7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

OREData/ored/portfolio/fixingdates.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,10 @@ void FixingDateGetter::visit(EquityMarginCoupon& c) {
657657
void FixingDateGetter::visit(CommodityCashFlow& c) {
658658
auto indices = c.indices();
659659
for (const auto& kv : indices) {
660+
// todays fixing is not mandatory, we will fallback to estimate it if its not there.
661+
bool isTodaysFixing = Settings::instance().evaluationDate() == kv.first;
660662
// see above, the ql and ORE index names are identical
661-
requiredFixings_.addFixingDate(kv.first, kv.second->name(), c.date());
663+
requiredFixings_.addFixingDate(kv.first, kv.second->name(), c.date(), false, !isTodaysFixing);
662664
// if the pricing date is > future expiry, add the future expiry itself as well
663665
if (auto d = kv.second->expiryDate(); d != Date() && d < kv.first) {
664666
requiredFixings_.addFixingDate(d, kv.second->name(), d);

0 commit comments

Comments
 (0)