#include <CashFlow.h>
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< Real > | flowAmount |
valarray< Date > | flowDates |
|
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(). |
|
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(). |
|
Definition at line 36 of file CashFlow.cpp. |
|
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(). |
|
Definition at line 25 of file CashFlow.h. Referenced by CashFlow(), and getFairValue(). |
|
Definition at line 26 of file CashFlow.h. Referenced by CashFlow(), and getFairValue(). |