Hi,
this might be a really dumb question... I was poking around in FixedCouponBond (QL 3.10), and tried to print out the cashflows that it generates, by inserting something like this into the end of the constructor in fixedcouponbond.cpp: for(int i=0; i< cashFlows_.size(); i++) { std::cout << "date: " << schedule[i] << ", amount: " << (*cashFlows_[i]).amount() << std::endl; } It looks as if when the coupon dates need to be adjusted (because they don't fall on a weekday), this affects the amount of the cashflows, like so: (This is with UnitedStates::GovernmentBond, Act360, and an annual coupon of 5%): date: December 15th, 2044, amount: 5 date: December 15th, 2045, amount: 5.02778 date: December 17th, 2046, amount: 4.98611 date: December 16th, 2047, amount: 4.98611 date: December 15th, 2048, amount: 5 date: December 15th, 2049, amount: 5 This seems to happen because in fixedratecoupon.hpp, amount() is nominal()*rate_*accrualPeriod(), and accrualPeriod (calculated in coupon.hpp), depends on the dates in the schedule, which are adjusted to always fall on business days. Now here is the (possibly stupid) question: I would have expected that although the date might be adjusted, the actual amount paid is not (that's the impression I got from reading standard textbooks), i.e. I would have expected "Dec 16, 2047, amount: 5", "Dec 17 2046, amount: 5" and so on. I have no idea how things work in the real world, though. Have I missed something fundamental here? Can someone enlighten me? Thank you for your patience. Brad |
Hi,
Let's say that you are recieving the coupon (5%) and the unadjusted end date of the coupon lands on a Sunday. Well the financial institution that owes you the coupon payment is not open and thus you have to wait until the Monday. However a day has gone by and a one day interest has been earned on your Notional. Well that interest is yours. If you are happy to recieve just the 5%, the financial institution has just made money. Actually you'll probably find that the next period is then shorter (in days) and thus you'll probably recieve less than 5%. In the long run, it all cancels out. Toy out. >From: Brad <[hidden email]> >To: [hidden email] >Subject: [Quantlib-users] cashflows in fixedcouponbond >Date: Wed, 23 Nov 2005 16:16:23 +0000 (UTC) > >Hi, > >this might be a really dumb question... > >I was poking around in FixedCouponBond (QL 3.10), and tried to print out >the >cashflows that it generates, by inserting something like this into the end >of >the constructor in fixedcouponbond.cpp: > >for(int i=0; i< cashFlows_.size(); i++) { > std::cout << "date: " << schedule[i] << ", amount: " << > (*cashFlows_[i]).amount() << std::endl; >} > >It looks as if when the coupon dates need to be adjusted (because they >don't >fall on a weekday), this affects the amount of the cashflows, like so: >(This is with UnitedStates::GovernmentBond, Act360, and an annual coupon of >5%): > >date: December 15th, 2044, amount: 5 >date: December 15th, 2045, amount: 5.02778 >date: December 17th, 2046, amount: 4.98611 >date: December 16th, 2047, amount: 4.98611 >date: December 15th, 2048, amount: 5 >date: December 15th, 2049, amount: 5 > >This seems to happen because in fixedratecoupon.hpp, amount() is >nominal()*rate_*accrualPeriod(), and accrualPeriod (calculated in >coupon.hpp), >depends on the dates in the schedule, which are adjusted to always fall on >business days. > >Now here is the (possibly stupid) question: I would have expected that >although >the date might be adjusted, the actual amount paid is not (that's the >impression >I got from reading standard textbooks), i.e. I would have expected "Dec 16, >2047, amount: 5", "Dec 17 2046, amount: 5" and so on. > >I have no idea how things work in the real world, though. > >Have I missed something fundamental here? Can someone enlighten me? > >Thank you for your patience. > >Brad > > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log >files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >_______________________________________________ >Quantlib-users mailing list >[hidden email] >https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Brad-11
On 11/23/2005 05:16:23 PM, Brad wrote:
> I was poking around in FixedCouponBond (QL 3.10), and tried to print > out the cashflows that it generates. > > It looks as if when the coupon dates need to be adjusted this affects > the amount of the cashflows. > > Now here is the (possibly stupid) question: I would have expected > that although the date might be adjusted, the actual amount paid is > not (that's the impression I got from reading standard textbooks) Don't trust everything you read in textbooks :) The amounts are indeed calculated based on the adjusted accrual period. However, different day-count conventions can depend in a smaller or a larger way from the underlying period. For instance, if you choose actual/actual ISMA---which, I think, is the convention for US government bonds---you should get 5 for all periods. Later, Luigi ---------------------------------------- There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies. -- C. A. R. Hoare |
Free forum by Nabble | Edit this page |