Class AbstractYieldTermStructure
- java.lang.Object
-
- org.jquantlib.termstructures.AbstractTermStructure
-
- org.jquantlib.termstructures.AbstractYieldTermStructure
-
- All Implemented Interfaces:
- Extrapolator, TermStructure, YieldTermStructure, Observable, Observer
- Direct Known Subclasses:
- FlatForward, ForwardRateStructure, ImpliedTermStructure, InterpolatedDiscountCurve, ZeroYieldStructure
public abstract class AbstractYieldTermStructure extends AbstractTermStructure implements YieldTermStructure
This abstract class defines the interface of concrete rate structures which will be derived from this one.Rates are assumed to be annual continuous compounding.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublediscount(Date d)Returns the discount factor for a given date or time.doublediscount(Date d, boolean extrapolate)Returns the discount factor for a given date or time.doublediscount(double t)Returns the discount factor for a given date or time.doublediscount(double t, boolean extrapolate)Returns the discount factor for a given date or time.InterestRateforwardRate(Date d1, Date d2, DayCounter resultDayCounter, Compounding comp)Returns the implied forward interest rate between two dates or times.InterestRateforwardRate(Date d1, Date d2, DayCounter resultDayCounter, Compounding comp, Frequency freq)Returns the implied forward interest rate between two dates or times.InterestRateforwardRate(Date d1, Date d2, DayCounter dayCounter, Compounding comp, Frequency freq, boolean extrapolate)Returns the implied forward interest rate between two dates or times.InterestRateforwardRate(Date d, Period p, DayCounter resultDayCounter, Compounding comp, Frequency freq)Returns the implied forward interest rate between two dates or times.InterestRateforwardRate(Date d, Period p, DayCounter dayCounter, Compounding comp, Frequency freq, boolean extrapolate)InterestRateforwardRate(double t1, double t2, Compounding comp)Returns the implied forward interest rate between two dates or times.InterestRateforwardRate(double t1, double t2, Compounding comp, Frequency freq)Returns the implied forward interest rate between two dates or times.InterestRateforwardRate(double time1, double time2, Compounding comp, Frequency freq, boolean extrapolate)Returns the implied forward interest rate between two dates or times.doubleparRate(Date[] dates, Frequency freq, boolean extrapolate)Returns the implied par rate for a given sequence of payments at the given dates or times.doubleparRate(double[] times, Frequency frequency, boolean extrapolate)Returns the implied par rate for a given sequence of payments at the given dates or times.doubleparRate(int tenor, Date startDate, Frequency freq, boolean extrapolate)Returns the implied par rate for a given sequence of payments at the given dates or times.InterestRatezeroRate(Date d, DayCounter resultDayCounter, Compounding comp)Return the implied zero-yield rate for a given date or time.InterestRatezeroRate(Date d, DayCounter resultDayCounter, Compounding comp, Frequency freq)Return the implied zero-yield rate for a given date or time.InterestRatezeroRate(Date d, DayCounter dayCounter, Compounding comp, Frequency freq, boolean extrapolate)Return the implied zero-yield rate for a given date or time.InterestRatezeroRate(double time, Compounding comp, Frequency freq, boolean extrapolate)Return the implied zero-yield rate for a given date or time.-
Methods inherited from class org.jquantlib.termstructures.AbstractTermStructure
addObserver, allowsExtrapolation, calendar, countObservers, dayCounter, deleteObserver, deleteObservers, disableExtrapolation, enableExtrapolation, getObservers, maxTime, notifyObservers, notifyObservers, referenceDate, settlementDays, timeFromReference, update
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jquantlib.termstructures.TermStructure
calendar, dayCounter, maxDate, maxTime, referenceDate, settlementDays, timeFromReference
-
Methods inherited from interface org.jquantlib.math.interpolations.Extrapolator
allowsExtrapolation, disableExtrapolation, enableExtrapolation
-
Methods inherited from interface org.jquantlib.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, getObservers, notifyObservers, notifyObservers
-
-
-
-
Method Detail
-
zeroRate
public final InterestRate zeroRate(Date d, DayCounter resultDayCounter, Compounding comp)
Description copied from interface:YieldTermStructureReturn the implied zero-yield rate for a given date or time. In the former case, the time is calculated as a fraction of year from the reference date.The resulting interest rate has the required day-counting rule.
- Specified by:
zeroRatein interfaceYieldTermStructure
-
zeroRate
public final InterestRate zeroRate(Date d, DayCounter resultDayCounter, Compounding comp, Frequency freq)
Description copied from interface:YieldTermStructureReturn the implied zero-yield rate for a given date or time. In the former case, the time is calculated as a fraction of year from the reference date.The resulting interest rate has the required day-counting rule.
- Specified by:
zeroRatein interfaceYieldTermStructure
-
zeroRate
public final InterestRate zeroRate(Date d, DayCounter dayCounter, Compounding comp, Frequency freq, boolean extrapolate)
Description copied from interface:YieldTermStructureReturn the implied zero-yield rate for a given date or time. In the former case, the time is calculated as a fraction of year from the reference date.The resulting interest rate has the required day-counting rule.
- Specified by:
zeroRatein interfaceYieldTermStructure
-
zeroRate
public InterestRate zeroRate(double time, Compounding comp, Frequency freq, boolean extrapolate)
Description copied from interface:YieldTermStructureReturn the implied zero-yield rate for a given date or time. In the former case, the time is calculated as a fraction of year from the reference date.The resulting interest rate has the same day-counting rule used by the term structure. The same rule should be used for calculating the passed double t.
- Specified by:
zeroRatein interfaceYieldTermStructure
-
forwardRate
public InterestRate forwardRate(Date d1, Date d2, DayCounter resultDayCounter, Compounding comp)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.Dates are not adjusted for holidays
- Specified by:
forwardRatein interfaceYieldTermStructure
-
forwardRate
public InterestRate forwardRate(Date d1, Date d2, DayCounter resultDayCounter, Compounding comp, Frequency freq)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.- Specified by:
forwardRatein interfaceYieldTermStructure- See Also:
YieldTermStructure.forwardRate(Date, Date, DayCounter, Compounding)
-
forwardRate
public InterestRate forwardRate(Date d1, Date d2, DayCounter dayCounter, Compounding comp, Frequency freq, boolean extrapolate)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.- Specified by:
forwardRatein interfaceYieldTermStructure- See Also:
YieldTermStructure.forwardRate(Date, Date, DayCounter, Compounding)
-
forwardRate
public InterestRate forwardRate(double t1, double t2, Compounding comp)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.- Specified by:
forwardRatein interfaceYieldTermStructure- See Also:
YieldTermStructure#forwardRate(Date, Date, DayCounter, org.jquantlib.termstructures.InterestRate.Compounding, Frequency)
-
forwardRate
public InterestRate forwardRate(double t1, double t2, Compounding comp, Frequency freq)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.- Specified by:
forwardRatein interfaceYieldTermStructure- See Also:
YieldTermStructure#forwardRate(Date, Date, DayCounter, org.jquantlib.termstructures.InterestRate.Compounding, Frequency)
-
forwardRate
public InterestRate forwardRate(double time1, double time2, Compounding comp, Frequency freq, boolean extrapolate)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.The resulting interest rate has the same day-counting rule used by the term structure. The same rule should be used for the calculating the passed times t1 and t2.
- Specified by:
forwardRatein interfaceYieldTermStructure
-
forwardRate
public InterestRate forwardRate(Date d, Period p, DayCounter resultDayCounter, Compounding comp, Frequency freq)
Description copied from interface:YieldTermStructureReturns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. The resulting interest rate has the required day-counting rule.- Specified by:
forwardRatein interfaceYieldTermStructure- See Also:
YieldTermStructure.forwardRate(Date, Date, DayCounter, Compounding)
-
forwardRate
public InterestRate forwardRate(Date d, Period p, DayCounter dayCounter, Compounding comp, Frequency freq, boolean extrapolate)
- Specified by:
forwardRatein interfaceYieldTermStructure- See Also:
YieldTermStructure.forwardRate(Date, Date, DayCounter, Compounding)
-
discount
public double discount(Date d)
Description copied from interface:YieldTermStructureReturns the discount factor for a given date or time. In the former case, the double is calculated as a fraction of year from the reference date.- Specified by:
discountin interfaceYieldTermStructure
-
discount
public double discount(Date d, boolean extrapolate)
Description copied from interface:YieldTermStructureReturns the discount factor for a given date or time. In the former case, the double is calculated as a fraction of year from the reference date.- Specified by:
discountin interfaceYieldTermStructure- See Also:
org.jquantlib.termstructures.YieldTermStructureImpl#discount(org.jquantlib.time.Date, boolean)
-
discount
public double discount(double t)
Description copied from interface:YieldTermStructureReturns the discount factor for a given date or time. In the former case, the double is calculated as a fraction of year from the reference date.The same day-counting rule used by the term structure should be used for calculating the passed double t.
- Specified by:
discountin interfaceYieldTermStructure
-
discount
public double discount(double t, boolean extrapolate)Description copied from interface:YieldTermStructureReturns the discount factor for a given date or time. In the former case, the double is calculated as a fraction of year from the reference date.- Specified by:
discountin interfaceYieldTermStructure- See Also:
org.jquantlib.termstructures.YieldTermStructureImpl#discount(double, boolean)
-
parRate
public double parRate(int tenor, Date startDate, Frequency freq, boolean extrapolate)Description copied from interface:YieldTermStructureReturns the implied par rate for a given sequence of payments at the given dates or times. In the former case, times are calculated as fractions of year from the reference date.- Specified by:
parRatein interfaceYieldTermStructure
-
parRate
public double parRate(Date[] dates, Frequency freq, boolean extrapolate)
Description copied from interface:YieldTermStructureReturns the implied par rate for a given sequence of payments at the given dates or times. In the former case, times are calculated as fractions of year from the reference date.- Specified by:
parRatein interfaceYieldTermStructure- Returns:
- the first date in the vector must equal the start date; the following dates must equal the payment dates.
- See Also:
YieldTermStructure.parRate(int, Date, Frequency, boolean)
-
parRate
public double parRate(double[] times, Frequency frequency, boolean extrapolate)Description copied from interface:YieldTermStructureReturns the implied par rate for a given sequence of payments at the given dates or times. In the former case, times are calculated as fractions of year from the reference date.- Specified by:
parRatein interfaceYieldTermStructure- Returns:
- the first double in the vector must equal the start time; the following times must equal the payment times.
- See Also:
YieldTermStructure.parRate(int, Date, Frequency, boolean)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG