Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

productsCreation.h File Reference

#include "../PartB/yieldCurve.h"
#include "../PartE/volsurface.h"
#include "../PartA/BlackScholes/BlackScholes.h"
#include "../PartA/BlackScholes/OptionStrategy.h"
#include "../PartL/Exotics.h"
#include "../PartH/bond.h"
#include "../PartD/VanillaSwap.h"
#include "../PartI/rainbowoption.h"
#include "../PartJ/convertiblebond.h"
#include "./importData.h"
#include <minmax.h>

Go to the source code of this file.

Functions

bool productsCreationMenu (marketData data)
 Menu for this category.

BlackScholesinputBSOption (marketData data)
 User interface to input and store a BS option.

string outputCallPut (char c)
 Transform the input c/C/p/P into "Call" or "Put".

OptionStrategy inputOptionStrategy (marketData data)
 User interface to input and store an option strategy and options in it.

void inputSpecificOptionStrategy (marketData data, OptionStrategy &strategy)
 add something else to the strategy than a Call/Put

void inputButterflySpread (marketData data, OptionStrategy &strategy, bool useMarketData)
 add a butterfly spread to the strategy

void inputCallSpread (marketData data, OptionStrategy &strategy, bool useMarketData)
 add a call spread to the strategy

void inputPutSpread (marketData data, OptionStrategy &strategy, bool useMarketData)
 add a put spread to the strategy

void inputRatioCallSpread (marketData data, OptionStrategy &strategy, bool useMarketData)
 add a ratio call spread to the strategy

void inputStraddle (marketData data, OptionStrategy &strategy, bool useMarketData)
 add a Straddle to the strategy

void inputStrangle (marketData data, OptionStrategy &strategy, bool useMarketData)
 add a strangle to the strategy

ExoticsinputExoticOptionOnSingleAsset (marketData &data)
 User interface to input and store an Exotic Option with a single underlying (MC Price).

exoticsType choiceToType (Natural choice)
 converts the 1 to 9 choice in a Exotics Type

bondinputBond (marketData &data)
 User interface to input a bond.

convertiblebondinputConvertibleBond (marketData &data)
 User interface to input a convertible bond.

VanillaSwapinputVanillaSwap (marketData data)
 User interface to input an interest rate vanilla swap.

priceType choosePricingType (Natural choice)
 For Rainbow options, converts the input into a priceType.

rainbowType chooseRainbowType (Natural choice)
 For Rainbow options, converts the input into a rainbowType.

RainbowOptioninputRainbowOption (marketData data)
 To input a Rainbow Option.


Function Documentation

exoticsType choiceToType Natural  choice  ) 
 

converts the 1 to 9 choice in a Exotics Type

Definition at line 832 of file productsCreation.cpp.

References AsianCall, AsianPut, BarrierCall, BarrierPut, CappedCliquet, CollaredCliquet, exoticsType, FlooredCliquet, Natural, RevLookbackCall, and RevLookbackPut.

Referenced by inputExoticOptionOnSingleAsset().

priceType choosePricingType Natural  choice  ) 
 

For Rainbow options, converts the input into a priceType.

rainbowType chooseRainbowType Natural  choice  ) 
 

For Rainbow options, converts the input into a rainbowType.

bond* inputBond marketData data  ) 
 

User interface to input a bond.

Definition at line 639 of file productsCreation.cpp.

References ACT_360, ACT_365, Annual, Bimonthly, bond::convexity(), marketData::creditcurve, Day30_360, Day30_365, DayCountConvention, bond::duration(), EveryFourthMonth, bond::fairvalue(), Frequency, Integer, Monthly, Natural, NoFrequency, Once, Date::plusDays(), Quarterly, Real, Semiannual, Date::setDateToToday(), marketData::yieldcurve, and bond::yieldToMaturity().

Referenced by productsCreationMenu().

BlackScholes* inputBSOption marketData  data  ) 
 

User interface to input and store a BS option.

Definition at line 52 of file productsCreation.cpp.

References Call, BlackScholes::getDelta(), BlackScholes::getGamma(), BlackScholes::getPrice(), BlackScholes::getRho(), BlackScholes::getTheta(), BlackScholes::getVega(), Integer, Natural, outputCallPut(), Date::plusDays(), Put, Real, Date::setDateToToday(), yieldCurve::spotRate(), TypeOptionBS, volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputOptionStrategy(), and productsCreationMenu().

void inputButterflySpread marketData  data,
OptionStrategy strategy,
bool  useMarketData
 

add a butterfly spread to the strategy

Definition at line 214 of file productsCreation.cpp.

References OptionStrategy::addLongButterflySpread(), Integer, Natural, Date::plusDays(), Real, Date::setDateToToday(), yieldCurve::spotRate(), volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputSpecificOptionStrategy().

void inputCallSpread marketData  data,
OptionStrategy strategy,
bool  useMarketData
 

add a call spread to the strategy

Definition at line 263 of file productsCreation.cpp.

References OptionStrategy::addLongCallSpread(), Integer, Date::plusDays(), Real, Date::setDateToToday(), yieldCurve::spotRate(), volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputSpecificOptionStrategy().

