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

RainbowOption Class Reference

#include <rainbowoption.h>

List of all members.

Public Member Functions

 RainbowOption (void)
 The default constructor will instantiate a rainbow such with : - a non correlated basket - of RO_DEFAULT_NB_ASSETS assets, - equally weighted, and - with RO_DEFAULT_MULTIPLIER.

 RainbowOption (rainbowType type, Date startDate, Real expiry, Real Strike, yieldCurve yc, valarray< volsurface > vols, valarray< Real > spots=valarray< Real >(RO_DEFAULT_STRIKE, RO_DEFAULT_NB_ASSETS), Real Multiplier=RO_DEFAULT_MULTIPLIER, Matrix Correl=IdentityMatrix(RO_DEFAULT_NB_ASSETS), valarray< Real > weights=valarray< Real >(1/(Real) RO_DEFAULT_NB_ASSETS, RO_DEFAULT_NB_ASSETS), bool outputMsgs=false)
 Full general constructor with n assets.

 RainbowOption (rainbowType type, Date start, Real exp, Real Strike, yieldCurve yc, valarray< volsurface > vols, Real Spot1, Real Spot2, Real Mult=RO_DEFAULT_MULTIPLIER, Real Correl12=0, Real weight1=0.5, Real weight2=0.5, bool outputMsgs=false)
 For 2 assets.

 ~RainbowOption (void)
Real getPrice (priceType priceMethod=ClosedForm, LongNatural nPaths=RO_NPATHS)
Real getPartialDelta (Natural security, priceType priceMethod=ClosedForm)
 by convention, security 1 is the 0th spot in the array, so user "logical"

Real getPartialGamma (Natural security, priceType priceMethod=ClosedForm)
 by convention, security 1 is the 0th spot in the array, so user "logical"

Real getPartialVega (Natural security, priceType priceMethod=ClosedForm)
 by convention, security 1 is the 0th spot in the array, so user "logical"

Real getDelta (priceType priceMethod=ClosedForm)
Real getGamma (priceType priceMethod=ClosedForm)
Real getVega (priceType priceMethod=ClosedForm)
Real getCorrelRisk (priceType priceMethod=ClosedForm)
 Correl Risk.

Real getRho (priceType priceMethod=ClosedForm)
 Rho risk.

Real getTheta (priceType priceMethod=ClosedForm)
 Theata risk.

rainbowType getRainbowType ()
void setRainbowType (rainbowType newType)

Private Member Functions

