#include <volsurface.h>
Public Member Functions | |
volsurface (Real stockPrice, Date today, valarray< Real > strikes, valarray< Date > maturities, yieldCurve yCurve, valarray< valarray< Real > > callputprices, valarray< valarray< bool > > iscallputprices) | |
Constructor. | |
volsurface (Real stockPrice, Date today, yieldCurve yCurve, volsurfaceparams ¶ms) | |
Constructor. | |
volsurface (valarray< valarray< Real > > volsurf) | |
Constructor. | |
volsurface (Real constantvol) | |
Default Constructor. | |
volsurface (void) | |
Default Constructor. | |
~volsurface (void) | |
Destructor. | |
Real | invertBSformula (Real r, Real maturity, Real stockPrice, Real strike, Real callputPrice, bool isacall) |
Real | volatility (Real K, Date T) |
Real | variance (Real K, Date T) |
Real | forwardVolatility (Real K, Date t, Date T) |
void | setvolsurface () |
valarray< valarray< Real > > | getvolsurface () |
volsurface | forwardvolsurface (Date t) |
Implied volatility surface seen at time t. | |
volsurface | shiftedYCvolsurface (Real shift) |
Implied volatility surface when the yield curve is shifted. | |
volsurface | shiftedvolsurface (Real shift) |
Shift the implied volatility surface. | |
Private Attributes | |
Real | _stockPrice |
Date | _today |
valarray< Real > | _strikes |
valarray< Date > | _maturities |
yieldCurve | _yieldCurve |
valarray< valarray< Real > > | _callputprices |
valarray< valarray< bool > > | _iscallputprices |
valarray< valarray< Real > > | _impliedvolsurface |
interpolator | _interpolvolsurf |
bool | _volsurfconst |
Real | _constantvol |
|
Constructor.
Definition at line 7 of file volsurface.cpp. References Real. |
|
Constructor.
Definition at line 19 of file volsurface.cpp. References Real. |
|
Constructor.
Definition at line 44 of file volsurface.cpp. |
|
Default Constructor.
Definition at line 32 of file volsurface.cpp. References Real. |
|
Default Constructor.
Definition at line 38 of file volsurface.cpp. |
|
Destructor.
Definition at line 50 of file volsurface.cpp. |
|
Definition at line 139 of file volsurface.cpp. References _today, Date::dayCount(), Real, and variance(). Referenced by Drift::Drift(), and forwardvolsurface(). |
|
Implied volatility surface seen at time t.
Definition at line 148 of file volsurface.cpp. References _impliedvolsurface, _maturities, _strikes, forwardVolatility(), Integer, M, and N. Referenced by Exotics::getTheta(). |
|
Definition at line 118 of file volsurface.cpp. References _impliedvolsurface. |
|
Definition at line 55 of file volsurface.cpp. References Call, BlackScholes::getVolatility(), Put, r, and Real. Referenced by setvolsurface(). |
|
Definition at line 68 of file volsurface.cpp. References _callputprices, _constantvol, _impliedvolsurface, _interpolvolsurf, _iscallputprices, _maturities, _stockPrice, _strikes, _today, _volsurfconst, _yieldCurve, Date::dayCount(), invertBSformula(), N, r, Real, and yieldCurve::spotRate(). Referenced by importData::importVolSurface(), mainvolsurface(), and shiftedYCvolsurface(). |
|
Shift the implied volatility surface.
Definition at line 194 of file volsurface.cpp. References _impliedvolsurface, _maturities, _strikes, Integer, M, N, and Real. Referenced by Exotics::getVega(). |
|
Implied volatility surface when the yield curve is shifted.
Definition at line 185 of file volsurface.cpp. References _callputprices, _iscallputprices, _maturities, _stockPrice, _strikes, _today, _yieldCurve, Real, setvolsurface(), and yieldCurve::shiftZCBRateCurve(). |
|
Definition at line 131 of file volsurface.cpp. References _constantvol, _volsurfconst, Real, and volatility(). Referenced by forwardVolatility(). |
|
Definition at line 122 of file volsurface.cpp. References _constantvol, _interpolvolsurf, _today, _volsurfconst, Date::dayCount(), interpolator::interpolate(), and Real. Referenced by GaussianProcess::BuildPath(), inputBSOption(), inputButterflySpread(), inputCallSpread(), inputPutSpread(), inputRatioCallSpread(), inputStraddle(), inputStrangle(), mainvolsurface(), and variance(). |
|
Definition at line 35 of file volsurface.h. Referenced by setvolsurface(), and shiftedYCvolsurface(). |
|
Definition at line 40 of file volsurface.h. Referenced by setvolsurface(), variance(), and volatility(). |
|
Definition at line 37 of file volsurface.h. Referenced by forwardvolsurface(), getvolsurface(), setvolsurface(), and shiftedvolsurface(). |
|
Definition at line 38 of file volsurface.h. Referenced by setvolsurface(), and volatility(). |
|
Definition at line 36 of file volsurface.h. Referenced by setvolsurface(), and shiftedYCvolsurface(). |
|
Definition at line 33 of file volsurface.h. Referenced by forwardvolsurface(), setvolsurface(), shiftedvolsurface(), and shiftedYCvolsurface(). |
|
Definition at line 30 of file volsurface.h. Referenced by setvolsurface(), and shiftedYCvolsurface(). |
|
Definition at line 32 of file volsurface.h. Referenced by forwardvolsurface(), setvolsurface(), shiftedvolsurface(), and shiftedYCvolsurface(). |
|
Definition at line 31 of file volsurface.h. Referenced by forwardVolatility(), setvolsurface(), shiftedYCvolsurface(), and volatility(). |
|
Definition at line 39 of file volsurface.h. Referenced by setvolsurface(), variance(), and volatility(). |
|
Definition at line 34 of file volsurface.h. Referenced by setvolsurface(), and shiftedYCvolsurface(). |