Documentation of 'net.finmath.marketdata.model.curves.DiscountCurveNelsonSiegelSvensson' Java class
DiscountCurveNelsonSiegelSvensson
net.finmath.marketdata.model.curves

Class DiscountCurveNelsonSiegelSvensson

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, ParameterObjectInterface, CurveInterface, DiscountCurveInterface


    public class DiscountCurveNelsonSiegelSvensson
    extends AbstractCurve
    implements java.io.Serializable, DiscountCurveInterface
    Implementation of a discount factor curve given by a Nelson-Siegel-Svensson (NSS) parameterization. In the NSS parameterization the zero rate \( r(T) \) is given by \[ r(T) = \beta_0 + \beta_1 \frac{1-x_0}{T/\tau_0} + \beta_2 ( \frac{1-x_0}{T/\tau_0} - x_0) + \beta_3 ( \frac{1-x_1}{T/\tau_1} - x_1) \] where \( x_0 = \exp(-T/\tau_0) \) and \( x_1 = \exp(-T/\tau_1) \). The sub-family of curves with \( \beta_3 = 0 \) is called Nelson-Siegel parameterization. Note: This is a time-parameterized model. The finmath lib library uses an internal mapping from date to times \( t \). This mapping does not necessarily need to correspond with the curves understanding for the parameter \( T \). For that reason this class allows to re-scale the time parameter. Currently only a simple re-scaling factor is supported. The parameter T used in the parameterization is given by T = timeScaling * t, where t is the maturity as an ACT/365 year fraction from the given reference date.
    See Also:
    Serialized Form
    • Constructor Detail

      • DiscountCurveNelsonSiegelSvensson

        public DiscountCurveNelsonSiegelSvensson(java.lang.String name,
                                                 java.util.Calendar referenceDate,
                                                 double[] parameter,
                                                 double timeScaling)
        Create a discount curve using a Nelson-Siegel-Svensson parametrization.
        Parameters:
        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).
    • Method Detail

      • getDiscountFactor

        public double getDiscountFactor(double maturity)
        Description copied from interface: DiscountCurveInterface
        Returns the discount factor for the corresponding maturity. This getter is not optimized for performance.
        Specified by:
        getDiscountFactor in interface DiscountCurveInterface
        Parameters:
        maturity - The maturity for which the discount factor is requested.
        Returns:
        The discount factor (i.e., price of the zero coupon bond with given maturity and notional 1.
      • getValue

        public double getValue(AnalyticModelInterface model,
                               double time)
        Description copied from interface: CurveInterface
        Returns the value for the time using the interpolation method associated with this curve within a given context, i.e., a model. The model (context) is needed only if the curve relies on another curve. Examples are a forward curve which relies on a discount curve or a discount curve which is defined via a spread over another curve.
        Specified by:
        getValue in interface CurveInterface
        Parameters:
        model - An analytic model providing a context.
        time - Time for which the value should be returned.
        Returns:
        The value at the give time.
      • getCloneBuilder

        public CurveBuilderInterface getCloneBuilder()
                                              throws java.lang.CloneNotSupportedException
        Description copied from interface: CurveInterface
        Returns a curve builder bases on a clone of this curve. Using that curve builder you may create a new curve from this curve by adding points or changing properties. Note: The clone has the same name than this one.
        Specified by:
        getCloneBuilder in interface CurveInterface
        Returns:
        An object implementing the CurveBuilderInterface where the underlying curve is a clone of this curve.
        Throws:
        java.lang.CloneNotSupportedException - Thrown, when this curve could not be cloned.
      • setParameter

        @Deprecated
        public void setParameter(double[] parameter)
        Deprecated. 
        Description copied from interface: ParameterObjectInterface
        Set the current parameter and change the state of the objects.
        Specified by:
        setParameter in interface ParameterObjectInterface
        Parameters:
        parameter - The parameter associated with the new state of the objects.
      • getTimeScaling

        public double getTimeScaling()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.