#include <binomialTree.h>
Public Member Functions | |
binomialTree (void) | |
default constructor | |
binomialTree (Real So, Real r, Real sigma, Real T, Natural n) | |
Constructor. | |
binomialTree (Real So, Real r, Real sigma, Real T, Natural n, Real u, Real d) | |
binomialTree (const asset &theAsset, yieldCurve &yc, Real T, Natural n) | |
binomialTree (const binomialTree &rhs) | |
binomialTree & | operator= (const binomialTree &rhs) |
virtual | ~binomialTree (void) |
const valarray< Real > * | getStockProcess (Natural step) |
const valarray< Real > * | getClaimProcess (Natural step) |
Real | getPrice () |
void | runEngineConvertibleBond (PayOff thePayoff, Real ConversionRatio, Real CallPrice, Real PutPrice) |
void | runEngineCall (PayOff thePayoff) |
Protected Member Functions | |
Real | getSo () const |
Real | getRate (Natural timestep) const |
Real | getSigma () const |
Real | getMaturity () const |
Natural | getSteps () const |
void | constructStockProcess () |
void | setClaimVariables (Real constantRate) |
void | setClaimVariables (yieldCurve &yc) |
Private Member Functions | |
void | copyObj (const binomialTree &rhs) |
Private Attributes | |
Real | _So |
Real | _sigma |
Real | _maturity |
Natural | _n |
Real | _dt |
Real | _u |
Real | _d |
valarray< valarray< Real > > | _stockProcess |
valarray< valarray< Real > > | _claimProcess |
valarray< Real > | _discountFactor |
valarray< Real > | _q |
risk neutral probability of an up move | |
Friends | |
ostream & | operator<< (ostream &os, const binomialTree &bt) |
ostream & | operator<< (ostream &os, const binomialTree *bt) |
|
default constructor
Definition at line 3 of file binomialTree.cpp. References _d, _dt, _n, _sigma, _u, BT_DEFAULT_MATURITY, BT_DEFAULT_RATE, BT_DEFAULT_SIGMA, BT_DEFAULT_SO, BT_DEFAULT_STEPS, constructStockProcess(), and setClaimVariables(). |
|
Constructor.
Definition at line 20 of file binomialTree.cpp. References _d, _dt, _u, constructStockProcess(), Natural, r, Real, and setClaimVariables(). |
|
Definition at line 56 of file binomialTree.cpp. References _dt, constructStockProcess(), Natural, r, Real, and setClaimVariables(). |
|
Definition at line 38 of file binomialTree.cpp. References _d, _dt, _sigma, _u, constructStockProcess(), Natural, Real, and setClaimVariables(). |
|
Definition at line 91 of file binomialTree.cpp. References copyObj(). |
|
Definition at line 117 of file binomialTree.cpp. |
|
Definition at line 122 of file binomialTree.cpp. References _claimProcess, _d, _n, _So, _stockProcess, _u, and Natural. Referenced by binomialTree(). |
|
Definition at line 102 of file binomialTree.cpp. References _claimProcess, _d, _discountFactor, _dt, _maturity, _n, _q, _sigma, _So, _stockProcess, and _u. Referenced by binomialTree(), and operator=(). |
|
Definition at line 149 of file binomialTree.cpp. References _claimProcess, _n, and Natural. Referenced by convertiblebond::fairvalue(). |
|
Definition at line 61 of file binomialTree.h. References Real. Referenced by operator<<(). |
|
Definition at line 157 of file binomialTree.cpp. References _claimProcess, and _n. Referenced by mainbinomialtree(). |
|
Definition at line 57 of file binomialTree.h. References _discountFactor, _n, Natural, and Real. |
|
Definition at line 60 of file binomialTree.h. Referenced by operator<<(). |
|
Definition at line 56 of file binomialTree.h. Referenced by operator<<(). |
|
Definition at line 62 of file binomialTree.h. Referenced by operator<<(). |
|
Definition at line 141 of file binomialTree.cpp. References _n, _stockProcess, and Natural. Referenced by mainbinomialtree(). |
|
Definition at line 96 of file binomialTree.cpp. References copyObj(). |
|
Definition at line 195 of file binomialTree.cpp. References _claimProcess, _discountFactor, _n, _q, _stockProcess, PayOff::Call(), Integer, and Natural. Referenced by mainbinomialtree(). |
|
Definition at line 214 of file binomialTree.cpp. References _claimProcess, _discountFactor, _n, _q, _stockProcess, PayOff::Convertible(), Integer, Natural, and Real. Referenced by convertiblebond::fairvalue(). |
|
Definition at line 84 of file binomialTree.cpp. References _d, _discountFactor, _dt, _n, _q, _u, yieldCurve::forwardDiscountFactor(), and Natural. |
|
Definition at line 74 of file binomialTree.cpp. References _d, _discountFactor, _dt, _n, _q, _u, Natural, q, and Real. Referenced by binomialTree(). |
|
Definition at line 23 of file binomialTree.h. |
|
Definition at line 162 of file binomialTree.cpp. |
|
Definition at line 77 of file binomialTree.h. Referenced by constructStockProcess(), copyObj(), getClaimProcess(), getPrice(), operator<<(), runEngineCall(), and runEngineConvertibleBond(). |
|
Definition at line 73 of file binomialTree.h. Referenced by binomialTree(), constructStockProcess(), copyObj(), operator<<(), and setClaimVariables(). |
|
Definition at line 79 of file binomialTree.h. Referenced by copyObj(), getRate(), operator<<(), runEngineCall(), runEngineConvertibleBond(), and setClaimVariables(). |
|
Definition at line 71 of file binomialTree.h. Referenced by binomialTree(), copyObj(), and setClaimVariables(). |
|
Definition at line 69 of file binomialTree.h. Referenced by copyObj(). |
|
Definition at line 70 of file binomialTree.h. Referenced by binomialTree(), constructStockProcess(), copyObj(), getClaimProcess(), getPrice(), getRate(), getSteps(), getStockProcess(), operator<<(), runEngineCall(), runEngineConvertibleBond(), and setClaimVariables(). |
|
risk neutral probability of an up move
Definition at line 82 of file binomialTree.h. Referenced by copyObj(), operator<<(), runEngineCall(), runEngineConvertibleBond(), and setClaimVariables(). |
|
Definition at line 68 of file binomialTree.h. Referenced by binomialTree(), copyObj(), and getSigma(). |
|
Definition at line 67 of file binomialTree.h. Referenced by constructStockProcess(), copyObj(), and getSo(). |
|
Definition at line 75 of file binomialTree.h. Referenced by constructStockProcess(), copyObj(), getStockProcess(), operator<<(), runEngineCall(), and runEngineConvertibleBond(). |
|
Definition at line 72 of file binomialTree.h. Referenced by binomialTree(), constructStockProcess(), copyObj(), operator<<(), and setClaimVariables(). |