public class TenorFromArray extends TimeDiscretizationFromArray implements Tenor
TimeDiscretizationFromArray.ShortPeriodLocation
Constructor and Description |
---|
TenorFromArray(double[] timeDiscretization)
Construct a tenor from a time discretization.
|
TenorFromArray(Double[] timeDiscretization)
Construct a tenor from a time discretization.
|
TenorFromArray(double initial,
double last,
double deltaT,
TimeDiscretizationFromArray.ShortPeriodLocation shortPeriodLocation)
Construct a tenor from meta data.
|
TenorFromArray(double initial,
int numberOfTimeSteps,
double deltaT)
Construct a tenor from meta data.
|
TenorFromArray(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, getTickSize, getTime, getTimeIndex, getTimeIndexNearestGreaterOrEqual, getTimeIndexNearestLessOrEqual, getTimeShiftedTimeDiscretization, getTimeStep, hashCode, intersect, iterator, union
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public TenorFromArray(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 TenorFromArray(double[] timeDiscretization)
timeDiscretization
- A time discretization.public TenorFromArray(Double[] timeDiscretization)
timeDiscretization
- A time discretization.public TenorFromArray(double initial, int numberOfTimeSteps, double deltaT)
initial
- First discretization point.numberOfTimeSteps
- Number of time steps.deltaT
- Time step size.public TenorFromArray(double initial, double last, double deltaT, TimeDiscretizationFromArray.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 Tenor
public LocalDate getDate(int timeIndex)
Tenor
public double getDaycountFraction(int timeIndex)
Tenor
getDaycountFraction
in interface Tenor
timeIndex
- Time indexpublic String toString()
toString
in class TimeDiscretizationFromArray
Copyright © 2020. All rights reserved.