Real PriceByMc_2SpreadOptionMax (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_2AssetsBasketMax (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_BestOf2AssetsCash (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_WorstOf2AssetsCash (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_BetterOf2Assets (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_WorseOf2Assets (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_Max2AssetsCall (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_Min2AssetsCall (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_Max2AssetsPut (LongNatural nPaths=RO_NPATHS)
Real PriceByMc_Min2AssetsPut (LongNatural nPaths=RO_NPATHS)
Real PriceByClosedForm_BestOf2_plusCash ()
Real PriceByClosedForm_BetterOf2 ()
Real PriceByClosedForm_WorseOf2 ()
Real PriceByClosedForm_MaxOf2_call ()
Real PriceByClosedForm_MinOf2_call ()
Real PriceByClosedForm_MaxOf2_put ()
Real PriceByClosedForm_MinOf2_put ()
void reassignVolsAtThemoney ()
void reassignVolsAtThestrike ()
void instanciateMCVariables ()
void compute_sigmaA ()
void compute_rho1 ()
void compute_rho2 ()
void compute_d1 ()
void compute_d2 ()
void compute_d3 ()
void compute_d4 ()
void compute_A ()
void compute_B ()
void compute_C ()
void compute_ClosedFormsParameters ()

Private Attributes

bool _outputMsgs
Date _startDate
Real _expiryInYears
Natural _NumberOfAssets
Real _Strike
valarray< Real_spots
Real _Multiplier
valarray< Real_weights
Matrix _CorrelationMatrix
valarray< Real_volatilities
valarray< volsurface_volatilitiesSurfaces
yieldCurve _yc
rainbowType _type
PayOff _thePayOff
Real _DFTomaturity
valarray< Drift_Drifts
Random_pRandom
MCEngine _MCEngine
Real _gaussianSample
valarray< Real_TerminalPoints
valarray< GaussianProcess_pHazardRateProcesses
LongNatural _seed
Real sigmaA
Real rho1
Real rho2
Real d1
Real d2
Real d3
Real d4
Real A
Real B
Real C
bool haveClosedFormVariablesBeenComputed


Constructor & Destructor Documentation

RainbowOption::RainbowOption void   ) 
 

The default constructor will instantiate a rainbow such with : - a non correlated basket - of RO_DEFAULT_NB_ASSETS assets, - equally weighted, and - with RO_DEFAULT_MULTIPLIER.

Definition at line 3 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _expiryInYears, _Multiplier, _NumberOfAssets, _outputMsgs, _pRandom, _seed, _spots, _startDate, _Strike, _volatilities, _volatilitiesSurfaces, _weights, BestOf2AssetsCash, yieldCurve::discountFactor(), haveClosedFormVariablesBeenComputed, IdentityMatrix(), LongNatural, Real, RO_DEFAULT_MATURITY, RO_DEFAULT_NB_ASSETS, RO_DEFAULT_RATE, RO_DEFAULT_STRIKE, RO_DEFAULT_VOL, RO_SEED, and Date::setDateToToday().

RainbowOption::RainbowOption rainbowType  type,
Date  startDate,
Real  expiry,
Real  Strike,
yieldCurve  yc,
valarray< volsurface vols,
valarray< Real spots = valarray< Real >(RO_DEFAULT_STRIKE, RO_DEFAULT_NB_ASSETS),
Real  Multiplier = RO_DEFAULT_MULTIPLIER,
Matrix  Correl = IdentityMatrix(RO_DEFAULT_NB_ASSETS),
valarray< Real weights = valarray< Real >(1/(Real) RO_DEFAULT_NB_ASSETS, RO_DEFAULT_NB_ASSETS),
bool  outputMsgs = false
 

Full general constructor with n assets.

Definition at line 29 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _expiryInYears, _NumberOfAssets, _pRandom, _seed, _Strike, _thePayOff, yieldCurve::discountFactor(), Matrix::GetRows(), haveClosedFormVariablesBeenComputed, LongNatural, Real, reassignVolsAtThestrike(), RO_SEED, and PayOff::SetStrike().

RainbowOption::RainbowOption rainbowType  type,
Date  start,
Real  exp,
Real  Strike,
yieldCurve  yc,
valarray< volsurface vols,
Real  Spot1,
Real  Spot2,
Real  Mult = RO_DEFAULT_MULTIPLIER,
Real  Correl12 = 0,
Real  weight1 = 0.5,
Real  weight2 = 0.5,
bool  outputMsgs = false
 

For 2 assets.

Parameters:
 Real Correl: the correlation between 1 and 2 - default is 0

Definition at line 52 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _expiryInYears, _NumberOfAssets, _pRandom, _seed, _spots, _volatilities, _weights, yieldCurve::discountFactor(), haveClosedFormVariablesBeenComputed, IdentityMatrix(), LongNatural, Real, reassignVolsAtThestrike(), RO_SEED, and Matrix::SetValue().

RainbowOption::~RainbowOption void   ) 
 

Definition at line 679 of file rainbowoption.cpp.


Member Function Documentation

void RainbowOption::compute_A  )  [private]
 

Definition at line 541 of file rainbowoption.cpp.

References _spots, A, CumulativeBivariateNormal(), CumulativeNormal(), d3, Real, and rho1.

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_B  )  [private]
 

Definition at line 547 of file rainbowoption.cpp.

References _spots, B, CumulativeBivariateNormal(), CumulativeNormal(), d4, Real, and rho2.

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_C  )  [private]
 

Definition at line 553 of file rainbowoption.cpp.

References _CorrelationMatrix, _expiryInYears, _Strike, _volatilities, a, C, CumulativeBivariateNormal(), Real, and yieldCurve::spotRate().

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_ClosedFormsParameters  )  [private]
 

Definition at line 564 of file rainbowoption.cpp.

References compute_A(), compute_B(), compute_C(), compute_d1(), compute_d2(), compute_d3(), compute_d4(), compute_rho1(), compute_rho2(), and compute_sigmaA().

Referenced by PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), PriceByClosedForm_MaxOf2_call(), and PriceByClosedForm_MaxOf2_put().

void RainbowOption::compute_d1  )  [private]
 

