Re: Coupons and Fixed Rate Legs, Take Two...

Posted by Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/Coupons-and-Fixed-Rate-Legs-Take-Two-tp1186p1195.html

Hi Chiara,

Sorry, I guess I'm still using the old naming convention for Bonds.

I'm using the latest QuantLib source checked out from SVN as of yesterday.

My issue is really with what are the correct values to pass to the
referenceDates when building bond coupon periods. Or any coupon period for
that matter. Adjusted dates or unadjusted dates?

It is my understanding that the calculation methodology from the dayCounter
classes require unadjusted referenceDates. But yet, adjusted dates are
passed into the constructor of Coupon objects.

The function accrualPeriod() from the Coupon class delegate to the
dayCounter object for computation.

There is an example I reported before where given a 3 month period, if you
assume an extreme adjustment scheme where the start date is shifted to the
left by a few weeks and the end date is shifted to the right by a few weeks
you still end up with 0.25 as the accrualPeriod() because the ref dates are
the same as the period dates. Once you pass in unadjusted ref dates the
value returned looks decent.

In most cases the value of the refDates will equal the period dates and
things are fine, but I found that some of the bonds I am pricing differs
from FinCad when there are one or more date adjustments occuring. The actual
resulting dates are the same (unadjusted and adjusted) but not the PV. I
believe this is because of the way the discount() function works
(accumulation of the discount factor) within the InterestRate object used by
the dirtyPrice() function. This function is very sensitive to the refDates
parameter.

Do you have examples of a Bond where there are quite a few date adjustments
occuring and the value agrees with Bloomberg? Even bonds with different
dayCounters within its specification?

I could be wrong regarding this fact, which is why I'm looking for a
definate answer.

Thanks in advance...
Toy out...

>From: "FORNAROLA CHIARA" <[hidden email]>
>To: "Toyin Akin" <[hidden email]>, <[hidden email]>
>CC: <[hidden email]>
>Subject: RE: Coupons and Fixed Rate Legs, Take Two...
>Date: Tue, 24 Jul 2007 17:51:24 +0200
>
>Hi Toyin,
>
>before telling you my thoughts I'd like to know: what QuantLib release
>you are using. Is it 0.8.0? From what you're writing it seems you're
>still using the old version of fixedcouponbond which was renamed as
>fixedratebond. This latest takes the schedule object as one of the input
>for the construction of the bond object, and the schedule must be
>constructed according inputing the following parameters:
>datedDate i.e. the first interest accrual date (the one quoted in the
>bond's prospectus usually isn't adjusted) of the bond;
>
>maturityDate, i.e. the maturity date of the bond (the one quoted in the
>bond's prospectus usually isn't adjusted);
>
>Period(frequency), i.e. 0d, 1d, 3m, 6m, 1y depending on the payment
>frequency of the bonds (once, daily, quarterly, semiannual, annual);
>
>calendar, i.e. the calendar quoted in the prospectus of the bond;
>
>accrualConvention, i.e. the adjustment applied to accrual start and end
>dates of the bond (usually for Euro denominated bonds is "unadjusted");
>
>accrualConventionTermination, i.e. the adjustment applied to the
>maturity date (usually "unadjusted" if not differently specified in the
>prospectus);
>
>fromEnd, i.e. TRUE if you want to build the schedule backward, FALSE if
>you want to start building the schedule rolling from the first payment
>date (uasually the schedule is generated BACKWARD unless you have odd
>last or first coupon). EOM, i.e. TRUE if you have a payment date which
>falls for example on the 28th of February and, lets say pays
>semiannually, you want that the next nominal date is 31st August (i.e.
>the last day of the month) rather than the 28th of August. Usually this
>parameter is equal to FALSE unless differently specified in the bond's
>prospectus;
>
>firstDate, i.e. the nominal date in which the first coupon date is
>scheduled (unless you have odd cpn you don't need to pass this
>parameter, but if you input this information you have to input a date
>without business adjustment);
>
>nextToLastDate, i.e. the nominal date in which the next to last coupon
>date is schedule (unless you have odd cpn you don't need to pass this
>parameter but if you input this information you have to input a date
>without business adjustment).
>FirstDate and Next to last date are optional parameters, you need them
>only if the deal you have as an odd coupon.
>With the bond's constructor taking a schedule object properly created
>you shouldn't encounter any problem in replicating the bond's schedule
>(payments date and start and end accrual dates). So please let me know
>quant QuantLib release are you using.
>
>Chiara
> >-----Original Message-----
> >From: Toyin Akin [mailto:[hidden email]]
> >Sent: Tuesday, July 24, 2007 12:37 PM
> >To: FORNAROLA CHIARA; [hidden email]
> >Cc: [hidden email]
> >Subject: Coupons and Fixed Rate Legs, Take Two...
> >
> >Hi Chiara,
> >
> >As you are the "THE EXPERT" regarding Bonds in my opinion...
> >
> >I've been playing around with some of the Bond classes (FixedCouponBond
>in
> >particular) trying to match the prices within FinCad.
> >
> >This really leads me onto the issue that I mentioned some months before
> >regarding the fact that the way reference dates are passed to coupon
> >objects
> >for regular coupon periods were, I think, incorrect.
> >
> >The coupons simply take their reference Dates from the adjusted
>start/end
> >dates when in fact I beleive that refDates should be the unadjusted
>dates
> >for the period. The same unadjusted dates that the schedule class
> >internally
> >builds just before adjusting them.
> >
> >In a nutshell, the refdates should be unaffected by holiday calendars.
> >
> >I'm not sure what your take on this is, but with my limited testing,
>I've
> >found that I can match the prices of bonds priced within FinCad when I
>use
> >unadjusted reference dates.
> >
> >I've included a modified schedule class (really exposing the unadjusted
> >dates array) and a new bondcashflowvectors class that uses the extra
> >information exposed from the schedule class.
> >
> >Can you take a look and tell me what you think?
> >
> >Is it also your understanding that the unadjusted reference dates
>should be
> >unadjusted dates for bonds? This I believe becomes very important once
>you
> >start playing with different daycounters.
> >
> >There is also the issue of bond specifications where you may have a
> >different pricing algo for the first coupon period if there is only one
> >coupon period left to maturity.
> >
> >Thus if I am pricing a 10 year bond and I require ISMA for the Yield
> >calculation type, but Simple if the calculation date is moved in such a
> >fashion that there is only one coupon period left to Bond maturity.
> >
> >Any thoughts on this...?
> >
> >Thanks in advance,
> >Toy out.
> >
> >_________________________________________________________________
> >Win tickets to the sold out Live Earth concert!
> >http://liveearth.uk.msn.com
_________________________________________________________________
Need a brain boost? Recharge with a stimulating game. Play now! 
http://club.live.com/home.aspx?icid=club_hotmailtextlink1



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users