Cash-Settled Swaption Annuity in BlackSwaptionEngine

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Cash-Settled Swaption Annuity in BlackSwaptionEngine

Paul Giltinan
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
Reply | Threaded
Open this post in threaded view
|

Re: Cash-Settled Swaption Annuity in BlackSwaptionEngine

Nils Tobias Kramer
Hey Paul,

the pricing is a bit ambiguous as there are many different definitions how to price a cash settled swaption. Here's a link to my (essentially same) question:

http://sourceforge.net/p/quantlib/mailman/message/31940415/

Toby


2014-08-29 12:02 GMT+02:00 Paul Giltinan <[hidden email]>:
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



------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Cash-Settled Swaption Annuity in BlackSwaptionEngine

Paul Giltinan
Hi Toby,

Thanks for the link, I must have missed that discussion initially.

I have double-checked the Brigo-Mercurio (2nd edition, section 6.7.2) reference mentioned by Peter Caspers; it seems the formula suggested there is different to the formula in the Mercurio link provided below. According to his website, that paper is from 2009, so maybe the paper is more up-to-date than what appears in the book?

Has anybody else come across this before?

Thanks and regards,
Paul


On 29 August 2014 12:02, Nils Tobias Kramer <[hidden email]> wrote:
Hey Paul,

the pricing is a bit ambiguous as there are many different definitions how to price a cash settled swaption. Here's a link to my (essentially same) question:

http://sourceforge.net/p/quantlib/mailman/message/31940415/

Toby


2014-08-29 12:02 GMT+02:00 Paul Giltinan <[hidden email]>:
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




------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Cash-Settled Swaption Annuity in BlackSwaptionEngine

Peter Caspers-4
Hi Paul,

in my opinion there are two points. First is, what is the exact settlement convention on the expiry date. I believe (but am not totally sure) it is the one mentioned in the OpenGamma paper (first formula on top of page 2). The definite answer could probably best be given by some back office guy with experience in cash settlement of swaptions. It should also be written down in some ISDA documentation I guess. I didn't check either of these possibilities.

The second point is, what valuation model should we use. But there is no unique answer, is there. The Brigo / Mercurio book states one model, you a slightly different one above. In the Piterbarg book there are also more advanced models based on replication in a terminal swap rate model. And so on. However you can ask, which is the one used to translate volatilities into premiums on the VCAP pages for example. I don't know. The question is if the differences between the two approaches you mention are big enough to uniquely identify the one closer to ICAP ? Did you try that ?

I think it is important to reflect the settlement convention correctly in the pricing, but there may be different models (i.e. ql pricing engines) in place. Concerning the convention the current ql implementation is not the one from the OpenGamma paper, but following Brigo / Mercurio (book) if I am not mistaken. Maybe we should just provide the different possibilities on the model side (and also on the convention side unless we know better) ? An implementation of a replication approach would be a step forward for sure, too.

best regards
Peter









On 29 August 2014 14:05, Paul Giltinan <[hidden email]> wrote:
Hi Toby,

Thanks for the link, I must have missed that discussion initially.

I have double-checked the Brigo-Mercurio (2nd edition, section 6.7.2) reference mentioned by Peter Caspers; it seems the formula suggested there is different to the formula in the Mercurio link provided below. According to his website, that paper is from 2009, so maybe the paper is more up-to-date than what appears in the book?

Has anybody else come across this before?

Thanks and regards,
Paul


On 29 August 2014 12:02, Nils Tobias Kramer <[hidden email]> wrote:
Hey Paul,

the pricing is a bit ambiguous as there are many different definitions how to price a cash settled swaption. Here's a link to my (essentially same) question:

http://sourceforge.net/p/quantlib/mailman/message/31940415/

Toby


2014-08-29 12:02 GMT+02:00 Paul Giltinan <[hidden email]>:
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




------------------------------------------------------------------------------
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



------------------------------------------------------------------------------
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