Definition at line 507 of file rainbowoption.cpp.

References _expiryInYears, _spots, _Strike, _volatilities, Real, and yieldCurve::spotRate().

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_d2  )  [private]
 

Definition at line 516 of file rainbowoption.cpp.

References _expiryInYears, _spots, _Strike, _volatilities, Real, and yieldCurve::spotRate().

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_d3  )  [private]
 

Definition at line 525 of file rainbowoption.cpp.

References _expiryInYears, _spots, d3, Real, and sigmaA.

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_d4  )  [private]
 

Definition at line 533 of file rainbowoption.cpp.

References _expiryInYears, _spots, d4, Real, and sigmaA.

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_rho1  )  [private]
 

Definition at line 491 of file rainbowoption.cpp.

References _CorrelationMatrix, _volatilities, Real, rho1, and sigmaA.

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_rho2  )  [private]
 

Definition at line 499 of file rainbowoption.cpp.

References _CorrelationMatrix, _volatilities, Real, rho2, and sigmaA.

Referenced by compute_ClosedFormsParameters().

void RainbowOption::compute_sigmaA  )  [private]
 

Definition at line 483 of file rainbowoption.cpp.

References _CorrelationMatrix, _volatilities, Real, and sigmaA.

Referenced by compute_ClosedFormsParameters().

Real RainbowOption::getCorrelRisk priceType  priceMethod = ClosedForm  ) 
 

Correl Risk.

Definition at line 264 of file rainbowoption.cpp.

References _CorrelationMatrix, _outputMsgs, getPrice(), Matrix::GetRows(), GREEKAPPROX, haveClosedFormVariablesBeenComputed, Natural, Real, and Matrix::SetValue().

Referenced by inputRainbowOption(), and mainrainbowoptions().

Real RainbowOption::getDelta priceType  priceMethod = ClosedForm  ) 
 

Returns:
overall delta (if all the market shifts : sum of deltas)

Definition at line 240 of file rainbowoption.cpp.

References _NumberOfAssets, getPartialDelta(), Natural, Real, Matrix::SetValue(), and Matrix::SumColumn().

Real RainbowOption::getGamma priceType  priceMethod = ClosedForm  ) 
 

Returns:
overall gamma (if all the market shifts : sum of gamma)

Definition at line 248 of file rainbowoption.cpp.

References _NumberOfAssets, getPartialGamma(), Natural, Real, Matrix::SetValue(), and Matrix::SumColumn().

Real RainbowOption::getPartialDelta Natural  security,
priceType  priceMethod = ClosedForm
 

by convention, security 1 is the 0th spot in the array, so user "logical"

Definition at line 177 of file rainbowoption.cpp.

References _NumberOfAssets, _outputMsgs, _spots, getPrice(), GREEKAPPROX, haveClosedFormVariablesBeenComputed, Natural, and Real.

Referenced by getDelta(), getPartialGamma(), inputRainbowOption(), and mainrainbowoptions().

Real RainbowOption::getPartialGamma Natural  security,
priceType  priceMethod = ClosedForm
 

by convention, security 1 is the 0th spot in the array, so user "logical"

Definition at line 198 of file rainbowoption.cpp.

References _NumberOfAssets, _outputMsgs, _spots, getPartialDelta(), GREEKAPPROX, haveClosedFormVariablesBeenComputed, Natural, and Real.

Referenced by getGamma(), inputRainbowOption(), and mainrainbowoptions().

Real RainbowOption::getPartialVega Natural  security,
priceType  priceMethod = ClosedForm
 

by convention, security 1 is the 0th spot in the array, so user "logical"

Definition at line 219 of file rainbowoption.cpp.

References _NumberOfAssets, _outputMsgs, _volatilities, getPrice(), GREEKAPPROX, haveClosedFormVariablesBeenComputed, Natural, and Real.

Referenced by getVega(), inputRainbowOption(), and mainrainbowoptions().

Real RainbowOption::getPrice priceType  priceMethod = ClosedForm,
LongNatural  nPaths = RO_NPATHS
 

Parameters:
price type : MC (default as for this one we have all prices) - or CF
nPaths - only be used for MC, so default

Definition at line 85 of file rainbowoption.cpp.

