- All Known Implementing Classes:
RegularSchedule
,ScheduleFromPeriods
Interface of a schedule of interest rate periods with
a fixing and payment.
The periods have two representations: one a
Period
which contains LocalDate
dates and
an alternative representation using doubles.
Within a schedule, the mapping from doubles to dates is one to one.- Version:
- 1.0
- Author:
- Christian Fries
-
Method Summary
Modifier and TypeMethodDescriptionReturns the daycount convention used to calculate period lengths.double
getFixing(int periodIndex)
Return the fixing converted to the internal daycounting relative to the schedules reference date.int
Returns the number of periods.double
getPayment(int periodIndex)
Return the payment date converted to the internal daycounting relative to the schedules reference date.getPeriod(int periodIndex)
Return the period for a given period index.double
getPeriodEnd(int periodIndex)
Return the period end date converted to the internal daycounting relative to the schedules reference date.int
getPeriodIndex(double time)
Return the index of the period which contains the given time point.int
getPeriodIndex(LocalDate date)
Return the index of the period which contains the given date.double
getPeriodLength(int periodIndex)
Return the period length for a given period index.Returns the array of periods.double
getPeriodStart(int periodIndex)
Return the period start date converted to the internal daycounting relative to the schedules reference date.Returns the reference data of this schedule.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getReferenceDate
LocalDate getReferenceDate()Returns the reference data of this schedule. The reference date is only used to convert dates to doubles using and internal daycount conventions (ACT/365) which does not need to agree with the daycount convention used to calculate period length.- Returns:
- The reference data of this schedule corresponding to t=0.
-
getPeriods
Returns the array of periods.- Returns:
- The array of periods.
-
getDaycountconvention
DayCountConvention getDaycountconvention()Returns the daycount convention used to calculate period lengths.- Returns:
- The daycount convention used to calculate period lengths.
-
getNumberOfPeriods
int getNumberOfPeriods()Returns the number of periods.- Returns:
- The number of periods.
-
getPeriod
Return the period for a given period index.- Parameters:
periodIndex
- A given period index.- Returns:
- The period for the given period index.
-
getFixing
double getFixing(int periodIndex)Return the fixing converted to the internal daycounting relative to the schedules reference date.- Parameters:
periodIndex
- A given period index.- Returns:
- The fixing converted to the internal daycounting relative to the schedules reference date.
-
getPayment
double getPayment(int periodIndex)Return the payment date converted to the internal daycounting relative to the schedules reference date.- Parameters:
periodIndex
- A given period index.- Returns:
- The payment date converted to the internal daycounting relative to the schedules reference date.
-
getPeriodStart
double getPeriodStart(int periodIndex)Return the period start date converted to the internal daycounting relative to the schedules reference date.- Parameters:
periodIndex
- A given period index.- Returns:
- The period start date converted to the internal daycounting relative to the schedules reference date.
-
getPeriodEnd
double getPeriodEnd(int periodIndex)Return the period end date converted to the internal daycounting relative to the schedules reference date.- Parameters:
periodIndex
- A given period index.- Returns:
- The period end date converted to the internal daycounting relative to the schedules reference date.
-
getPeriodLength
double getPeriodLength(int periodIndex)Return the period length for a given period index.- Parameters:
periodIndex
- A given period index.- Returns:
- The period length for a given period index.
-
getPeriodIndex
int getPeriodIndex(double time)Return the index of the period which contains the given time point.- Parameters:
time
- A given time.- Returns:
- The period index of the .
-
getPeriodIndex
Return the index of the period which contains the given date.- Parameters:
date
- A given date.- Returns:
- The period index of the .
-