Skip to content

Commit aa9fda6

Browse files
pcaspersjenkins
authored andcommitted
QPR-12230 add fx fixing dates for fixed-amount conversion bonds
1 parent c83f31b commit aa9fda6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

OREData/ored/portfolio/convertiblebond.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,9 @@ void ConvertibleBond::build(const boost::shared_ptr<ore::data::EngineFactory>& e
492492
}
493493
}
494494

495-
// for cross currency, add required FX fixings for dividend history
495+
// for cross currency, add required FX fixings for conversion and dividend history
496496

497-
if (fx != nullptr && equity != nullptr) {
497+
if (fx != nullptr) {
498498

499499
Date d0 = qlUnderlyingBond->startDate();
500500
Date d1 = qlUnderlyingBond->maturityDate();
@@ -512,8 +512,10 @@ void ConvertibleBond::build(const boost::shared_ptr<ore::data::EngineFactory>& e
512512
d0 = std::min(d0, today);
513513

514514
// ...as a workaround, we add all fx fixings from min(today, bond start date) to maturity
515+
// -> this also covers the required fx fixings for conversion, so we don't have to add them separately
515516
for (Date d = d0; d <= d1; ++d) {
516-
requiredFixings_.addFixingDate(fx->fixingCalendar().adjust(d, Preceding), data_.conversionData().fxIndex());
517+
requiredFixings_.addFixingDate(fx->fixingCalendar().adjust(d, Preceding), data_.conversionData().fxIndex(),
518+
Date::maxDate(), false, false);
517519
}
518520
}
519521

0 commit comments

Comments
 (0)