#include <asset.h>
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< flowSchedule > | getFlowSchedule () |
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 |
|
default contructor
Definition at line 32 of file asset.cpp. References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _denomCur, _dividendGrowingRate, _volatility, ASSET_DEFAULT_VOL, and USD. |
|
contructor
Definition at line 43 of file asset.cpp. References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _denomCur, _dividendGrowingRate, _volatility, and Real. |
|
Definition at line 54 of file asset.cpp. References _announcedDividendFlows, _areDividendsAsGrowingRate, _currentPrice, _denomCur, _dividendGrowingRate, _volatility, Real, and USD. |
|
|
|
gets the yc
Definition at line 112 of file asset.h. References _areDividendsAsGrowingRate. |
|
get the forward price
Definition at line 78 of file asset.cpp. References forwardPrice(), Natural, Date::plusDays(), Real, and Date::setDateToToday(). |
|
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(). |
|
gets the currency
|
|
a stock is delta 1!
Definition at line 82 of file asset.h. References Real. |
|
gets the div future flow schedule
Definition at line 118 of file asset.h. References _announcedDividendFlows. |
|
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(). |
|
gets the div rate
Definition at line 115 of file asset.h. References _dividendGrowingRate, and Real. |
|
Rho vs fwd.
Definition at line 67 of file asset.cpp. References forwardPrice(), Real, and yieldCurve::shiftZCBRateCurve(). |
|
gets the volatility
Definition at line 124 of file asset.h. References _volatility, and Real. Referenced by convertiblebond::delta(), convertiblebond::gamma(), and operator<<(). |
|
gets the spot price
|
|
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. |
|
sets the currency
Definition at line 100 of file asset.h. References _denomCur. |
|
sets the div rate
Definition at line 84 of file asset.cpp. References _areDividendsAsGrowingRate, _dividendGrowingRate, and Real. |
|
sets the flow schedule
Definition at line 97 of file asset.h. References _announcedDividendFlows. |
|
sets the spot price
Definition at line 88 of file asset.h. References _currentPrice, and Real. Referenced by mainconvertiblebond(). |
|
sets the volatility
Definition at line 103 of file asset.h. References _volatility, and Real. |
|
sets the yc
|
|
Definition at line 61 of file asset.h. Referenced by asset(), forwardPrice(), getFlowSchedule(), and setDivFlows(). |
|
Definition at line 59 of file asset.h. Referenced by areDivAsRate(), asset(), forwardPrice(), and setDivAsRate(). |
|
Definition at line 57 of file asset.h. Referenced by asset(), forwardPrice(), getPrice(), Price(), and setPrice(). |
|
Definition at line 62 of file asset.h. Referenced by asset(), GetCurrencyFormat(), and setCcy(). |
|
Definition at line 60 of file asset.h. Referenced by asset(), forwardPrice(), getRate(), and setDivAsRate(). |
|
Definition at line 63 of file asset.h. Referenced by asset(), GetVolatility(), and setVolatility(). |
|
|