Class FixedRateBondHelper
- java.lang.Object
-
- org.jquantlib.termstructures.BootstrapHelper<YieldTermStructure>
-
- org.jquantlib.termstructures.RateHelper
-
- org.jquantlib.termstructures.yieldcurves.FixedRateBondHelper
-
- All Implemented Interfaces:
- Observable, Observer, PolymorphicVisitable
public class FixedRateBondHelper extends RateHelper
Fixed-coupon bond helperWARNING: This class assumes that the reference date does not change between calls of setTermStructure()
-
-
Constructor Summary
Constructors Constructor and Description FixedRateBondHelper(Handle<Quote> cleanPrice, FixedRateBond bond){@literal WARNING: Setting a pricing engine to the passed bond from external code will cause the bootstrap to fail or to give wrong results.FixedRateBondHelper(Handle<Quote> cleanPrice, int settlementDays, double faceAmount, Schedule schedule, double[] coupons, DayCounter dayCounter)FixedRateBondHelper(Handle<Quote> cleanPrice, int settlementDays, double faceAmount, Schedule schedule, double[] coupons, DayCounter dayCounter, BusinessDayConvention paymentConvention, double redemption, Date issueDate)
-
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)FixedRateBondbond()doubleimpliedQuote()voidsetTermStructure(YieldTermStructure t)-
Methods inherited from class org.jquantlib.termstructures.BootstrapHelper
addObserver, countObservers, deleteObserver, deleteObservers, earliestDate, getObservers, latestDate, notifyObservers, notifyObservers, quoteError, quoteIsValid, update
-
-
-
-
Constructor Detail
-
FixedRateBondHelper
public FixedRateBondHelper(Handle<Quote> cleanPrice, int settlementDays, double faceAmount, Schedule schedule, double[] coupons, DayCounter dayCounter)
- Parameters:
cleanPrice-settlementDays-faceAmount-schedule-coupons-dayCounter-paymentConvention:- default value = BusinessDayConvention.Followingredemption:- default value = 100issueDate:- default: new Date()
-
FixedRateBondHelper
public FixedRateBondHelper(Handle<Quote> cleanPrice, int settlementDays, double faceAmount, Schedule schedule, double[] coupons, DayCounter dayCounter, BusinessDayConvention paymentConvention, double redemption, Date issueDate)
- Parameters:
cleanPrice-settlementDays-faceAmount-schedule-coupons-dayCounter-paymentConvention-redemption-issueDate-
-
FixedRateBondHelper
public FixedRateBondHelper(Handle<Quote> cleanPrice, FixedRateBond bond)
WARNING: Setting a pricing engine to the passed bond from external code will cause the bootstrap to fail or to give wrong results. It is advised to discard the bond after creating the helper, so that the helper has sole ownership of it.- Parameters:
cleanPrice-bond-
-
-
Method Detail
-
bond
public FixedRateBond bond()
-
setTermStructure
public void setTermStructure(YieldTermStructure t)
- Overrides:
setTermStructurein classBootstrapHelper<YieldTermStructure>
-
impliedQuote
public double impliedQuote()
- Specified by:
impliedQuotein classBootstrapHelper<YieldTermStructure>
-
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 classBootstrapHelper<YieldTermStructure>- See Also:
PolymorphicVisitor#getVisitor(Class)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG