Cash-Settled Swaption Annuity in BlackSwaptionEngine
Posted by
Paul Giltinan on
URL: http://quantlib.414.s1.nabble.com/Cash-Settled-Swaption-Annuity-in-BlackSwaptionEngine-tp15810.html
Hi,
I have a question about the pricing of cash-settled swaptions using QuantLib::BlackSwaptionEngine.
The
BlackSwaptionEngine calculates the annuity term for cash-settled
swaptions by constructing a temporary discount curve from the forward
swap rate (see row 118 of blackswaptionengine.cpp). However, this curve
is then assigned the same reference date as the regular discount curve,
which means that the discounting occurs all the way to the evaluation
date.
According to Mercurio (
http://www.fabiomercurio.it/cashsettled_note.pdf,
equation (3)), this discounting should only be applied as far as the
cash settlement date of the swaption. I therefore propose a fix which
changes the reference date of the aforementioned swap-implied discount
curve and thus implements the pricing formula suggested by Mercurio.
If there are no objections I can provide a patch to fix this (code segment below).
Kind regards,
Paul Giltinan
Current implementation
case Settlement::Cash: { |
const Leg& fixedLeg = swap.fixedLeg(); |
boost::shared_ptr<FixedRateCoupon> firstCoupon = |
boost::dynamic_pointer_cast<FixedRateCoupon>(fixedLeg[0]); |
DayCounter dayCount = firstCoupon->dayCounter(); |
Real fixedLegCashBPS = |
CashFlows::bps(fixedLeg, |
InterestRate(atmForward, dayCount, Compounded, Annual), |
false, discountCurve_->referenceDate()) ; |
annuity = std::fabs(fixedLegCashBPS/basisPoint); |
break; |
}
Proposed Change
case Settlement::Cash: {
const Leg& fixedLeg = swap->fixedLeg();
boost::shared_ptr<FixedRateCoupon> firstCoupon =
boost::dynamic_pointer_cast<FixedRateCoupon>(fixedLeg[0]);
DayCounter dayCount = firstCoupon->dayCounter();
Date swapStartDate = firstCoupon->accrualStartDate();
Real fixedLegCashBPS =
CashFlows::bps(fixedLeg,
InterestRate(atmForward, dayCount, Compounded, Annual),
false, swapStartDate);
annuity = discountCurve_->discount(swapStartDate) * std::fabs(fixedLegCashBPS/basisPoint);
break;
} |
|
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users