Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

bond Class Reference

#include <bond.h>

Inheritance diagram for bond:

riskybond treasurybond convertiblebond List of all members.

Public Member Functions

 bond (Date issue, Date maturity, Date firstcoupondate, Real coupon, Frequency freq, Real faceamount, DayCountConvention daycount, yieldCurve yc)
 Constructor.

 ~bond (void)
 Destructor.

cashflow getCashflow ()
virtual Real quotedPrice (Date today)
virtual Real fairvalue (Date today)
virtual Real yieldToMaturity (Date today)
virtual Real duration (Date today)
virtual Real convexity (Date today)
virtual Real quotedPrice ()
virtual Real fairvalue ()
virtual Real yieldToMaturity ()
virtual Real duration ()
virtual Real convexity ()
virtual Date getMaturity ()
virtual Date getIssue ()
virtual Real getMaturityInYears ()
virtual Real getMaturityInYears (Date today)
virtual Real getFaceAmount () const

Protected Attributes

Date _issue
Date _maturity
Date _firstcoupondate
Real _coupon
Frequency _freq
Real _faceamount
yieldCurve _yc
DayCountConvention _daycount

Constructor & Destructor Documentation

bond::bond Date  issue,
Date  maturity,
Date  firstcoupondate,
Real  coupon,
Frequency  freq,
Real  faceamount,
DayCountConvention  daycount,
yieldCurve  yc
 

Constructor.

Parameters:
issue: date of issue of the bond
maturity: maturity of the bond
firstcoupondate: date of the first coupon
coupon: coupon of the bond, express as a percentqge of the faceamount
freq: frequency of the coupon
faceamount: par value
daycount: daycount convention
yc: yieldcurve

Definition at line 18 of file bond.cpp.

References Real.

bond::~bond void   )  [inline]
 

Destructor.

Definition at line 55 of file bond.h.


Member Function Documentation

virtual Real bond::convexity  )  [inline, virtual]
 

Definition at line 69 of file bond.h.

References _issue, and Real.

Real bond::convexity Date  today  )  [virtual]
 

Definition at line 251 of file bond.cpp.

References _daycount, Date::dayCount(), getCashflow(), cashflow::getCashflows(), cashflow::getDates(), Natural, Real, and yieldToMaturity().

Referenced by inputBond(), and mainbond().

virtual Real bond::duration  )  [inline, virtual]
 

Definition at line 68 of file bond.h.

References _issue, and Real.

Real bond::duration Date  today  )  [virtual]
 

Definition at line 226 of file bond.cpp.

References _daycount, Date::dayCount(), getCashflow(), cashflow::getCashflows(), cashflow::getDates(), Natural, Real, and yieldToMaturity().

Referenced by inputBond(), and mainbond().

virtual Real bond::fairvalue  )  [inline, virtual]
 

Reimplemented in convertiblebond.

Definition at line 66 of file bond.h.

References _issue, and Real.

Referenced by riskybond::rho(), treasurybond::rho(), and yieldToMaturity().

Real bond::fairvalue Date  today  )  [virtual]
 

Reimplemented in convertiblebond.

Definition at line 116 of file bond.cpp.

References _coupon, _daycount, _faceamount, _firstcoupondate, _freq, _issue, ACT_360, ACT_365, Annual, Bimonthly, Day30_360, Day30_365, Date::dayOfMonth(), EveryFourthMonth, getCashflow(), cashflow::getCashflows(), cashflow::getDates(), Date::month(), Monthly, Natural, NoFrequency, Once, Quarterly, quotedPrice(), Real, Semiannual, Date::serialNumber(), TN_REAL, and Date::year().

Referenced by inputBond(), mainbond(), riskybond::rho(), and treasurybond::rho().

cashflow bond::getCashflow  ) 
 

Definition at line 31 of file bond.cpp.

References _coupon, _daycount, _faceamount, _firstcoupondate, _freq, Annual, Date::applyConvention(), Bimonthly, Date::dayCount(), EveryFourthMonth, Following, Integer, Monthly, Natural, NoFrequency, Once, Date::plusMonths(), Quarterly, Real, and Semiannual.

Referenced by convexity(), duration(), fairvalue(), riskybond::quotedPrice(), quotedPrice(), and yieldToMaturity().

virtual Real bond::getFaceAmount  )  const [inline, virtual]
 

Definition at line 75 of file bond.h.

References _faceamount, and Real.

Referenced by convertiblebond::adjustedConversionRatio(), and convertiblebond::fairvalue().

virtual Date bond::getIssue  )  [inline, virtual]
 

Definition at line 72 of file bond.h.

References _issue.

virtual Date bond::getMaturity  )  [inline, virtual]
 

Definition at line 71 of file bond.h.

virtual Real bond::getMaturityInYears Date  today  )  [inline, virtual]
 

Definition at line 74 of file bond.h.

References Date::dayCount(), and Real.

virtual Real bond::getMaturityInYears  )  [inline, virtual]
 

Definition at line 73 of file bond.h.

References _issue, and Real.

Referenced by convertiblebond::fairvalue().

virtual Real bond::quotedPrice  )  [inline, virtual]
 

Definition at line 65 of file bond.h.

References _issue, and Real.

Referenced by fairvalue().

Real bond::quotedPrice Date  today  )  [virtual]
 

Reimplemented in riskybond.

Definition at line 200 of file bond.cpp.

References _daycount, Date::dayCount(), yieldCurve::discountFactor(), getCashflow(), cashflow::getCashflows(), cashflow::getDates(), Natural, and Real.

virtual Real bond::yieldToMaturity  )  [inline, virtual]
 

Definition at line 67 of file bond.h.

References _issue, and Real.

Referenced by convexity(), and duration().

Real bond::yieldToMaturity Date  today  )  [virtual]
 

Definition at line 276 of file bond.cpp.

References _daycount, Date::dayCount(), fairvalue(), getCashflow(), cashflow::getCashflows(), cashflow::getDates(), Natural, and Real.

Referenced by inputBond(), and mainbond().


Member Data Documentation

Real bond::_coupon [protected]
 

Definition at line 35 of file bond.h.

Referenced by fairvalue(), and getCashflow().

DayCountConvention bond::_daycount [protected]
 

Definition at line 40 of file bond.h.

Referenced by convexity(), duration(), fairvalue(), getCashflow(), quotedPrice(), and yieldToMaturity().

Real bond::_faceamount [protected]
 

Definition at line 37 of file bond.h.

Referenced by fairvalue(), getCashflow(), getFaceAmount(), and operator<<().

Date bond::_firstcoupondate [protected]
 

Definition at line 34 of file bond.h.

Referenced by fairvalue(), and getCashflow().

Frequency bond::_freq [protected]
 

Definition at line 36 of file bond.h.

Referenced by fairvalue(), and getCashflow().

Date bond::_issue [protected]
 

Definition at line 32 of file bond.h.

Referenced by convexity(), duration(), fairvalue(), getIssue(), getMaturityInYears(), operator<<(), quotedPrice(), and yieldToMaturity().

Date bond::_maturity [protected]
 

Definition at line 33 of file bond.h.

Referenced by operator<<().

yieldCurve bond::_yc [protected]
 

Definition at line 38 of file bond.h.


The documentation for this class was generated from the following files:
Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:39 2005 for terreneuve by doxygen 1.3.6