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

CashFlow Class Reference

#include <CashFlow.h>

List of all members.

Public Member Functions

 CashFlow (SwapLeg swapLeg, Real fixedRate)
 Constructor for fixed leg.

 CashFlow (SwapLeg swapLeg, yieldCurve floatCurve)
 Constructor for float leg by giving a yield curve object.

Real getFairValue (yieldCurve *curve)
 Get the fair value of the swap : discounted value of cash flows.

 ~CashFlow (void)

Private Attributes

valarray< RealflowAmount
valarray< DateflowDates


Constructor & Destructor Documentation

CashFlow::CashFlow SwapLeg  swapLeg,
Real  fixedRate
 

Constructor for fixed leg.

Definition at line 3 of file CashFlow.cpp.

References flowAmount, flowDates, Natural, Real, SwapLeg::returnAmounts(), SwapLeg::returnDates(), Date::serialNumber(), and Date::setDateToToday().

CashFlow::CashFlow SwapLeg  swapLeg,
yieldCurve  floatCurve
 

Constructor for float leg by giving a yield curve object.

Definition at line 15 of file CashFlow.cpp.

References Discrete, flowAmount, flowDates, yieldCurve::forwardRate(), Natural, SwapLeg::returnAmounts(), SwapLeg::returnDates(), Date::serialNumber(), and Date::setDateToToday().

CashFlow::~CashFlow void   ) 
 

Definition at line 36 of file CashFlow.cpp.


Member Function Documentation

Real CashFlow::getFairValue yieldCurve curve  ) 
 

Get the fair value of the swap : discounted value of cash flows.

Definition at line 27 of file CashFlow.cpp.

References yieldCurve::discountFactor(), Discrete, flowAmount, flowDates, Natural, and Real.

Referenced by VanillaSwap::getFairValue1(), VanillaSwap::getFairValue2(), and mainIRVanillaSwap().


Member Data Documentation

valarray<Real> CashFlow::flowAmount [private]
 

Definition at line 25 of file CashFlow.h.

Referenced by CashFlow(), and getFairValue().

valarray<Date> CashFlow::flowDates [private]
 

Definition at line 26 of file CashFlow.h.

Referenced by CashFlow(), and getFairValue().


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:39 2005 for terreneuve by doxygen 1.3.6