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

convertiblebond Class Reference

#include <convertiblebond.h>

Inheritance diagram for convertiblebond:

riskybond bond List of all members.

Public Member Functions

 convertiblebond (asset Stock, riskybond Bond, Real conversionRatio=CB_DEFAULT_RATIO, Natural nSteps=CB_DEFAULT_STEPS, Real callPrice=CB_DEFAULT_CALLPRICE, Real putPrice=CB_DEFAULT_PUTPRICE)
 Constructor.

virtual ~convertiblebond (void)
virtual Real fairvalue (Date today)
virtual Real fairvalue ()
Real adjustedConversionRatio () const
Real parity (void) const
Real delta (void) const
Real delta (Date today) const
Real parityDelta (void) const
Real parityDelta (Date today) const
convertiblebond shiftedcbond (Real shift)
Real rho (Date today)
 return the derivative of the bond price with respect to interest rates

Real rho ()
Real interestRateDelta (void) const
Real interestRateDelta (Date today) const
Real gamma (void) const
Real gamma (Date today) const
Real parityGamma (void) const
Real parityGamma (Date today) const
Natural getSteps (void) const

Protected Attributes

binomialTree_bt
bool _btCached

Private Member Functions

void copyObj (const convertiblebond &rhs)

Private Attributes

asset _stock
riskybond _bond
Natural _n
Real _callPrice
Real _putPrice
Real _conversionRatio
Real _price
bool _priceCached
Date _datepriceCached
Real _delta
bool _deltaCached
Date _datedeltaCached
Real _interestRateDelta
bool _interestRateDeltaCached
Date _dateinterestRateDeltaCached
Real _gamma
bool _gammaCached
Date _dategammaCached

Friends

ostream & operator<< (ostream &os, convertiblebond &cb)
ostream & operator<< (ostream &os, convertiblebond *cb)

Constructor & Destructor Documentation

convertiblebond::convertiblebond asset  Stock,
riskybond  Bond,
Real  conversionRatio = CB_DEFAULT_RATIO,
Natural  nSteps = CB_DEFAULT_STEPS,
Real  callPrice = CB_DEFAULT_CALLPRICE,
Real  putPrice = CB_DEFAULT_PUTPRICE
 

Constructor.

Definition at line 5 of file convertiblebond.cpp.

References _btCached, _deltaCached, _gammaCached, _interestRateDeltaCached, _priceCached, Natural, and Real.

Referenced by delta(), gamma(), and shiftedcbond().

convertiblebond::~convertiblebond void   )  [virtual]
 

Definition at line 29 of file convertiblebond.cpp.


Member Function Documentation

Real convertiblebond::adjustedConversionRatio  )  const [inline]
 

Definition at line 52 of file convertiblebond.h.

References _conversionRatio, bond::getFaceAmount(), and Real.

Referenced by parityDelta(), and parityGamma().

void convertiblebond::copyObj const convertiblebond rhs  )  [private]
 

Real convertiblebond::delta Date  today  )  const
 

Definition at line 65 of file convertiblebond.cpp.

References _bond, _callPrice, _conversionRatio, _datedeltaCached, _delta, _deltaCached, _putPrice, _stock, convertiblebond(), fairvalue(), asset::getPrice(), asset::GetVolatility(), and Real.

Real convertiblebond::delta void   )  const [inline]
 

Definition at line 56 of file convertiblebond.h.

References Real.

Referenced by gamma(), operator<<(), and parityDelta().

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

Reimplemented from bond.

Definition at line 50 of file convertiblebond.h.

References Real.

Real convertiblebond::fairvalue Date  today  )  [virtual]
 

Reimplemented from bond.

Definition at line 33 of file convertiblebond.cpp.

References _bt, _btCached, _callPrice, _conversionRatio, _datepriceCached, _priceCached, _putPrice, _stock, binomialTree::getClaimProcess(), bond::getFaceAmount(), bond::getMaturityInYears(), and binomialTree::runEngineConvertibleBond().

Referenced by delta(), interestRateDelta(), mainconvertiblebond(), and operator<<().

Real convertiblebond::gamma Date  today  )  const
 

Definition at line 123 of file convertiblebond.cpp.

References _bond, _callPrice, _conversionRatio, _dategammaCached, _gamma, _gammaCached, _putPrice, _stock, convertiblebond(), delta(), asset::getPrice(), asset::GetVolatility(), and Real.

Real convertiblebond::gamma void   )  const [inline]
 

Definition at line 65 of file convertiblebond.h.

References Real.

Referenced by operator<<(), and parityGamma().

Natural convertiblebond::getSteps void   )  const [inline]
 

Definition at line 72 of file convertiblebond.h.

References Natural.

Real convertiblebond::interestRateDelta Date  today  )  const
 

Definition at line 107 of file convertiblebond.cpp.

References _dateinterestRateDeltaCached, _interestRateDelta, _interestRateDeltaCached, and fairvalue().

Real convertiblebond::interestRateDelta void   )  const [inline]
 

Definition at line 63 of file convertiblebond.h.

References Real.

Referenced by operator<<(), and rho().

Real convertiblebond::parity void   )  const [inline]
 

