FloatingRateCoupon Class Reference

#include <ql/CashFlows/floatingratecoupon.hpp>

Inheritance diagram for FloatingRateCoupon:

Inheritance graph
[legend]
List of all members.

Detailed Description

Coupon paying a variable index-based rate

Warning:
This class does not perform any date adjustment, i.e., the start and end date passed upon construction should be already rolled to a business day.
Todo:
add gearing unit test


Public Member Functions

 FloatingRateCoupon (const Date &paymentDate, const Real nominal, const Date &startDate, const Date &endDate, const Integer fixingDays, const boost::shared_ptr< InterestRateIndex > &index, const Real gearing=1.0, const Spread spread=0.0, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const DayCounter &dayCounter=DayCounter())
Coupon interface
virtual Rate rate () const
 accrued rate
Real amount () const
 returns the amount of the cash flow
Real accruedAmount (const Date &) const
 accrued amount at the given date
DayCounter dayCounter () const
 day counter for accrual calculation
Inspectors
const boost::shared_ptr< InterestRateIndex > & index () const
 floating index
Integer fixingDays () const
 fixing days
virtual Date fixingDate () const
 fixing date
Real gearing () const
 index gearing, i.e. multiplicative coefficient for the index
Rate indexFixing () const
 fixing of the underlying index
Rate convexityAdjustment () const
 convexity adjustment
Rate adjustedFixing () const
 convexity-adjusted fixing
Spread spread () const
 spread paid over the fixing of the underlying index
Observer interface
void update ()
Visitability
virtual void accept (AcyclicVisitor &)

Protected Member Functions

virtual Rate convexityAdjustmentImpl (Rate fixing) const
 convexity adjustment for the given index fixing

Protected Attributes

boost::shared_ptr< InterestRateIndexindex_
DayCounter dayCounter_
Integer fixingDays_
Real gearing_
Spread spread_


Member Function Documentation

Real amount (  )  const [virtual]

returns the amount of the cash flow

Note:
The amount is not discounted, i.e., it is the actual amount paid at the cash flow date.

Implements CashFlow.

void update (  )  [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.