References _outputMsgs, AssetsBasketMax, BestOf2AssetsCash, BetterOf2Assets, ClosedForm, LongNatural, Max2AssetsCall, Max2AssetsPut, Min2AssetsCall, Min2AssetsPut, MonteCarlo, PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), PriceByClosedForm_MaxOf2_call(), PriceByClosedForm_MaxOf2_put(), PriceByClosedForm_MinOf2_call(), PriceByClosedForm_MinOf2_put(), PriceByClosedForm_WorseOf2(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_BetterOf2Assets(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorseOf2Assets(), PriceByMc_WorstOf2AssetsCash(), Real, SpreadOptionMax, WorseOf2Assets, and WorstOf2AssetsCash.

Referenced by getCorrelRisk(), getPartialDelta(), getPartialVega(), getRho(), getTheta(), inputRainbowOption(), and mainrainbowoptions().

rainbowType RainbowOption::getRainbowType  )  [inline]
 

Definition at line 116 of file rainbowoption.h.

References rainbowType.

Real RainbowOption::getRho priceType  priceMethod = ClosedForm  ) 
 

Rho risk.

Definition at line 310 of file rainbowoption.cpp.

References _outputMsgs, getPrice(), GREEKAPPROX, haveClosedFormVariablesBeenComputed, Real, and yieldCurve::shiftZCBRateCurve().

Referenced by inputRainbowOption(), and mainrainbowoptions().

Real RainbowOption::getTheta priceType  priceMethod = ClosedForm  ) 
 

Theata risk.

Definition at line 331 of file rainbowoption.cpp.

References _expiryInYears, _outputMsgs, getPrice(), haveClosedFormVariablesBeenComputed, and Real.

Real RainbowOption::getVega priceType  priceMethod = ClosedForm  ) 
 

Returns:
overall vega (if all the market shifts : sum of Vega)

Definition at line 256 of file rainbowoption.cpp.

References _NumberOfAssets, getPartialVega(), Natural, Real, Matrix::SetValue(), and Matrix::SumColumn().

void RainbowOption::instanciateMCVariables  )  [private]
 

Definition at line 354 of file rainbowoption.cpp.

References _Drifts, _expiryInYears, _gaussianSample, _NumberOfAssets, _pHazardRateProcesses, _pRandom, _spots, _startDate, _Strike, _TerminalPoints, _thePayOff, _volatilities, Natural, RO_SEED, Random::SetSeed(), PayOff::SetStrike(), and yieldCurve::spotRate().

Referenced by PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_BetterOf2Assets(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorseOf2Assets(), and PriceByMc_WorstOf2AssetsCash().

Real RainbowOption::PriceByClosedForm_BestOf2_plusCash  )  [private]
 

Definition at line 577 of file rainbowoption.cpp.

References _outputMsgs, A, B, C, compute_ClosedFormsParameters(), haveClosedFormVariablesBeenComputed, and Real.

Referenced by getPrice().

Real RainbowOption::PriceByClosedForm_BetterOf2  )  [private]
 

Definition at line 587 of file rainbowoption.cpp.

References _outputMsgs, _Strike, A, B, C, compute_ClosedFormsParameters(), EPSILON, haveClosedFormVariablesBeenComputed, and Real.

Referenced by getPrice(), PriceByClosedForm_MaxOf2_put(), and PriceByClosedForm_WorseOf2().

Real RainbowOption::PriceByClosedForm_MaxOf2_call  )  [private]
 

Definition at line 620 of file rainbowoption.cpp.

References _expiryInYears, _outputMsgs, _Strike, A, B, C, compute_ClosedFormsParameters(), haveClosedFormVariablesBeenComputed, Real, and yieldCurve::spotRate().

Referenced by getPrice(), PriceByClosedForm_MaxOf2_put(), and PriceByClosedForm_MinOf2_call().

Real RainbowOption::PriceByClosedForm_MaxOf2_put  )  [private]
 

Definition at line 651 of file rainbowoption.cpp.

References _expiryInYears, _outputMsgs, _Strike, compute_ClosedFormsParameters(), haveClosedFormVariablesBeenComputed, PriceByClosedForm_BetterOf2(), PriceByClosedForm_MaxOf2_call(), Real, and yieldCurve::spotRate().

Referenced by getPrice(), and PriceByClosedForm_MinOf2_put().