convertiblebond* inputConvertibleBond marketData data  ) 
 

User interface to input a convertible bond.

Definition at line 533 of file productsCreation.cpp.

References ACT_365, marketData::creditcurve, Integer, Natural, Date::plusDays(), Real, Date::setDateToToday(), and marketData::yieldcurve.

Referenced by productsCreationMenu().

Exotics* inputExoticOptionOnSingleAsset marketData data  ) 
 

User interface to input and store an Exotic Option with a single underlying (MC Price).

Definition at line 424 of file productsCreation.cpp.

References choiceToType(), CollaredCliquet, exoticsType, importData::getData(), Exotics::getDelta(), Exotics::getPrice(), Exotics::getRho(), Exotics::getTheta(), Exotics::getVega(), LongNatural, Natural, Real, importData::runUserDefinedInterface(), marketData::vols, and marketData::yieldcurve.

Referenced by productsCreationMenu().

OptionStrategy inputOptionStrategy marketData  data  ) 
 

User interface to input and store an option strategy and options in it.

Definition at line 119 of file productsCreation.cpp.

References OptionStrategy::addOneBlackScholesObject(), OptionStrategy::getGlobalDelta(), OptionStrategy::getGlobalGamma(), OptionStrategy::getGlobalRho(), OptionStrategy::getGlobalTheta(), OptionStrategy::getGlobalVega(), inputBSOption(), inputSpecificOptionStrategy(), Natural, Real, and OptionStrategy::returnPrice().

Referenced by productsCreationMenu().

void inputPutSpread marketData  data,
OptionStrategy strategy,
bool  useMarketData
 

add a put spread to the strategy

Definition at line 296 of file productsCreation.cpp.

References OptionStrategy::addLongPutSpread(), Integer, Date::plusDays(), Real, Date::setDateToToday(), yieldCurve::spotRate(), volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputSpecificOptionStrategy().

RainbowOption* inputRainbowOption marketData  data  ) 
 

To input a Rainbow Option.

Definition at line 1039 of file productsCreation.cpp.

References choosePricingType(), chooseRainbowType(), RainbowOption::getCorrelRisk(), RainbowOption::getPartialDelta(), RainbowOption::getPartialGamma(), RainbowOption::getPartialVega(), RainbowOption::getPrice(), RainbowOption::getRho(), Natural, priceType, rainbowType, Real, Date::setDateToToday(), marketData::vols, and marketData::yieldcurve.

Referenced by productsCreationMenu().

void inputRatioCallSpread marketData  data,
OptionStrategy strategy,
bool  useMarketData
 

add a ratio call spread to the strategy

Definition at line 329 of file productsCreation.cpp.

References OptionStrategy::addLongRatioCallSpread(), Integer, Date::plusDays(), Real, Date::setDateToToday(), yieldCurve::spotRate(), volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputSpecificOptionStrategy().

void inputSpecificOptionStrategy marketData  data,
OptionStrategy strategy
 

add something else to the strategy than a Call/Put

Definition at line 169 of file productsCreation.cpp.

References inputButterflySpread(), inputCallSpread(), inputPutSpread(), inputRatioCallSpread(), inputStraddle(), inputStrangle(), and Natural.

Referenced by inputOptionStrategy().

void inputStraddle marketData  data,
OptionStrategy strategy,
bool  useMarketData
 

add a Straddle to the strategy

Definition at line 362 of file productsCreation.cpp.

References OptionStrategy::addLongStraddle(), Integer, Date::plusDays(), Real, Date::setDateToToday(), yieldCurve::spotRate(), volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputSpecificOptionStrategy().

void inputStrangle marketData  data,
OptionStrategy strategy,
bool  useMarketData
 

add a strangle to the strategy

Definition at line 390 of file productsCreation.cpp.

References OptionStrategy::addLongStrangle(), Integer, Date::plusDays(), Real, Date::setDateToToday(), yieldCurve::spotRate(), volsurface::volatility(), marketData::vols, and marketData::yieldcurve.

Referenced by inputSpecificOptionStrategy().

VanillaSwap* inputVanillaSwap marketData  data  ) 
 

User interface to input an interest rate vanilla swap.

Definition at line 866 of file productsCreation.cpp.

References Following, VanillaSwap::getFairValue1(), VanillaSwap::getFairValue2(), VanillaSwap::getRho(), VanillaSwap::getTheta(), Integer, Natural, Date::plusDays(), Real, VanillaSwap::returnPrice(), Date::setDateToToday(), and marketData::yieldcurve.

Referenced by productsCreationMenu().

string outputCallPut char  c  ) 
 

Transform the input c/C/p/P into "Call" or "Put".

Definition at line 108 of file productsCreation.cpp.

Referenced by inputBSOption().

bool productsCreationMenu marketData  data  ) 
 

Menu for this category.

Definition at line 4 of file productsCreation.cpp.

References inputBond(), inputBSOption(), inputConvertibleBond(), inputExoticOptionOnSingleAsset(), inputOptionStrategy(), inputRainbowOption(), inputVanillaSwap(), and Natural.

Referenced by main().


Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:38 2005 for terreneuve by doxygen 1.3.6