Cash flow dependent on an index ratio. More...
#include <ql/cashflows/indexedcashflow.hpp>
Public Member Functions | |
IndexedCashFlow (Real notional, const ext::shared_ptr< Index > &index, const Date &baseDate, const Date &fixingDate, const Date &paymentDate, bool growthOnly=false) | |
Event interface | |
Date | date () const |
virtual Real | notional () const |
virtual Date | baseDate () const |
virtual Date | fixingDate () const |
virtual ext::shared_ptr< Index > | index () const |
virtual bool | growthOnly () const |
CashFlow interface | |
Real | amount () const |
returns the amount of the cash flow More... | |
Visitability | |
virtual void | accept (AcyclicVisitor &) |
![]() | |
bool | hasOccurred (const Date &refDate=Date(), boost::optional< bool > includeRefDate=boost::none) const |
returns true if an event has already occurred before a date More... | |
virtual Date | exCouponDate () const |
returns the date that the cash flow trades exCoupon | |
bool | tradingExCoupon (const Date &refDate=Date()) const |
returns true if the cashflow is trading ex-coupon on the refDate | |
Event interface | |
Visitability | |
![]() | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
void | notifyObservers () |
![]() | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | deepUpdate () |
Observer interface | |
void | update () |
Additional Inherited Members | |
![]() | |
typedef boost::unordered_set< ext::shared_ptr< Observable > > | set_type |
typedef set_type::iterator | iterator |
Cash flow dependent on an index ratio.
This cash flow is not a coupon, i.e., there's no accrual. The amount is either i(T)/i(0) or i(T)/i(0) - 1, depending on the growthOnly parameter.
We expect this to be used inside an instrument that does all the date adjustment etc., so this takes just dates and does not change them. growthOnly = false means i(T)/i(0), which is a bond-type setting. growthOnly = true means i(T)/i(0) - 1, which is a swap-type setting.
|
virtual |
returns the amount of the cash flow
Implements CashFlow.
|
virtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Implements Observer.