#include <string>
#include "../PartB/yieldCurve.h"
#include "../PartE/volsurface.h"
Go to the source code of this file.
Functions | |
bool | maindate (void) |
test the date class | |
bool | mainmontecarlo (void) |
test the montecarlo option pricer functionality | |
double | mainmc (double Expiry, double Strike, double Spot, volsurface *Vol, yieldCurve *r, unsigned long nPaths, unsigned long nDates, int PrdName) |
main routine which runs the montecarlo pricer | |
bool | mainoption (void) |
test the BS option pricing functionality | |
bool | mainoptionstrategy (void) |
test the option strategy functionality | |
bool | mainmatrix (void) |
test the matrix functions | |
bool | maininterpolator (void) |
test the 2d/3d interpolator functionality | |
bool | mainyieldcurve (void) |
test the yield curve functionality | |
bool | mainasset (void) |
test the asset functionality | |
bool | mainfilereader (void) |
test the file reader functionality | |
bool | fr_basic (void) |
file reader basic test | |
bool | mainvolsurface (void) |
test the volsurface functionality | |
bool | maincreditcurve (void) |
test of the credit curve object | |
bool | mainrainbowoptions (void) |
test of the credit curve object | |
bool | mainbond (void) |
test the bond functionality | |
bool | mainvarianceswap (void) |
test of the variance swaps object | |
bool | mainbinomialtree (void) |
test of the binomial tree object | |
bool | mainconvertiblebond (void) |
test of the convertible bond object | |
bool | mainIRVanillaSwap (void) |
Test of the Vanilla Swap - Yann. |
|
file reader basic test
Definition at line 53 of file mainfilereader.cpp. References FileReader::fileexists(), and FileReader::getdatadirasstring(). Referenced by mainfilereader(). |
|
test the asset functionality
Definition at line 14 of file maintestasset.cpp. References a, FileReader::buildYieldPointArray(), EUR, asset::forwardPrice(), FileReader::getdatadirasstring(), Natural, Date::plusDays(), Date::plusMonths(), Date::plusYears(), Real, Date::setDateToToday(), and Date::toString(). Referenced by maintests(). |
|
test of the binomial tree object
Definition at line 7 of file mainbinomialtree.cpp. References Call, binomialTree::getPrice(), BlackScholes::getPrice(), binomialTree::getStockProcess(), LongNatural, mainmc(), Natural, r, Real, realsEqual(), and binomialTree::runEngineCall(). Referenced by maintests(). |
|
test the bond functionality
Definition at line 12 of file mainbond.cpp. References ACT_365, bond::convexity(), DayCountConvention, bond::duration(), bond::fairvalue(), Frequency, May, November, Real, Semiannual, and bond::yieldToMaturity(). Referenced by maintests(). |
|
test of the convertible bond object
Definition at line 5 of file mainconvertiblebond.cpp. References ACT_365, Days, convertiblebond::fairvalue(), Months, Natural, convertiblebond::parityDelta(), convertiblebond::parityGamma(), Date::plus(), Real, realsEqual(), convertiblebond::rho(), Date::setDateToToday(), and asset::setPrice(). Referenced by maintests(). |
|
test of the credit curve object
Definition at line 9 of file maincreditcurves.cpp. References FileReader::buildCreditSpreadPointArray(), FileReader::buildYieldPointArray(), creditCurve::creditSpread(), creditCurve::cumulativeDefaultProbability(), creditCurve::defaultProbability(), FileReader::getdatadirasstring(), creditCurve::hazardRate(), Natural, Real, creditCurve::riskyDiscountFactor(), and creditCurve::survivalProbability(). Referenced by maintests(). |
|
test the date class
Definition at line 7 of file maindate.cpp. References Date::lastDayOfMonth(), Date::setDateToToday(), and Date::toString(). Referenced by maintests(). |
|
test the file reader functionality
Definition at line 45 of file mainfilereader.cpp. References fr_basic(). Referenced by maintests(). |
|
test the 2d/3d interpolator functionality
Definition at line 5 of file maininterpolator.cpp. References Integer, interpolator::interpolate(), and Real. Referenced by maintests(). |
|
Test of the Vanilla Swap - Yann.
Definition at line 9 of file mainIRVanillaSwap.cpp. References FileReader::buildYieldPointArray(), FileReader::getdatadirasstring(), CashFlow::getFairValue(), Date::plusMonths(), Date::plusYears(), Real, VanillaSwap::returnPrice(), and Date::setDateToToday(). Referenced by maintests(). |
|
test the matrix functions
Definition at line 16 of file mainmatrix.cpp. References Matrix::CholeskyDecomposition(), Matrix::GetTransposed(), Natural, Matrix::SetValue(), transform1DvalarrayToColumnMatrix(), transform2DvalarrayToMatrix(), transformColumnMatrixTo1Dvalarray(), and transformMatrixTo2Dvalarray(). Referenced by maintests(). |
|
main routine which runs the montecarlo pricer
|
|
test the montecarlo option pricer functionality
Definition at line 19 of file mainmontecarlo.cpp. References LongNatural, mainmc(), and Real. Referenced by maintests(). |
|
test the BS option pricing functionality
Definition at line 5 of file mainoptionstrategy.cpp. References Call, BlackScholes::getDelta(), BlackScholes::getGamma(), BlackScholes::getPrice(), BlackScholes::getRho(), BlackScholes::getTheta(), BlackScholes::getVega(), BlackScholes::getVolatility(), and LongNatural. Referenced by maintests(). |
|
test the option strategy functionality
Definition at line 26 of file mainoptionstrategy.cpp. References OptionStrategy::addLongButterflySpread(), OptionStrategy::getGlobalDelta(), and OptionStrategy::returnPrice(). Referenced by maintests(). |
|
test of the credit curve object
* Types (MonteCarlo, ClosedForm ) Definition at line 13 of file mainrainbowoptions.cpp. References AssetsBasketMax, BestOf2AssetsCash, BetterOf2Assets, ClosedForm, RainbowOption::getCorrelRisk(), RainbowOption::getPartialDelta(), RainbowOption::getPartialGamma(), RainbowOption::getPartialVega(), RainbowOption::getPrice(), RainbowOption::getRho(), Max2AssetsCall, Max2AssetsPut, Min2AssetsCall, Min2AssetsPut, MonteCarlo, Real, Date::setDateToToday(), RainbowOption::setRainbowType(), SpreadOptionMax, WorseOf2Assets, and WorstOf2AssetsCash. Referenced by maintests(). |
|
test of the variance swaps object
Definition at line 9 of file mainvarianceswap.cpp. References OptionStrategy::addLongButterflySpread(), OptionStrategy::addOneBlackScholesObject(), Call, VarianceSwap::getPrice(), Natural, Put, and Real. Referenced by maintests(). |
|
test the volsurface functionality
Definition at line 12 of file mainvolsurface.cpp. References FileReader::buildVolSurfaceParams(), December, July, March, Real, September, volsurface::setvolsurface(), Date::toString(), and volsurface::volatility(). Referenced by maintests(). |
|
test the yield curve functionality
Definition at line 13 of file mainyieldcurves.cpp. References FileReader::buildYieldPointArray(), Continuous, Discrete, FileReader::getdatadirasstring(), yieldCurve::getMaturitiesInTheZCBCurve(), Month, Natural, Date::plusMonths(), Real, yieldCurve::rotateZCBRateCurve(), Date::setDateToToday(), yieldCurve::shiftZCBRateCurve(), and yieldCurve::spotRate(). Referenced by maintests(). |