Skip to content

Commit 561033c

Browse files
pcaspersjenkins
authored andcommitted
QPR-12222: update constructor to fix fixing date issue
1 parent 962e266 commit 561033c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

QuantExt/qle/cashflows/floatingratefxlinkednotionalcoupon.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ class FloatingRateFXLinkedNotionalCoupon : public FloatingRateCoupon, public FXL
3939
FloatingRateFXLinkedNotionalCoupon(const Date& fxFixingDate, Real foreignAmount, boost::shared_ptr<FxIndex> fxIndex,
4040
const boost::shared_ptr<FloatingRateCoupon>& underlying)
4141
: FloatingRateCoupon(underlying->date(), Null<Real>(), underlying->accrualStartDate(),
42-
underlying->accrualEndDate(), underlying->fixingDays(), underlying->index(),
42+
underlying->accrualEndDate(), underlying->fixingDate(), underlying->index(),
4343
underlying->gearing(), underlying->spread(), underlying->referencePeriodStart(),
4444
underlying->referencePeriodEnd(), underlying->dayCounter(), underlying->isInArrears()),
4545
FXLinked(fxFixingDate, foreignAmount, fxIndex), underlying_(underlying) {
46+
fixingDays_ = underlying->fixingDays() == Null<Natural>()
47+
? (underlying->index() ? underlying->index()->fixingDays() : 0)
48+
: underlying->fixingDays();
4649
registerWith(FXLinked::fxIndex());
4750
registerWith(underlying_);
4851
}

0 commit comments

Comments
 (0)