00001 #pragma once 00002 00003 #ifndef EXOTICS_H 00004 #define EXOTICS_H 00005 00006 #include "./../PartB/yieldCurve.h" 00007 #include "./../PartE/volsurface.h" 00008 00009 #include<valarray> 00010 using namespace std; 00011 00016 static const Real defaultShiftVolSurface=0.01; 00017 static const Real defaultAdvDays=1.; 00018 00019 Real mainmc(Real Expiry, Real Strike, Real Spot, volsurface* pvolsurface, yieldCurve* pyieldCurve, 00020 LongNatural nPaths, LongNatural nDates, Integer PrdName); 00021 00022 enum exoticsType { 00023 AsianCall, 00024 AsianPut, 00025 RevLookbackCall, 00026 RevLookbackPut, 00027 FlooredCliquet, 00028 CappedCliquet, 00029 CollaredCliquet, 00030 BarrierCall, 00031 BarrierPut 00032 }; 00033 00034 class Exotics 00035 { 00036 public: 00048 Exotics(exoticsType type,yieldCurve* curve,volsurface* surface,Real spot,Real strike, 00049 Real Expiry,LongNatural nDates=10,Real strike2=-1.,LongNatural nPaths=100000); 00050 ~Exotics(void); 00052 Real getPrice(); 00054 Real getRho(); 00056 Real getTheta(); 00058 Real getVega(); 00060 Real getDelta(); 00061 00062 private: 00063 exoticsType _type; 00064 Real _expiry; 00065 Real _spot; 00066 Real _strike; 00067 Real _strike2; 00068 volsurface* _volSurface; 00069 yieldCurve* _yieldCurve; 00070 LongNatural _nPaths; 00071 LongNatural _nDates; 00072 }; 00073 00074 #endif;