public class Tenor extends TimeDiscretization implements TenorInterface
TimeDiscretization.ShortPeriodLocation
Constructor and Description |
---|
Tenor(double[] timeDiscretization)
Construct a tenor from a time discretization.
|
Tenor(Double[] timeDiscretization)
Construct a tenor from a time discretization.
|
Tenor(double initial,
double last,
double deltaT,
TimeDiscretization.ShortPeriodLocation shortPeriodLocation)
Construct a tenor from meta data.
|
Tenor(double initial,
int numberOfTimeSteps,
double deltaT)
Construct a tenor from meta data.
|
Tenor(LocalDate[] dates,
LocalDate referenceDate) |
Modifier and Type | Method and Description |
---|---|
LocalDate |
getDate(int timeIndex)
Returns the date for the given time index.
|
double |
getDaycountFraction(int timeIndex)
Returns the day count fraction for the period form timeIndex to to timeIndex+1.
|
LocalDate |
getReferenceDate() |
String |
toString() |
equals, getAsArrayList, getAsDoubleArray, getNumberOfTimes, getNumberOfTimeSteps, getTime, getTimeIndex, getTimeIndexNearestGreaterOrEqual, getTimeIndexNearestLessOrEqual, getTimeShiftedTimeDiscretization, getTimeStep, hashCode, iterator
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Tenor(LocalDate[] dates, LocalDate referenceDate)
dates
- A set of dates.referenceDate
- The reference date, which defines t=0 with respect to the internal double representation.public Tenor(double[] timeDiscretization)
timeDiscretization
- A time discretization.public Tenor(Double[] timeDiscretization)
timeDiscretization
- A time discretization.public Tenor(double initial, int numberOfTimeSteps, double deltaT)
initial
- First discretization point.numberOfTimeSteps
- Number of time steps.deltaT
- Time step size.public Tenor(double initial, double last, double deltaT, TimeDiscretization.ShortPeriodLocation shortPeriodLocation)
initial
- First discretization point.last
- Last time steps.deltaT
- Time step size.shortPeriodLocation
- Placement of the stub period.public LocalDate getReferenceDate()
getReferenceDate
in interface TenorInterface
public LocalDate getDate(int timeIndex)
TenorInterface
getDate
in interface TenorInterface
timeIndex
- Time indexpublic double getDaycountFraction(int timeIndex)
TenorInterface
getDaycountFraction
in interface TenorInterface
timeIndex
- Time indexpublic String toString()
toString
in class TimeDiscretization
Copyright © 2017. All rights reserved.