public class DataTableLinear extends DataTableBasic implements DataTable, Cloneable
DataTableBasic with the capacity to interpolate values between tenor grid nodes, using BiLinearInterpolation
Note that the interpolation is done to the accuracy of the table convention.DataTableBasic.DoubleKeyDataTable.TableConvention| Constructor and Description |
|---|
DataTableLinear(String name,
DataTable.TableConvention convention,
LocalDate referenceDate,
SchedulePrototype scheduleMetaData)
Create an empty table.
|
DataTableLinear(String name,
DataTable.TableConvention convention,
LocalDate referenceDate,
SchedulePrototype scheduleMetaData,
int[] maturities,
int[] terminations,
double[] values)
Create a table.
|
DataTableLinear(String name,
DataTable.TableConvention convention,
LocalDate referenceDate,
SchedulePrototype scheduleMetaData,
List<Integer> maturities,
List<Integer> terminations,
List<Double> values)
Create a table.
|
| Modifier and Type | Method and Description |
|---|---|
DataTableLinear |
clone() |
double |
getValue(double maturity,
double termination)
Returns the value of the table at a given time.
|
double |
getValue(int maturity,
int termination)
Returns the value of the table at a given time.
|
static DataTableLinear |
interpolateDataTable(DataTableBasic baseTable)
Create an interpolated table from a basic table.
|
String |
toString() |
String |
toString(double unit) |
addPoint, addPoints, containsEntryFor, containsEntryFor, getConvention, getMaturities, getMaturitiesForTermination, getName, getReferenceDate, getScheduleMetaData, getTerminations, getTerminationsForMaturity, getValue, size, upgradeDataTableLightequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPoint, addPoints, containsEntryFor, containsEntryFor, exportTable, getConvention, getMaturities, getMaturitiesForTermination, getName, getReferenceDate, getScheduleMetaData, getTerminations, getTerminationsForMaturity, sizepublic DataTableLinear(String name, DataTable.TableConvention convention, LocalDate referenceDate, SchedulePrototype scheduleMetaData)
name - The name of the table.convention - The convention of the table.referenceDate - The referenceDate of the table.scheduleMetaData - The schedule meta data of the table.public DataTableLinear(String name, DataTable.TableConvention convention, LocalDate referenceDate, SchedulePrototype scheduleMetaData, int[] maturities, int[] terminations, double[] values)
name - The name of the table.convention - The convention of the table.referenceDate - The referenceDate of the table.scheduleMetaData - The schedule meta data of the table.maturities - The maturities of the points as offset with respect to the reference date.terminations - The terminations of the points as offset with respect to the maturity date.values - The values at the points.public DataTableLinear(String name, DataTable.TableConvention convention, LocalDate referenceDate, SchedulePrototype scheduleMetaData, List<Integer> maturities, List<Integer> terminations, List<Double> values)
name - The name of the table.convention - The convention of the table.referenceDate - The referenceDate of the table.scheduleMetaData - The schedule meta data of the table.maturities - The maturities of the points as offset with respect to the reference date.terminations - The terminations of the points as offset with respect to the maturity date.values - The values at the points.public static DataTableLinear interpolateDataTable(DataTableBasic baseTable)
baseTable - The table to receive interpolation.public double getValue(int maturity,
int termination)
DataTablegetValue in interface DataTablegetValue in class DataTableBasicmaturity - The maturity as offset with respect to the reference date.termination - The termination as offset with respect to the maturity date.public double getValue(double maturity,
double termination)
DataTablegetValue in interface DataTablegetValue in class DataTableBasicmaturity - Maturity in double as year fraction with respect to reference date.termination - Termination in double as year fraction with respect to reference date.public DataTableLinear clone()
clone in interface DataTableclone in class DataTableBasicpublic String toString()
toString in class DataTableBasicpublic String toString(double unit)
toString in class DataTableBasicCopyright © 2019. All rights reserved.