cashflow question for the fixed coupon bond

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

cashflow question for the fixed coupon bond

Vladimir Goldenberg
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
Reply | Threaded
Open this post in threaded view
|

Re: cashflow question for the fixed coupon bond

Luigi Ballabio
On 08/25/2005 01:00:13 AM, Vladimir Goldenberg wrote:

> I created a fixed coupon bond as follows:
>
> . . .
>
> 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.

Vlad,
        the missing 100 are returned by the redemption() method.
Given that---for a number of reasons---the last coupon and the  
redemption will continue to be stored internally as separate objects,  
do you (and the others reading this) think that they should be returned  
together by the cashflows() method? It can be done, but it might take a  
bit of work.

Later,
        Luigi

----------------------------------------

Westheimer's Discovery:
        A couple of months in the laboratory can frequently save a
        couple of hours in the library.