#include <BlackScholes.h>
Public Member Functions | |
BlackScholes (Real spot, Real volOrPrice, bool isVol, Real r, Real K, Real T, TypeOptionBS typeOption) | |
Default constructor. | |
BlackScholes () | |
virtual | ~BlackScholes () |
Real | getPrice () |
Return price of the option. | |
Real | getDelta () |
Return the Delta value for the option. | |
Real | getGamma () |
Return the Gamma value for the option. | |
Real | getVega () |
Return the Vega value for the option. | |
Real | getTheta () |
Return the Theta value for the option. | |
Real | getRho () |
Return the Rho value for the option. | |
Real | getVolatility () const |
Return the Volatility for the option. | |
Real | getStrike () const |
Return the strike of the option. | |
Real | getRate () const |
Return the risk free rate at maturity of the option. | |
Real | getSpot () const |
Return the spot of the option. | |
Real | getMaturity () const |
Return the maturity of the option. | |
bool | isCall () const |
Return the type of the option. | |
Protected Member Functions | |
void | changeRate (Real newRate) |
void | changeVol (Real newVol) |
void | changeMaturity (Real newMat) |
void | changeSpot (Real newSpot) |
void | changeStrike (Real newVol) |
Protected Attributes | |
friend | OptionStrategy |
Allow to change rate for testing sensibility. | |
Private Member Functions | |
void | recalcInformation () |
Private Attributes | |
Real | _spot |
Real | _vol |
Real | _r |
Real | _K |
Real | _T |
Real | d1 |
Real | d2 |
Real | _price |
TypeOptionBS | _type |
|
Default constructor.
Definition at line 10 of file BlackScholes.cpp. References _K, _price, _r, _spot, _T, _type, _vol, absolute(), BlackScholes(), d1, d2, getPrice(), getVega(), r, and Real. |
|
Definition at line 43 of file BlackScholes.cpp. Referenced by BlackScholes(). |
|
Definition at line 46 of file BlackScholes.cpp. |
|
Definition at line 154 of file BlackScholes.cpp. References _T, Real, and recalcInformation(). Referenced by OptionStrategy::changeMaturity(). |
|
Definition at line 144 of file BlackScholes.cpp. References _r, Real, and recalcInformation(). Referenced by OptionStrategy::changeRate(). |
|
Definition at line 159 of file BlackScholes.cpp. References _spot, Real, and recalcInformation(). Referenced by OptionStrategy::changeSpot(). |
|
Definition at line 164 of file BlackScholes.cpp. References _K, Real, and recalcInformation(). Referenced by OptionStrategy::changeStrike(). |
|
Definition at line 149 of file BlackScholes.cpp. References _vol, Real, and recalcInformation(). Referenced by OptionStrategy::changeVol(). |
|
Return the Delta value for the option.
Definition at line 50 of file BlackScholes.cpp. References _type, Call, CumulativeNormal(), d1, Put, and Real. Referenced by inputBSOption(), and mainoption(). |
|
Return the Gamma value for the option.
Definition at line 68 of file BlackScholes.cpp. References _spot, _T, _vol, d1, NormalDensity(), and Real. Referenced by inputBSOption(), and mainoption(). |
|
Return the maturity of the option.
Definition at line 136 of file BlackScholes.cpp. Referenced by OptionStrategy::changeMaturity(), and operator<<(). |
|
Return price of the option.
Definition at line 72 of file BlackScholes.h. References _K, _price, _r, _spot, _T, _type, Call, CumulativeNormal(), d1, d2, Put, and Real. Referenced by BlackScholes(), VarianceSwap::getPrice(), inputBSOption(), mainbinomialtree(), mainoption(), RainbowOption::PriceByClosedForm_MinOf2_call(), RainbowOption::PriceByClosedForm_MinOf2_put(), and RainbowOption::PriceByClosedForm_WorseOf2(). |
|
Return the risk free rate at maturity of the option.
Definition at line 128 of file BlackScholes.cpp. Referenced by OptionStrategy::changeRate(), and operator<<(). |
|
Return the Rho value for the option.
Definition at line 102 of file BlackScholes.cpp. References _K, _r, _T, _type, Call, CumulativeNormal(), d2, Put, and Real. Referenced by inputBSOption(), and mainoption(). |
|
Return the spot of the option.
Definition at line 132 of file BlackScholes.cpp. Referenced by OptionStrategy::changeSpot(), and operator<<(). |
|
Return the strike of the option.
Definition at line 124 of file BlackScholes.cpp. Referenced by OptionStrategy::changeStrike(), VarianceSwap::getPrice(), and operator<<(). |
|
Return the Theta value for the option.
Definition at line 84 of file BlackScholes.cpp. References _K, _r, _spot, _T, _type, _vol, Call, CumulativeNormal(), d1, d2, NormalDensity(), Put, and Real. Referenced by inputBSOption(), and mainoption(). |
|
Return the Vega value for the option.
Definition at line 72 of file BlackScholes.cpp. References _spot, _T, d1, NormalDensity(), and Real. Referenced by BlackScholes(), inputBSOption(), and mainoption(). |
|
Return the Volatility for the option.
Definition at line 120 of file BlackScholes.cpp. Referenced by OptionStrategy::changeVol(), volsurface::invertBSformula(), mainoption(), and operator<<(). |
|
Return the type of the option.
Definition at line 140 of file BlackScholes.cpp. Referenced by VarianceSwap::getPrice(), and operator<<(). |
|
Definition at line 169 of file BlackScholes.cpp. References _K, _r, _spot, _T, _vol, d1, and d2. Referenced by changeMaturity(), changeRate(), changeSpot(), changeStrike(), and changeVol(). |
|
Definition at line 66 of file BlackScholes.h. Referenced by BlackScholes(), changeStrike(), getPrice(), getRho(), getStrike(), getTheta(), and recalcInformation(). |
|
Definition at line 68 of file BlackScholes.h. Referenced by BlackScholes(), and getPrice(). |
|
Definition at line 66 of file BlackScholes.h. Referenced by BlackScholes(), changeRate(), getPrice(), getRate(), getRho(), getTheta(), and recalcInformation(). |
|
Definition at line 66 of file BlackScholes.h. Referenced by BlackScholes(), changeSpot(), getGamma(), getPrice(), getSpot(), getTheta(), getVega(), and recalcInformation(). |
|
Definition at line 66 of file BlackScholes.h. Referenced by BlackScholes(), changeMaturity(), getGamma(), getMaturity(), getPrice(), getRho(), getTheta(), getVega(), and recalcInformation(). |
|
Definition at line 69 of file BlackScholes.h. Referenced by BlackScholes(), getDelta(), getPrice(), getRho(), getTheta(), and isCall(). |
|
Definition at line 66 of file BlackScholes.h. Referenced by BlackScholes(), changeVol(), getGamma(), getTheta(), getVolatility(), and recalcInformation(). |
|
Definition at line 67 of file BlackScholes.h. Referenced by BlackScholes(), getDelta(), getGamma(), getPrice(), getTheta(), getVega(), and recalcInformation(). |
|
Definition at line 67 of file BlackScholes.h. Referenced by BlackScholes(), getPrice(), getRho(), getTheta(), and recalcInformation(). |
|
Allow to change rate for testing sensibility.
Definition at line 57 of file BlackScholes.h. |