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

asset Class Reference

#include <asset.h>

List of all members.

Public Member Functions

 asset (void)
 default contructor

 asset (Real price, yieldCurve yc, bool areDividendsAsRate=true, Real divRate=0.0, valarray< flowSchedule > flowsc=valarray< flowSchedule >(), Currency ccy=USD, Real volatility=ASSET_DEFAULT_VOL)
 contructor

 asset (Real price, Real volatility=ASSET_DEFAULT_VOL)
Real getDelta ()
 a stock is delta 1!

Real getRho (Real T)
 Rho vs fwd.

void setPrice (Real p)
 sets the spot price

void setYieldCurve (yieldCurve yc)
 sets the yc

void setDivAsRate (Real rate=0.0)
 sets the div rate

void setDivFlows (flowSchedule fc)
 sets the flow schedule

void setCcy (Currency ccy)
 sets the currency

void setVolatility (Real volatility)
 sets the volatility

Real getPrice () const
 gets the spot price

yieldCurve getYieldCurve ()
 gets the spot price

bool areDivAsRate ()
 gets the yc

Real getRate ()
 gets the div rate

valarray< flowSchedulegetFlowSchedule ()
 gets the div future flow schedule

Currency GetCurrencyFormat ()
 gets the currency

Real GetVolatility () const
 gets the volatility

virtual Real Price ()
 If we have an asset model we can inherit from this class and change the method.

Real forwardPrice (Date maturityDate)
 get the forward price

Real forwardPrice (Real T)
 get the forward price

 ~asset (void)

Private Attributes

Real _currentPrice
yieldCurve _yc
bool _areDividendsAsGrowingRate
Real _dividendGrowingRate
valarray< flowSchedule_announcedDividendFlows
Currency _denomCur
Real _volatility


Constructor & Destructor Documentation

asset::asset void   ) 
 

default contructor

Definition at line 32 of file asset.cpp.

References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _denomCur, _dividendGrowingRate, _volatility, ASSET_DEFAULT_VOL, and USD.

asset::asset Real  price,
yieldCurve  yc,
bool  areDividendsAsRate = true,
Real  divRate = 0.0,
valarray< flowSchedule flowsc = valarray< flowSchedule >(),
Currency  ccy = USD,
Real  volatility = ASSET_DEFAULT_VOL
 

contructor

Parameters:
price : current price of the asset
yc : mkt yc
areDividendsAsRate : tells u if divs are a future schedule (usually useless) or a fixed rate
divrate: so called fixed future div rate
flowsc : anticipated future div flows
CCY : currency denomination
volatility : stock's volatility (should be a volsurface but this is a simplification)

Definition at line 43 of file asset.cpp.

References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _denomCur, _dividendGrowingRate, _volatility, and Real.

asset::asset Real  price,
Real  volatility = ASSET_DEFAULT_VOL
 

Definition at line 54 of file asset.cpp.

References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _denomCur, _dividendGrowingRate, _volatility, Real, and USD.

asset::~asset void   ) 
 

Definition at line 115 of file asset.cpp.


Member Function Documentation

bool asset::areDivAsRate  )  [inline]
 

gets the yc

Definition at line 112 of file asset.h.

References _areDividendsAsGrowingRate.

Real asset::forwardPrice Real  T  ) 
 

get the forward price

Definition at line 78 of file asset.cpp.

References forwardPrice(), Natural, Date::plusDays(), Real, and Date::setDateToToday().

Real asset::forwardPrice Date  maturityDate  ) 
 

get the forward price

Definition at line 97 of file asset.cpp.

References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _dividendGrowingRate, Day30_360, Date::dayCount(), yieldCurve::discountFactor(), Natural, Real, and Date::setDateToToday().

Referenced by forwardPrice(), getRho(), and mainasset().

Currency asset::GetCurrencyFormat  )  [inline]
 

gets the currency

Definition at line 121 of file asset.h.

References _denomCur, and Currency.

Real asset::getDelta  )  [inline]
 

a stock is delta 1!

Definition at line 82 of file asset.h.

References Real.

valarray<flowSchedule> asset::getFlowSchedule  )  [inline]
 

gets the div future flow schedule

Definition at line 118 of file asset.h.

References _announcedDividendFlows.

Real asset::getPrice  )  const [inline]
 

gets the spot price

Definition at line 106 of file asset.h.

References _currentPrice, and Real.

Referenced by convertiblebond::delta(), convertiblebond::gamma(), operator<<(), and convertiblebond::parity().

Real asset::getRate  )  [inline]
 

gets the div rate

Definition at line 115 of file asset.h.

References _dividendGrowingRate, and Real.

Real asset::getRho Real  T  ) 
 

Rho vs fwd.

Definition at line 67 of file asset.cpp.

References forwardPrice(), Real, and yieldCurve::shiftZCBRateCurve().

Real asset::GetVolatility  )  const [inline]
 

gets the volatility

Definition at line 124 of file asset.h.

References _volatility, and Real.

Referenced by convertiblebond::delta(), convertiblebond::gamma(), and operator<<().

yieldCurve asset::getYieldCurve  )  [inline]
 

gets the spot price

Definition at line 109 of file asset.h.

Real asset::Price  )  [virtual]
 

If we have an asset model we can inherit from this class and change the method.

Definition at line 90 of file asset.cpp.

References _currentPrice, and Real.

void asset::setCcy Currency  ccy  )  [inline]
 

sets the currency

Definition at line 100 of file asset.h.

References _denomCur.

void asset::setDivAsRate Real  rate = 0.0  ) 
 

sets the div rate

Definition at line 84 of file asset.cpp.

References _areDividendsAsGrowingRate, _dividendGrowingRate, and Real.

void asset::setDivFlows flowSchedule  fc  )  [inline]
 

sets the flow schedule

Definition at line 97 of file asset.h.

References _announcedDividendFlows.

void asset::setPrice Real  p  )  [inline]
 

sets the spot price

Definition at line 88 of file asset.h.

References _currentPrice, and Real.

Referenced by mainconvertiblebond().

void asset::setVolatility Real  volatility  )  [inline]
 

sets the volatility

Definition at line 103 of file asset.h.

References _volatility, and Real.

void asset::setYieldCurve yieldCurve  yc  )  [inline]
 

sets the yc

Definition at line 91 of file asset.h.


Member Data Documentation

valarray<flowSchedule> asset::_announcedDividendFlows [private]
 

Definition at line 61 of file asset.h.

Referenced by asset(), forwardPrice(), getFlowSchedule(), and setDivFlows().

bool asset::_areDividendsAsGrowingRate [private]
 

Definition at line 59 of file asset.h.

Referenced by areDivAsRate(), asset(), forwardPrice(), and setDivAsRate().

Real asset::_currentPrice [private]
 

Definition at line 57 of file asset.h.

Referenced by asset(), forwardPrice(), getPrice(), Price(), and setPrice().

Currency asset::_denomCur [private]
 

Definition at line 62 of file asset.h.

Referenced by asset(), GetCurrencyFormat(), and setCcy().

Real asset::_dividendGrowingRate [private]
 

Definition at line 60 of file asset.h.

Referenced by asset(), forwardPrice(), getRate(), and setDivAsRate().

Real asset::_volatility [private]
 

Definition at line 63 of file asset.h.

Referenced by asset(), GetVolatility(), and setVolatility().

yieldCurve asset::_yc [private]
 

Definition at line 58 of file asset.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:38 2005 for terreneuve by doxygen 1.3.6