Definition at line 55 of file convertiblebond.h.

References _conversionRatio, _stock, asset::getPrice(), and Real.

Real convertiblebond::parityDelta Date  today  )  const [inline]
 

Definition at line 59 of file convertiblebond.h.

References adjustedConversionRatio(), delta(), and Real.

Real convertiblebond::parityDelta void   )  const [inline]
 

Definition at line 58 of file convertiblebond.h.

References Real.

Referenced by mainconvertiblebond(), and operator<<().

Real convertiblebond::parityGamma Date  today  )  const [inline]
 

Definition at line 68 of file convertiblebond.h.

References adjustedConversionRatio(), gamma(), and Real.

Real convertiblebond::parityGamma void   )  const [inline]
 

Definition at line 67 of file convertiblebond.h.

References Real.

Referenced by mainconvertiblebond(), and operator<<().

Real convertiblebond::rho  )  [inline, virtual]
 

Reimplemented from riskybond.

Definition at line 62 of file convertiblebond.h.

References Real.

Real convertiblebond::rho Date  today  )  [inline, virtual]
 

return the derivative of the bond price with respect to interest rates

Reimplemented from riskybond.

Definition at line 61 of file convertiblebond.h.

References interestRateDelta(), and Real.

Referenced by mainconvertiblebond().

convertiblebond convertiblebond::shiftedcbond Real  shift  ) 
 

Definition at line 99 of file convertiblebond.cpp.

References _bond, _callPrice, _conversionRatio, _putPrice, _stock, convertiblebond(), Real, riskybond::shiftedbond(), and shiftedcbond().

Referenced by shiftedcbond().


Friends And Related Function Documentation

ostream& operator<< ostream &  os,
convertiblebond cb
[friend]
 

Definition at line 35 of file convertiblebond.h.

ostream& operator<< ostream &  os,
convertiblebond cb
[friend]
 

Definition at line 156 of file convertiblebond.cpp.


Member Data Documentation

riskybond convertiblebond::_bond [private]
 

Definition at line 80 of file convertiblebond.h.

Referenced by delta(), gamma(), and shiftedcbond().

binomialTree* convertiblebond::_bt [mutable, protected]
 

Definition at line 75 of file convertiblebond.h.

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

bool convertiblebond::_btCached [mutable, protected]
 

Definition at line 76 of file convertiblebond.h.

Referenced by convertiblebond(), fairvalue(), and operator<<().

Real convertiblebond::_callPrice [private]
 

Definition at line 83 of file convertiblebond.h.

Referenced by delta(), fairvalue(), gamma(), operator<<(), and shiftedcbond().

Real convertiblebond::_conversionRatio [private]
 

Definition at line 85 of file convertiblebond.h.

Referenced by adjustedConversionRatio(), delta(), fairvalue(), gamma(), operator<<(), parity(), and shiftedcbond().

Date convertiblebond::_datedeltaCached [mutable, private]
 

Definition at line 94 of file convertiblebond.h.

Referenced by delta().

Date convertiblebond::_dategammaCached [mutable, private]
 

Definition at line 102 of file convertiblebond.h.

Referenced by gamma().

Date convertiblebond::_dateinterestRateDeltaCached [mutable, private]
 

Definition at line 98 of file convertiblebond.h.

Referenced by interestRateDelta().

Date convertiblebond::_datepriceCached [mutable, private]
 

Definition at line 90 of file convertiblebond.h.

Referenced by fairvalue().

Real convertiblebond::_delta [mutable, private]
 

Definition at line 92 of file convertiblebond.h.

Referenced by delta().

bool convertiblebond::_deltaCached [mutable, private]
 

Definition at line 93 of file convertiblebond.h.

Referenced by convertiblebond(), and delta().

Real convertiblebond::_gamma [mutable, private]
 

Definition at line 100 of file convertiblebond.h.

Referenced by gamma().

bool convertiblebond::_gammaCached [mutable, private]
 

Definition at line 101 of file convertiblebond.h.

Referenced by convertiblebond(), and gamma().

Real convertiblebond::_interestRateDelta [mutable, private]
 

Definition at line 96 of file convertiblebond.h.

Referenced by interestRateDelta().

bool convertiblebond::_interestRateDeltaCached [mutable, private]
 

Definition at line 97 of file convertiblebond.h.

Referenced by convertiblebond(), and interestRateDelta().

Natural convertiblebond::_n [private]
 

Definition at line 82 of file convertiblebond.h.

Referenced by operator<<().

Real convertiblebond::_price [mutable, private]
 

Definition at line 88 of file convertiblebond.h.

bool convertiblebond::_priceCached [mutable, private]
 

Definition at line 89 of file convertiblebond.h.

Referenced by convertiblebond(), and fairvalue().

Real convertiblebond::_putPrice [private]
 

Definition at line 84 of file convertiblebond.h.

Referenced by delta(), fairvalue(), gamma(), operator<<(), and shiftedcbond().

asset convertiblebond::_stock [private]
 

Definition at line 79 of file convertiblebond.h.

Referenced by delta(), fairvalue(), gamma(), operator<<(), parity(), and shiftedcbond().


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