Skip to content

Commit 9d3a0b4

Browse files
author
Damien Barker
committed
QPR-13614 make indexed coupon fixing optional when fixingDate==valuationDate
1 parent 72087c4 commit 9d3a0b4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

OREData/ored/portfolio/fixingdates.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,10 @@ void FixingDateGetter::visit(QuantExt::SubPeriodsCoupon1& c) {
695695

696696
void FixingDateGetter::visit(IndexedCoupon& c) {
697697
// the coupon's index might be null if an initial fixing is provided
698-
if (c.index())
699-
requiredFixings_.addFixingDate(c.fixingDate(), IndexNameTranslator::instance().oreName(c.index()->name()),
700-
c.date());
698+
if (c.index()) {
699+
bool isTodaysFixing = Settings::instance().evaluationDate() == c.fixingDate();
700+
requiredFixings_.addFixingDate(c.fixingDate(), IndexNameTranslator::instance().oreName(c.index()->name()), c.date(), false, isTodaysFixing);
701+
}
701702
QL_REQUIRE(c.underlying(), "FixingDateGetter::visit(IndexedCoupon): underlying() is null");
702703
c.underlying()->accept(*this);
703704
}

0 commit comments

Comments
 (0)