public class DiscountCurveNelsonSiegelSvensson extends AbstractCurve implements Serializable, DiscountCurve
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,
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.
|
CurveBuilder |
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(AnalyticModel 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(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.
|
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, getValues
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getReferenceDate, getValue
public DiscountCurveNelsonSiegelSvensson(String name, LocalDate referenceDate, double[] parameter, double timeScaling)
name
- The name of the curve (the curve can be referenced under this name, if added to an AnalyticModelFromCuvesAndVols
.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(AnalyticModel, double)
.public double getDiscountFactor(double maturity)
DiscountCurve
getDiscountFactor
in interface DiscountCurve
maturity
- The maturity for which the discount factor is requested.public double getDiscountFactor(AnalyticModel model, double maturity)
getDiscountFactor
in interface DiscountCurve
model
- 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.DiscountCurve.getDiscountFactor(net.finmath.marketdata.model.AnalyticModel, double)
public double getValue(AnalyticModel model, double time)
Curve
public double getZeroRate(double maturity)
maturity
- The given maturity.public double[] getZeroRates(double[] maturities)
maturities
- The given maturities.public CurveBuilder getCloneBuilder()
Curve
getCloneBuilder
in interface Curve
public double[] getParameter()
ParameterObject
getParameter
in interface ParameterObject
@Deprecated public void setParameter(double[] parameter)
ParameterObject
setParameter
in interface ParameterObject
parameter
- The parameter associated with the new state of the objects.public double getTimeScaling()
public DiscountCurveNelsonSiegelSvensson clone() throws CloneNotSupportedException
Curve
clone
in interface Curve
clone
in class AbstractCurve
CloneNotSupportedException
- Thrown, when the curve could not be cloned.public DiscountCurveNelsonSiegelSvensson getCloneForParameter(double[] value) throws CloneNotSupportedException
ParameterObject
getCloneForParameter
in interface ParameterObject
getCloneForParameter
in interface Curve
getCloneForParameter
in class AbstractCurve
value
- The new parameter.CloneNotSupportedException
- Thrown, when the curve could not be cloned.public String toString()
toString
in class AbstractCurve
Copyright © 2019. All rights reserved.