cashflows in fixedcouponbond

Posted by Brad-11 on
URL: http://quantlib.414.s1.nabble.com/cashflows-in-fixedcouponbond-tp4249.html

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