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

Class ForwardCurveFromDiscountCurve

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


    public class ForwardCurveFromDiscountCurve
    extends AbstractForwardCurve
    implements java.io.Serializable
    A forward curve derived from a given discount curve. The forward with fixing in \( t \) is calculated as \( (\frac{1}{d} ( \frac{df(t)}{df(t+d)}-1 ) \) where \( d \) is a given the payment offset and \( t \mapsto df(t) \) is the given discount curve. The discount curve is reference by names and evaluated late (which allows use of this construct in a calibration process referencing changing discount curves.
    See Also:
    Serialized Form
    • Constructor Detail

      • ForwardCurveFromDiscountCurve

        public ForwardCurveFromDiscountCurve(java.lang.String name,
                                             java.lang.String discountCurveName,
                                             java.util.Calendar referenceDate,
                                             java.lang.String paymentOffsetCode,
                                             BusinessdayCalendarInterface paymentOffsetBusinessdayCalendar,
                                             BusinessdayCalendarInterface.DateRollConvention paymentOffsetDateRollConvention,
                                             double daycountScaling,
                                             double periodOffset)
        Create a forward curve using a given discount curve. The forward with fixing in t is calculated as ( df(t)/df(t+p)-1 ) / p where df denotes the discount factor as a function of maturity and p is a given the payment offset. The date t + p is generated from the paymentOffsetCode using the provided paymentOffsetBusinessdayCalendar and paymentOffsetDateRollConvention.
        Parameters:
        name - The name under which the forward curve can be referenced.
        discountCurveName - The discount curve used for calculation of the forward.
        referenceDate - The reference date used in the interpretation of times (i.e., the referenceDate where t=0).
        paymentOffsetCode - The payment offset. If null, the parameter p has to be provided to the getForward method.
        paymentOffsetBusinessdayCalendar - The calendar used to generate the payment date from the paymentOffetCode.
        paymentOffsetDateRollConvention - The date roll convention used to generate the payment date from the paymentOffsetCode.
        daycountScaling - The scaling factor applied to the paymentOffset measured in ACT/365.
        periodOffset - An offset in ACT/365 applied to the fixing to construct the period start (the negative of the fixingOffset of the period).
      • ForwardCurveFromDiscountCurve

        public ForwardCurveFromDiscountCurve(java.lang.String name,
                                             java.lang.String discountCurveName,
                                             java.util.Calendar referenceDate,
                                             java.lang.String paymentOffsetCode,
                                             BusinessdayCalendarInterface paymentOffsetBusinessdayCalendar,
                                             BusinessdayCalendarInterface.DateRollConvention paymentOffsetDateRollConvention)
        Create a forward curve using a given discount curve. The forward with fixing in t is calculated as ( df(t)/df(t+p)-1 ) / p where df denotes the discount factor as a function of maturity and p is a given the payment offset. The date t + p is generated from the paymentOffsetCode using the provided paymentOffsetBusinessdayCalendar and paymentOffsetDateRollConvention.
        Parameters:
        name - The name under which the forward curve can be referenced.
        discountCurveName - The discount curve used for calculation of the forward.
        referenceDate - The reference date used in the interpretation of times (i.e., the referenceDate where t=0).
        paymentOffsetCode - The payment offset. If null, the parameter p has to be provided to the getForward method.
        paymentOffsetBusinessdayCalendar - The calendar used to generate the payment date from the paymentOffetCode.
        paymentOffsetDateRollConvention - The date roll convention used to generate the payment date from the paymentOffsetCode.
      • ForwardCurveFromDiscountCurve

        public ForwardCurveFromDiscountCurve(java.lang.String name,
                                             java.lang.String discountCurveName,
                                             java.util.Calendar referenceDate,
                                             java.lang.String paymentOffsetCode)
        Create a forward curve using a given discount curve. The forward with fixing in t is calculated as ( df(t)/df(t+p)-1 ) / p where df denotes the discount factor as a function of maturity and p is a given the payment offset. The date t + p is generated from the paymentOffsetCode using a following date roll convention on a calendar excluding weekends.
        Parameters:
        name - The name under which the forward curve can be referenced.
        discountCurveName - The discount curve used for calculation of the forward.
        referenceDate - The reference date used in the interpretation of times (i.e., the referenceDate where t=0).
        paymentOffsetCode - The payment offset. If null, the parameter p has to be provided to the getForward method.
      • ForwardCurveFromDiscountCurve

        public ForwardCurveFromDiscountCurve(java.lang.String discountCurveName,
                                             java.util.Calendar referenceDate,
                                             java.lang.String paymentOffsetCode)
        Create a forward curve using a given discount curve. The forward with fixing in t is calculated as ( df(t)/df(t+p)-1 ) / p where df denotes the discount factor as a function of maturity and p is a given the payment offset.
        Parameters:
        discountCurveName - The discount curve used for calculation of the forward.
        referenceDate - The reference date used in the interpretation of times (i.e., the referenceDate where t=0).
        paymentOffsetCode - The payment offset. If null, the parameter p has to be provided to the getForward method.
    • Method Detail

      • getForward

        public double getForward(AnalyticModelInterface model,
                                 double fixingTime)
        Description copied from interface: ForwardCurveInterface
        Returns the forward for the corresponding fixing time.
        Specified by:
        getForward in interface ForwardCurveInterface
        Parameters:
        model - An analytic model providing a context. Some curves do not need this (can be null).
        fixingTime - The fixing time of the index associated with this forward curve.
        Returns:
        The forward.
      • getForward

        public double getForward(AnalyticModelInterface model,
                                 double fixingTime,
                                 double paymentOffset)
        Description copied from interface: ForwardCurveInterface
        Returns the forward for the corresponding fixing time.
        Specified by:
        getForward in interface ForwardCurveInterface
        Parameters:
        model - An analytic model providing a context. Some curves do not need this (can be null).
        fixingTime - The fixing time of the index associated with this forward curve.
        paymentOffset - The payment offset (as internal day count fraction) specifying the payment of this index. Used only as a fallback and/or consistency check.
        Returns:
        The forward.
      • getValue

        public double getValue(double time)
        Description copied from interface: CurveInterface
        Returns the value for the time using the interpolation method associated with this curve.
        Specified by:
        getValue in interface CurveInterface
        Overrides:
        getValue in class Curve
        Parameters:
        time - Time for which the value should be returned.
        Returns:
        The value at the give time.
      • 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
        Overrides:
        getValue in class Curve
        Parameters:
        model - An analytic model providing a context.
        time - Time for which the value should be returned.
        Returns:
        The value at the give time.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.