Real RainbowOption::PriceByClosedForm_MinOf2_call  )  [private]
 

Definition at line 632 of file rainbowoption.cpp.

References _expiryInYears, _outputMsgs, _spots, _Strike, _volatilities, Call, BlackScholes::getPrice(), PriceByClosedForm_MaxOf2_call(), Real, and yieldCurve::spotRate().

Referenced by getPrice().

Real RainbowOption::PriceByClosedForm_MinOf2_put  )  [private]
 

Definition at line 662 of file rainbowoption.cpp.

References _expiryInYears, _outputMsgs, _spots, _Strike, _volatilities, BlackScholes::getPrice(), PriceByClosedForm_MaxOf2_put(), Put, Real, and yieldCurve::spotRate().

Referenced by getPrice().

Real RainbowOption::PriceByClosedForm_WorseOf2  )  [private]
 

Definition at line 601 of file rainbowoption.cpp.

References _expiryInYears, _outputMsgs, _spots, _volatilities, Call, EPSILON, BlackScholes::getPrice(), PriceByClosedForm_BetterOf2(), Real, and yieldCurve::spotRate().

Referenced by getPrice().

Real RainbowOption::PriceByMc_2AssetsBasketMax LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 395 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _Multiplier, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbow2AssetsBasketMax().

Referenced by getPrice().

Real RainbowOption::PriceByMc_2SpreadOptionMax LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 383 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _Multiplier, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbow2SpreadOptionMax().

Referenced by getPrice().

Real RainbowOption::PriceByMc_BestOf2AssetsCash LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 404 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbowBestOf2AssetsCash().

Referenced by getPrice().

Real RainbowOption::PriceByMc_BetterOf2Assets LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 422 of file rainbowoption.cpp.

References _Strike, EPSILON, instanciateMCVariables(), LongNatural, PriceByMc_Max2AssetsCall(), and Real.

Referenced by getPrice().

Real RainbowOption::PriceByMc_Max2AssetsCall LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 447 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _Multiplier, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbowMax2AssetsCall().

Referenced by getPrice(), and PriceByMc_BetterOf2Assets().

Real RainbowOption::PriceByMc_Max2AssetsPut LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 465 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _Multiplier, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbowMax2AssetsPut().

Referenced by getPrice().

Real RainbowOption::PriceByMc_Min2AssetsCall LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 456 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _Multiplier, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbowMin2AssetsCall().

Referenced by getPrice(), and PriceByMc_WorseOf2Assets().

Real RainbowOption::PriceByMc_Min2AssetsPut LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 474 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _Multiplier, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbowMin2AssetsPut().

Referenced by getPrice().

Real RainbowOption::PriceByMc_WorseOf2Assets LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 435 of file rainbowoption.cpp.

References _Strike, EPSILON, instanciateMCVariables(), LongNatural, PriceByMc_Min2AssetsCall(), and Real.

Referenced by getPrice().

Real RainbowOption::PriceByMc_WorstOf2AssetsCash LongNatural  nPaths = RO_NPATHS  )  [private]
 

Definition at line 413 of file rainbowoption.cpp.

References _CorrelationMatrix, _DFTomaturity, _gaussianSample, _MCEngine, _pHazardRateProcesses, _pRandom, _TerminalPoints, _thePayOff, _weights, instanciateMCVariables(), LongNatural, MCEngine::MCResult(), Real, and MCEngine::RunEngineRainbowWorstOf2AssetsCash().

Referenced by getPrice().

void RainbowOption::reassignVolsAtThemoney  )  [private]
 

Definition at line 378 of file rainbowoption.cpp.

References _expiryInYears, _NumberOfAssets, _spots, _startDate, _volatilities, _volatilitiesSurfaces, Natural, and Date::plusDays().

void RainbowOption::reassignVolsAtThestrike  )  [private]
 

Definition at line 372 of file rainbowoption.cpp.

References _expiryInYears, _NumberOfAssets, _startDate, _Strike, _volatilities, _volatilitiesSurfaces, Natural, and Date::plusDays().

Referenced by RainbowOption().

void RainbowOption::setRainbowType rainbowType  newType  )  [inline]
 

Definition at line 117 of file rainbowoption.h.

Referenced by mainrainbowoptions().


Member Data Documentation

