public class CurveInterpolation extends AbstractCurve implements Serializable, Cloneable
CurveInterpolation.InterpolationMethod.
For the extrapolation methods provided see CurveInterpolation.ExtrapolationMethod.
For the possible interpolation entities see CurveInterpolation.InterpolationEntity.
To construct the curveFromInterpolationPoints, please use the inner class CurveBuilder (a builder pattern).
For a demo on how to construct and/or calibrate a curveFromInterpolationPoints see, e.g.
net.finmath.tests.marketdata.curves.CurveTest.| Modifier and Type | Class and Description |
|---|---|
static class |
CurveInterpolation.Builder
A builder (following the builder pattern) for CurveFromInterpolationPoints objects.
|
static class |
CurveInterpolation.ExtrapolationMethod
Possible extrapolation methods.
|
static class |
CurveInterpolation.InterpolationEntity
Possible interpolation entities.
|
static class |
CurveInterpolation.InterpolationMethod
Possible interpolation methods.
|
| Modifier | Constructor and Description |
|---|---|
protected |
CurveInterpolation(String name,
LocalDate referenceDate,
CurveInterpolation.InterpolationMethod interpolationMethod,
CurveInterpolation.ExtrapolationMethod extrapolationMethod,
CurveInterpolation.InterpolationEntity interpolationEntity)
Create a curveFromInterpolationPoints with a given name, reference date and an interpolation method.
|
|
CurveInterpolation(String name,
LocalDate referenceDate,
CurveInterpolation.InterpolationMethod interpolationMethod,
CurveInterpolation.ExtrapolationMethod extrapolationMethod,
CurveInterpolation.InterpolationEntity interpolationEntity,
double[] times,
RandomVariable[] values)
Create a curveFromInterpolationPoints with a given name, reference date and an interpolation method from given points
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPoint(double time,
RandomVariable value,
boolean isParameter)
Add a point to this curveFromInterpolationPoints.
|
CurveInterpolation |
clone()
Create a deep copied clone.
|
CurveBuilder |
getCloneBuilder()
Returns a curve builder bases on a clone of this curve.
|
Curve |
getCloneForParameter(RandomVariable[] parameter)
Create a clone with a modified parameter.
|
CurveInterpolation.ExtrapolationMethod |
getExtrapolationMethod()
Returns the extrapolation method used by this curveFromInterpolationPoints.
|
CurveInterpolation.InterpolationEntity |
getInterpolationEntity()
Returns the interpolation entity used by this curveFromInterpolationPoints.
|
CurveInterpolation.InterpolationMethod |
getInterpolationMethod()
Returns the interpolation method used by this curveFromInterpolationPoints.
|
RandomVariable[] |
getParameter()
Get the current parameter associated with the state of the objects.
|
protected int |
getParameterIndex(double time) |
protected int |
getTimeIndex(double time) |
RandomVariable |
getValue(AnalyticModel model,
double time)
Returns the value for the time using the interpolation method associated with this curve
within a given context, i.e., a model.
|
RandomVariable |
getValue(double time)
Returns the value for the time using the interpolation method associated with this curve.
|
void |
setParameter(RandomVariable[] parameter)
Set the current parameter and change the state of the objects.
|
String |
toString() |
getName, getReferenceDate, getValuespublic CurveInterpolation(String name, LocalDate referenceDate, CurveInterpolation.InterpolationMethod interpolationMethod, CurveInterpolation.ExtrapolationMethod extrapolationMethod, CurveInterpolation.InterpolationEntity interpolationEntity, double[] times, RandomVariable[] values)
name - The name of this curveFromInterpolationPoints.referenceDate - The reference date for this curveFromInterpolationPoints, i.e., the date which defined t=0.interpolationMethod - The interpolation method used for the curveFromInterpolationPoints.extrapolationMethod - The extrapolation method used for the curveFromInterpolationPoints.interpolationEntity - The entity interpolated/extrapolated.times - A vector of times.values - A vector of corresponding values.protected CurveInterpolation(String name, LocalDate referenceDate, CurveInterpolation.InterpolationMethod interpolationMethod, CurveInterpolation.ExtrapolationMethod extrapolationMethod, CurveInterpolation.InterpolationEntity interpolationEntity)
name - The name of this curveFromInterpolationPoints.referenceDate - The reference date for this curveFromInterpolationPoints, i.e., the date which defined t=0.interpolationMethod - The interpolation method used for the curveFromInterpolationPoints.extrapolationMethod - The extrapolation method used for the curveFromInterpolationPoints.interpolationEntity - The entity interpolated/extrapolated.public RandomVariable getValue(double time)
CurvegetValue in interface CurvegetValue in class AbstractCurvetime - Time for which the value should be returned.public RandomVariable getValue(AnalyticModel model, double time)
Curveprotected void addPoint(double time,
RandomVariable value,
boolean isParameter)
time - The xi in i = f(xi).value - The yi in i = f(xi).isParameter - If true, then this point is served via getParameter() and changed via getCloneForParameter(RandomVariable[]), i.e., it can be calibrated.public CurveInterpolation.InterpolationMethod getInterpolationMethod()
public CurveInterpolation.ExtrapolationMethod getExtrapolationMethod()
public CurveInterpolation.InterpolationEntity getInterpolationEntity()
protected int getTimeIndex(double time)
protected int getParameterIndex(double time)
public RandomVariable[] getParameter()
ParameterObjectgetParameter in interface ParameterObjectpublic void setParameter(RandomVariable[] parameter)
ParameterObjectsetParameter in interface ParameterObjectparameter - The parameter associated with the new state of the objects.public CurveInterpolation clone() throws CloneNotSupportedException
Curveclone in interface Curveclone in class AbstractCurveCloneNotSupportedException - Thrown, when the curve could not be cloned.public Curve getCloneForParameter(RandomVariable[] parameter) throws CloneNotSupportedException
ParameterObjectgetCloneForParameter in interface ParameterObjectgetCloneForParameter in interface CurvegetCloneForParameter in class AbstractCurveparameter - The new parameter.CloneNotSupportedException - Thrown, when the curve could not be cloned.public CurveBuilder getCloneBuilder() throws CloneNotSupportedException
CurvegetCloneBuilder in interface CurveCloneNotSupportedException - Thrown, when this curve could not be cloned.public String toString()
toString in class AbstractCurveCopyright © 2019. All rights reserved.