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

VanillaSwap Class Reference

#include <VanillaSwap.h>

List of all members.

Public Member Functions

 VanillaSwap (CashFlow cashflowReceived1, CashFlow cashflowPaid2, char *name1, char *name2, yieldCurve *curve)
 Default constructor : create a vanilla swap with two legs.

 ~VanillaSwap (void)
Real getFairValue1 ()
 Return fair value of first leg.

Real getFairValue2 ()
 Return fair value of second leg.

Real returnPrice ()
 Return price of the swap.

Real getRho ()
 Return sensitivity to the interest rate.

Real getTheta ()
 Return sensitivity to the time.


Private Attributes

yieldCurve_curve
CashFlow _leg1
CashFlow _leg2
char * _name1
char * _name2


Constructor & Destructor Documentation

VanillaSwap::VanillaSwap CashFlow  cashflowReceived1,
CashFlow  cashflowPaid2,
char *  name1,
char *  name2,
yieldCurve curve
 

Default constructor : create a vanilla swap with two legs.

Definition at line 3 of file VanillaSwap.cpp.

References _name1, _name2, and ShortNatural.

VanillaSwap::~VanillaSwap void   ) 
 

Definition at line 16 of file VanillaSwap.cpp.


Member Function Documentation

Real VanillaSwap::getFairValue1  ) 
 

Return fair value of first leg.

Definition at line 20 of file VanillaSwap.cpp.

References _curve, _leg1, CashFlow::getFairValue(), and Real.

Referenced by inputVanillaSwap(), and returnPrice().

Real VanillaSwap::getFairValue2  ) 
 

Return fair value of second leg.

Definition at line 24 of file VanillaSwap.cpp.

References _curve, _leg2, CashFlow::getFairValue(), and Real.

Referenced by inputVanillaSwap(), and returnPrice().

Real VanillaSwap::getRho  ) 
 

Return sensitivity to the interest rate.

Definition at line 34 of file VanillaSwap.cpp.

References _curve, Real, returnPrice(), and yieldCurve::shiftZCBRateCurve().

Referenced by inputVanillaSwap().

Real VanillaSwap::getTheta  ) 
 

Return sensitivity to the time.

Definition at line 42 of file VanillaSwap.cpp.

References _curve, yieldCurve::forwardZCBCurve(), Real, and returnPrice().

Referenced by inputVanillaSwap().

Real VanillaSwap::returnPrice  ) 
 

Return price of the swap.

Definition at line 28 of file VanillaSwap.cpp.

References getFairValue1(), getFairValue2(), and Real.

Referenced by getRho(), getTheta(), inputVanillaSwap(), and mainIRVanillaSwap().


Member Data Documentation

yieldCurve* VanillaSwap::_curve [private]
 

Definition at line 31 of file VanillaSwap.h.

Referenced by getFairValue1(), getFairValue2(), getRho(), and getTheta().

CashFlow VanillaSwap::_leg1 [private]
 

Definition at line 32 of file VanillaSwap.h.

Referenced by getFairValue1().

CashFlow VanillaSwap::_leg2 [private]
 

Definition at line 33 of file VanillaSwap.h.

Referenced by getFairValue2().

char* VanillaSwap::_name1 [private]
 

Definition at line 34 of file VanillaSwap.h.

Referenced by VanillaSwap().

char* VanillaSwap::_name2 [private]
 

Definition at line 35 of file VanillaSwap.h.

Referenced by VanillaSwap().


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