Login  Register

cashflow question for the fixed coupon bond

Posted by Vladimir Goldenberg on Aug 24, 2005; 5:01pm
URL: http://quantlib.414.s1.nabble.com/cashflow-question-for-the-fixed-coupon-bond-tp10855.html

I created a fixed coupon bond as follows:
 
. . .
  Integer settlementDays_=1;
  Calendar calendar_ = TARGET();
  BusinessDayConvention businessDayConvention_=Following;
  DayCounter dayCount_=Actual365Fixed();;
  Date stub_;
  bool fromEnd_=true;
  std::vector<Rate> coupons_(1);
  coupons_[0]=0.07875;
  Date issueDate_(15, June, 2000), 
  datedDate_(12, August, 2005),
  today_(10, August,2005);
   
  Date maturityDate_ = calendar.advance(issueDate_, 10, Years);

  Frequency frequency_=Semiannual;
  Real redemption_=100.0;
  Date settlement_= calendar.adjust(settlementDate), 
  latestDate_ = calendar.adjust(settlementDate);
 
  Rate riskFreeRate = 0.06;
  Handle<YieldTermStructure> termStructureHandle_(
            boost::shared_ptr<YieldTermStructure>(
                new FlatForward(settlement_, riskFreeRate, dayCount_)));
// fixed coupon bond
  FixedCouponBond bond(
   issueDate_,
   datedDate_,
   maturityDate_,
   settlementDays_,
   coupons_,
   frequency_,
   dayCount_,
   calendar_,
   businessDayConvention_,
   redemption_,
   termStructureHandle_,
   stub_,
   fromEnd_
   );
. . .
 
and later print out cashflows like:
std::vector<boost::shared_ptr<CashFlow> > cashflows = bond.cashflows();
     
  for ( i=0; i<cashflows.size(); ++i)
  {
   std::cout << cashflows[i]->date() << ": " <<
   cashflows[i]->amount() <<"\n";
  }

it brings back following cashflows:
 
 Show cashflow:
12 15th, 2005: 2.696918
6 15th, 2006: 3.926712
12 15th, 2006: 3.948288
6 15th, 2007: 3.926712
12 17th, 2007: 3.991438
6 16th, 2008: 3.926712
12 15th, 2008: 3.926712
6 15th, 2009: 3.926712
12 15th, 2009: 3.948288
6 15th, 2010: 3.926712
 
Horever, it was my understanding that for fixed coupon bond I should have nine cashflows of 3.9375 (based on coupon 7.875 / 2) plus one last cashflow of 103.9375 (face 100 + last half of coupon). Instead I got cashflows as above.
 
Any help is greatly appreciated
 
Vlad



Start your day with Yahoo! - make it your home page