Matrix RainbowOption::_CorrelationMatrix [private]
 

Definition at line 158 of file rainbowoption.h.

Referenced by compute_C(), compute_rho1(), compute_rho2(), compute_sigmaA(), getCorrelRisk(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorstOf2AssetsCash(), and RainbowOption().

Real RainbowOption::_DFTomaturity [private]
 

Definition at line 171 of file rainbowoption.h.

Referenced by PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorstOf2AssetsCash(), and RainbowOption().

valarray<Drift> RainbowOption::_Drifts [private]
 

Definition at line 172 of file rainbowoption.h.

Referenced by instanciateMCVariables().

Real RainbowOption::_expiryInYears [private]
 

Definition at line 152 of file rainbowoption.h.

Referenced by compute_C(), compute_d1(), compute_d2(), compute_d3(), compute_d4(), getTheta(), instanciateMCVariables(), PriceByClosedForm_MaxOf2_call(), PriceByClosedForm_MaxOf2_put(), PriceByClosedForm_MinOf2_call(), PriceByClosedForm_MinOf2_put(), PriceByClosedForm_WorseOf2(), RainbowOption(), reassignVolsAtThemoney(), and reassignVolsAtThestrike().

Real RainbowOption::_gaussianSample [private]
 

Definition at line 175 of file rainbowoption.h.

Referenced by instanciateMCVariables(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), and PriceByMc_WorstOf2AssetsCash().

MCEngine RainbowOption::_MCEngine [private]
 

Definition at line 174 of file rainbowoption.h.

Referenced by PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), and PriceByMc_WorstOf2AssetsCash().

Real RainbowOption::_Multiplier [private]
 

Definition at line 156 of file rainbowoption.h.

Referenced by PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), and RainbowOption().

Natural RainbowOption::_NumberOfAssets [private]
 

Definition at line 153 of file rainbowoption.h.

Referenced by getDelta(), getGamma(), getPartialDelta(), getPartialGamma(), getPartialVega(), getVega(), instanciateMCVariables(), RainbowOption(), reassignVolsAtThemoney(), and reassignVolsAtThestrike().

bool RainbowOption::_outputMsgs [private]
 

Definition at line 148 of file rainbowoption.h.

Referenced by getCorrelRisk(), getPartialDelta(), getPartialGamma(), getPartialVega(), getPrice(), getRho(), getTheta(), PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), PriceByClosedForm_MaxOf2_call(), PriceByClosedForm_MaxOf2_put(), PriceByClosedForm_MinOf2_call(), PriceByClosedForm_MinOf2_put(), PriceByClosedForm_WorseOf2(), and RainbowOption().

valarray<GaussianProcess> RainbowOption::_pHazardRateProcesses [private]
 

Definition at line 177 of file rainbowoption.h.

Referenced by instanciateMCVariables(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), and PriceByMc_WorstOf2AssetsCash().

Random* RainbowOption::_pRandom [private]
 

Definition at line 173 of file rainbowoption.h.

