Class FloatingRateCoupon
- java.lang.Object
-
- org.jquantlib.cashflow.Event
-
- org.jquantlib.cashflow.CashFlow
-
- org.jquantlib.cashflow.Coupon
-
- org.jquantlib.cashflow.FloatingRateCoupon
-
- All Implemented Interfaces:
- java.lang.Comparable<CashFlow>, Observable, Observer, PolymorphicVisitable
- Direct Known Subclasses:
- AverageBMACoupon, CappedFlooredCoupon, CmsCoupon, IborCoupon
public class FloatingRateCoupon extends Coupon implements Observer
-
-
Constructor Summary
Constructors Constructor and Description FloatingRateCoupon(Date paymentDate, double nominal, Date startDate, Date endDate, int fixingDays, InterestRateIndex index, double gearing, double spread, Date refPeriodStart, Date refPeriodEnd, DayCounter dayCounter, boolean isInArrears)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaccept(PolymorphicVisitor pv)This method is intended to extend the semantics of methodVisitable.accept(Visitor)doubleaccruedAmount(Date d)doubleadjustedFixing()doubleamount()doubleconvexityAdjustment()doubleconvexityAdjustmentImpl(double f)DayCounterdayCounter()DatefixingDate()intfixingDays()doublegearing()InterestRateIndexindex()doubleindexFixing()booleanisInArrears()doubleprice(Handle<YieldTermStructure> yts)FloatingRateCouponPricerpricer()doublerate()voidsetPricer(FloatingRateCouponPricer pricer)doublespread()voidupdate()This method is called whenever the observed object is changed.-
Methods inherited from class org.jquantlib.cashflow.Coupon
accrualDays, accrualEndDate, accrualPeriod, accrualStartDate, date, nominal, referencePeriodEnd, referencePeriodStart
-
Methods inherited from class org.jquantlib.cashflow.Event
addObserver, countObservers, deleteObserver, deleteObservers, getObservers, hasOccurred, hasOccurred, notifyObservers, notifyObservers
-
-
-
-
Constructor Detail
-
FloatingRateCoupon
public FloatingRateCoupon(Date paymentDate, double nominal, Date startDate, Date endDate, int fixingDays, InterestRateIndex index, double gearing, double spread, Date refPeriodStart, Date refPeriodEnd, DayCounter dayCounter, boolean isInArrears)
-
-
Method Detail
-
setPricer
public void setPricer(FloatingRateCouponPricer pricer)
-
pricer
public FloatingRateCouponPricer pricer()
-
amount
public double amount()
-
accruedAmount
public double accruedAmount(Date d)
- Specified by:
accruedAmountin classCoupon
-
price
public double price(Handle<YieldTermStructure> yts)
-
dayCounter
public DayCounter dayCounter()
- Specified by:
dayCounterin classCoupon
-
index
public InterestRateIndex index()
-
fixingDays
public int fixingDays()
-
fixingDate
public Date fixingDate()
-
gearing
public double gearing()
-
spread
public double spread()
-
indexFixing
public double indexFixing()
-
adjustedFixing
public double adjustedFixing()
-
isInArrears
public boolean isInArrears()
-
convexityAdjustmentImpl
public double convexityAdjustmentImpl(double f)
-
convexityAdjustment
public double convexityAdjustment()
-
update
public void update()
Description copied from interface:ObserverThis method is called whenever the observed object is changed.
-
accept
public void accept(PolymorphicVisitor pv)
Description copied from interface:PolymorphicVisitableThis method is intended to extend the semantics of methodVisitable.accept(Visitor)In a conventional Visitor design pattern, the
acceptmethod is called when access to visit a data structure is requested. AVisitorobject is passed as argument in case permission is granted to thatVisitorto access the data structure. Obviously,Visitors andVisitables work in pairs and the class which provides the data structure to be visited also implementsVisitablein order to properly grant access when the expectedVisitoris received.In the case of a
PolymorphicVisitable, aPolymorphicVisitoris passed instead of aVisitor. APolymorphicVisitoris in fact, a composition ofVisitors and not only a singleVisitor. APolymorphicVisitoris responsible for returning the correctVisitorresponsible for processing a certain data structure.The initial design of pairs made of <
Visitor,Visitable> is extended to a concept of a matrix made of multipleVisitors against multipleVisitables. Every class which implementsPolymorphicVisitablepasses different data structures when queryingPolymorphicVisitors.- Specified by:
acceptin interfacePolymorphicVisitable- Overrides:
acceptin classCoupon- See Also:
PolymorphicVisitor#getVisitor(Class)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG