Posted by
Toyin Akin on
Mar 09, 2006; 7:14pm
URL: http://quantlib.414.s1.nabble.com/Re-Quantlib-users-blackvariancecurve-question-used-by-the-LMM-code-tp11020p11022.html
Hi,
Normally if a client wants to price a 6 year swap from spot, 6 years is
added onto the spot date (UnAdjusted) and this date is used as a reference
for computing the period dates.
What is adjusted are the period coupon dates (look at the code within the
Schedule object).
The point is, the period dates are computed as :
Adjust(UnAdjustedSwapEndDate - N*Period).
For the final enddate of the final cashflow, this will be
Adjust(UnAdjustedSwapEndDate).
For the start date of the final cashflow, this will be
Adjust(UnAdjustedSwapEndDate - 1*Period).
etc...
For example, if a client wants to price a 6 year swap from the 17/3/2006,
the unadjusted end date of the swap will be 17/3/2012 (a sunday). When the
cashflows are computed 17/3/2012 is used as a reference date and for example
the last coupon will have dates of (18/12/2011, 18/3/2012).
If the AdjustedSwapEndDate is used in this formula, the dates generated are
completely different and a client will look at this schedule and think, well
my swap start on the 17/3/2006 and lasts for 6 years, but why is almost all
my coupon dates starting and ending on the 18th?
It should be the other way around, almost all the dates should be the 17th,
but with some being the 18th (give or take a few days).
That's why for swap / cap calculations, you specify an unadjusted endate
into the schedule class. But an adjustment is used within the coupon class
itself.
If however you use explicit start and end swap dates and you know that the
enddate is a non-holiday, it doesn't matter what BusinessdayConvention you
use.)
Maybe the code within the test-suite/capfloor.cpp should be changed...
I believe that this is the normal case...
Any thoughts anyone...?
Toyin Akin.
>From: Klaus Spanderen <
[hidden email]>
>Reply-To:
[hidden email]
>To: "Toyin Akin" <
[hidden email]>
>CC:
[hidden email]
>Subject: Re: [Quantlib-users] blackvariancecurve question - used by the LMM
>code...
>Date: Thu, 9 Mar 2006 05:39:44 +0100
>
>Hi Toyin,
>
>On Thursday 09 March 2006 10:29 am, you wrote:
> > One final point, the Schedule object used within the cashflows()
>function
> > of the LMMProcess class... I think that you probably need a
> > businessdayconvention of UnAdjusted. Otherwise your first cashflow could
>be
> > slightly too long. This is because if the end date falls on a weekend,
>it
> > will be move onto the newt good business day and thus within the
>generation
> > of the coupon dates, the dates will be attached to this modified date.
>
>The libor forward process inherits the cashflow schedule from the given
>index
>to allow exact pricing of cap(lets) using the lfm process. (see test case
>LiborMarketModelTest::testCapletPricing() ) and the cashflow schedule for a
>normal cap/floor is generated in the same way (see
>test-suite/capfloor.cpp).
>IMO the cash flow should be rolled over if the end date falls on a weekend
>but may be I miss the point here.
>
>cheers
> Klaus
>