public class DiscountCurveNelsonSiegelSvensson extends AbstractCurve implements Serializable, DiscountCurveInterface
T = timeScaling * t, where t is the maturity as an ACT/365
year fraction from the given reference date.| Constructor and Description |
|---|
DiscountCurveNelsonSiegelSvensson(String name,
java.time.LocalDate referenceDate,
double[] parameter,
double timeScaling)
Create a discount curve using a Nelson-Siegel-Svensson parametrization.
|
| Modifier and Type | Method and Description |
|---|---|
DiscountCurveNelsonSiegelSvensson |
clone()
Create a deep copied clone.
|
CurveBuilderInterface |
getCloneBuilder()
Returns a curve builder bases on a clone of this curve.
|
DiscountCurveNelsonSiegelSvensson |
getCloneForParameter(double[] value)
Create a clone with a modified parameter.
|
double |
getDiscountFactor(AnalyticModelInterface model,
double maturity)
Return the discount factor within a given model context for a given maturity.
|
double |
getDiscountFactor(double maturity)
Returns the discount factor for the corresponding maturity.
|
double[] |
getParameter()
Get the current parameter associated with the state of the objects.
|
double |
getTimeScaling() |
double |
getValue(AnalyticModelInterface 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.
|
double |
getZeroRate(double maturity)
Returns the zero rate for a given maturity, i.e., -ln(df(T)) / T where T is the given maturity and df(T) is
the discount factor at time $T$.
|
double[] |
getZeroRates(double[] maturities)
Returns the zero rates for a given vector maturities.
|
void |
setParameter(double[] parameter)
Deprecated.
|
String |
toString() |
getName, getReferenceDate, getValue, getValuesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getReferenceDate, getValuepublic DiscountCurveNelsonSiegelSvensson(String name, java.time.LocalDate referenceDate, double[] parameter, double timeScaling)
name - The name of the curve (the curve can be referenced under this name, if added to an AnalyticModel.referenceDate - The reference date of this curve, i.e. the date associated with t=0.parameter - The Nelson-Siegel-Svensson parameters in the order \( ( \beta_0, \beta_1, \beta_2, \beta_3, \tau_0, \tau_1 ) \).timeScaling - The time parameter argument rescaling. See getDiscountFactor(AnalyticModelInterface, double).public double getDiscountFactor(double maturity)
DiscountCurveInterfacegetDiscountFactor in interface DiscountCurveInterfacematurity - The maturity for which the discount factor is requested.public double getDiscountFactor(AnalyticModelInterface model, double maturity)
getDiscountFactor in interface DiscountCurveInterfacemodel - The model used as a context (not required for this class).maturity - The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.DiscountCurveInterface.getDiscountFactor(net.finmath.marketdata.model.AnalyticModelInterface, double)public double getValue(AnalyticModelInterface model, double time)
CurveInterfacegetValue in interface CurveInterfacemodel - An analytic model providing a context.time - Time for which the value should be returned.public double getZeroRate(double maturity)
maturity - The given maturity.public double[] getZeroRates(double[] maturities)
maturities - The given maturities.public CurveBuilderInterface getCloneBuilder() throws CloneNotSupportedException
CurveInterfacegetCloneBuilder in interface CurveInterfaceCloneNotSupportedException - Thrown, when this curve could not be cloned.public double[] getParameter()
ParameterObjectInterfacegetParameter in interface ParameterObjectInterface@Deprecated public void setParameter(double[] parameter)
ParameterObjectInterfacesetParameter in interface ParameterObjectInterfaceparameter - The parameter associated with the new state of the objects.public double getTimeScaling()
public DiscountCurveNelsonSiegelSvensson clone() throws CloneNotSupportedException
CurveInterfaceclone in interface CurveInterfaceclone in class AbstractCurveCloneNotSupportedException - Thrown, when the curve could not be cloned.public DiscountCurveNelsonSiegelSvensson getCloneForParameter(double[] value) throws CloneNotSupportedException
ParameterObjectInterfacegetCloneForParameter in interface ParameterObjectInterfacegetCloneForParameter in interface CurveInterfacegetCloneForParameter in class AbstractCurvevalue - The new parameter.CloneNotSupportedException - Thrown, when the curve could not be cloned.public String toString()
toString in class AbstractCurveCopyright © 2017. All rights reserved.