Referenced by instanciateMCVariables(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorstOf2AssetsCash(), and RainbowOption().

LongNatural RainbowOption::_seed [private]
 

Definition at line 180 of file rainbowoption.h.

Referenced by RainbowOption().

valarray<Real> RainbowOption::_spots [private]
 

Definition at line 155 of file rainbowoption.h.

Referenced by compute_A(), compute_B(), compute_d1(), compute_d2(), compute_d3(), compute_d4(), getPartialDelta(), getPartialGamma(), instanciateMCVariables(), PriceByClosedForm_MinOf2_call(), PriceByClosedForm_MinOf2_put(), PriceByClosedForm_WorseOf2(), RainbowOption(), and reassignVolsAtThemoney().

Date RainbowOption::_startDate [private]
 

Definition at line 151 of file rainbowoption.h.

Referenced by instanciateMCVariables(), RainbowOption(), reassignVolsAtThemoney(), and reassignVolsAtThestrike().

Real RainbowOption::_Strike [private]
 

Definition at line 154 of file rainbowoption.h.

Referenced by compute_C(), compute_d1(), compute_d2(), instanciateMCVariables(), PriceByClosedForm_BetterOf2(), PriceByClosedForm_MaxOf2_call(), PriceByClosedForm_MaxOf2_put(), PriceByClosedForm_MinOf2_call(), PriceByClosedForm_MinOf2_put(), PriceByMc_BetterOf2Assets(), PriceByMc_WorseOf2Assets(), RainbowOption(), and reassignVolsAtThestrike().

valarray<Real> RainbowOption::_TerminalPoints [private]
 

Definition at line 176 of file rainbowoption.h.

Referenced by instanciateMCVariables(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), and PriceByMc_WorstOf2AssetsCash().

PayOff RainbowOption::_thePayOff [private]
 

Definition at line 170 of file rainbowoption.h.

Referenced by instanciateMCVariables(), PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorstOf2AssetsCash(), and RainbowOption().

rainbowType RainbowOption::_type [private]
 

Definition at line 163 of file rainbowoption.h.

valarray<Real> RainbowOption::_volatilities [private]
 

Definition at line 159 of file rainbowoption.h.

Referenced by compute_C(), compute_d1(), compute_d2(), compute_rho1(), compute_rho2(), compute_sigmaA(), getPartialVega(), instanciateMCVariables(), PriceByClosedForm_MinOf2_call(), PriceByClosedForm_MinOf2_put(), PriceByClosedForm_WorseOf2(), RainbowOption(), reassignVolsAtThemoney(), and reassignVolsAtThestrike().

valarray<volsurface> RainbowOption::_volatilitiesSurfaces [private]
 

Definition at line 160 of file rainbowoption.h.

Referenced by RainbowOption(), reassignVolsAtThemoney(), and reassignVolsAtThestrike().

valarray<Real> RainbowOption::_weights [private]
 

Definition at line 157 of file rainbowoption.h.

Referenced by PriceByMc_2AssetsBasketMax(), PriceByMc_2SpreadOptionMax(), PriceByMc_BestOf2AssetsCash(), PriceByMc_Max2AssetsCall(), PriceByMc_Max2AssetsPut(), PriceByMc_Min2AssetsCall(), PriceByMc_Min2AssetsPut(), PriceByMc_WorstOf2AssetsCash(), and RainbowOption().

yieldCurve RainbowOption::_yc [private]
 

Definition at line 161 of file rainbowoption.h.

Real RainbowOption::A [private]
 

Definition at line 197 of file rainbowoption.h.

Referenced by compute_A(), PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), and PriceByClosedForm_MaxOf2_call().

Real RainbowOption::B [private]
 

Definition at line 199 of file rainbowoption.h.

Referenced by compute_B(), PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), and PriceByClosedForm_MaxOf2_call().

Real RainbowOption::C [private]
 

Definition at line 201 of file rainbowoption.h.

Referenced by compute_C(), PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), and PriceByClosedForm_MaxOf2_call().

Real RainbowOption::d1 [private]
 

Definition at line 189 of file rainbowoption.h.

Real RainbowOption::d2 [private]
 

Definition at line 191 of file rainbowoption.h.

Real RainbowOption::d3 [private]
 

Definition at line 193 of file rainbowoption.h.

Referenced by compute_A(), and compute_d3().

Real RainbowOption::d4 [private]
 

Definition at line 195 of file rainbowoption.h.

Referenced by compute_B(), and compute_d4().

bool RainbowOption::haveClosedFormVariablesBeenComputed [private]
 

Definition at line 204 of file rainbowoption.h.

Referenced by getCorrelRisk(), getPartialDelta(), getPartialGamma(), getPartialVega(), getRho(), getTheta(), PriceByClosedForm_BestOf2_plusCash(), PriceByClosedForm_BetterOf2(), PriceByClosedForm_MaxOf2_call(), PriceByClosedForm_MaxOf2_put(), and RainbowOption().

Real RainbowOption::rho1 [private]
 

Definition at line 185 of file rainbowoption.h.

Referenced by compute_A(), and compute_rho1().

Real RainbowOption::rho2 [private]
 

Definition at line 187 of file rainbowoption.h.

Referenced by compute_B(), and compute_rho2().

Real RainbowOption::sigmaA [private]
 

Definition at line 183 of file rainbowoption.h.

Referenced by compute_d3(), compute_d4(), compute_rho1(), compute_rho2(), and compute_sigmaA().


The documentation for this class was generated from the following files:
Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:40 2005 for terreneuve by doxygen 1.3.6