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

Class ForwardCurve

    • Constructor Detail

      • ForwardCurve

        public ForwardCurve(java.lang.String name,
                            java.util.Calendar referenceDate,
                            java.lang.String paymentOffsetCode,
                            BusinessdayCalendarInterface paymentBusinessdayCalendar,
                            BusinessdayCalendarInterface.DateRollConvention paymentDateRollConvention,
                            Curve.InterpolationMethod interpolationMethod,
                            Curve.ExtrapolationMethod extrapolationMethod,
                            Curve.InterpolationEntity interpolationEntity,
                            ForwardCurve.InterpolationEntityForward interpolationEntityForward,
                            java.lang.String discountCurveName)
        Generate a forward curve using a given discount curve and payment offset. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        paymentBusinessdayCalendar - The business day calendar used for adjusting the payment date.
        paymentDateRollConvention - The date roll convention used for adjusting the payment date.
        interpolationMethod - The interpolation method used for the curve.
        extrapolationMethod - The extrapolation method used for the curve.
        interpolationEntity - The entity interpolated/extrapolated.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
      • ForwardCurve

        public ForwardCurve(java.lang.String name,
                            java.util.Calendar referenceDate,
                            java.lang.String paymentOffsetCode,
                            ForwardCurve.InterpolationEntityForward interpolationEntityForward,
                            java.lang.String discountCurveName)
        Generate a forward curve using a given discount curve and payment offset. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
      • ForwardCurve

        public ForwardCurve(java.lang.String name,
                            java.util.Calendar referenceDate,
                            java.lang.String paymentOffsetCode,
                            java.lang.String discountCurveName)
        Generate a forward curve using a given discount curve and payment offset. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
      • ForwardCurve

        public ForwardCurve(java.lang.String name,
                            double paymentOffset,
                            ForwardCurve.InterpolationEntityForward interpolationEntityForward,
                            java.lang.String discountCurveName)
        Generate a forward curve using a given discount curve and payment offset. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        paymentOffset - The maturity of the underlying index modeled by this curve.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
    • Method Detail

      • createForwardCurveFromForwards

        public static ForwardCurve createForwardCurveFromForwards(java.lang.String name,
                                                                  java.util.Calendar referenceDate,
                                                                  java.lang.String paymentOffsetCode,
                                                                  BusinessdayCalendarInterface paymentBusinessdayCalendar,
                                                                  BusinessdayCalendarInterface.DateRollConvention paymentDateRollConvention,
                                                                  Curve.InterpolationMethod interpolationMethod,
                                                                  Curve.ExtrapolationMethod extrapolationMethod,
                                                                  Curve.InterpolationEntity interpolationEntity,
                                                                  ForwardCurve.InterpolationEntityForward interpolationEntityForward,
                                                                  java.lang.String discountCurveName,
                                                                  AnalyticModelInterface model,
                                                                  double[] times,
                                                                  double[] givenForwards)
        Create a forward curve from given times and given forwards. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        paymentBusinessdayCalendar - The business day calendar used for adjusting the payment date.
        paymentDateRollConvention - The date roll convention used for adjusting the payment date.
        interpolationMethod - The interpolation method used for the curve.
        extrapolationMethod - The extrapolation method used for the curve.
        interpolationEntity - The entity interpolated/extrapolated.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
        model - The model to be used to fetch the discount curve, if needed.
        times - A vector of given time points.
        givenForwards - A vector of given forwards (corresponding to the given time points).
        Returns:
        A new ForwardCurve object.
      • createForwardCurveFromForwards

        public static ForwardCurve createForwardCurveFromForwards(java.lang.String name,
                                                                  java.util.Date referenceDate,
                                                                  java.lang.String paymentOffsetCode,
                                                                  BusinessdayCalendarInterface paymentBusinessdayCalendar,
                                                                  BusinessdayCalendarInterface.DateRollConvention paymentDateRollConvention,
                                                                  Curve.InterpolationMethod interpolationMethod,
                                                                  Curve.ExtrapolationMethod extrapolationMethod,
                                                                  Curve.InterpolationEntity interpolationEntity,
                                                                  ForwardCurve.InterpolationEntityForward interpolationEntityForward,
                                                                  java.lang.String discountCurveName,
                                                                  AnalyticModelInterface model,
                                                                  double[] times,
                                                                  double[] givenForwards)
        Create a forward curve from given times and given forwards. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        paymentBusinessdayCalendar - The business day calendar used for adjusting the payment date.
        paymentDateRollConvention - The date roll convention used for adjusting the payment date.
        interpolationMethod - The interpolation method used for the curve.
        extrapolationMethod - The extrapolation method used for the curve.
        interpolationEntity - The entity interpolated/extrapolated.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
        model - The model to be used to fetch the discount curve, if needed.
        times - A vector of given time points.
        givenForwards - A vector of given forwards (corresponding to the given time points).
        Returns:
        A new ForwardCurve object.
      • createForwardCurveFromForwards

        public static ForwardCurve createForwardCurveFromForwards(java.lang.String name,
                                                                  java.util.Date referenceDate,
                                                                  java.lang.String paymentOffsetCode,
                                                                  java.lang.String interpolationEntityForward,
                                                                  java.lang.String discountCurveName,
                                                                  AnalyticModelInterface model,
                                                                  double[] times,
                                                                  double[] givenForwards)
        Create a forward curve from given times and given forwards. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
        model - The model to be used to fetch the discount curve, if needed.
        times - A vector of given time points.
        givenForwards - A vector of given forwards (corresponding to the given time points).
        Returns:
        A new ForwardCurve object.
      • createForwardCurveFromForwards

        public static ForwardCurve createForwardCurveFromForwards(java.lang.String name,
                                                                  java.util.Calendar referenceDate,
                                                                  java.lang.String paymentOffsetCode,
                                                                  ForwardCurve.InterpolationEntityForward interpolationEntityForward,
                                                                  java.lang.String discountCurveName,
                                                                  AnalyticModelInterface model,
                                                                  double[] times,
                                                                  double[] givenForwards)
        Create a forward curve from given times and given forwards. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        referenceDate - The reference date for this code, i.e., the date which defined t=0.
        paymentOffsetCode - The maturity of the index modeled by this curve.
        interpolationEntityForward - Interpolation entity used for forward rate interpolation.
        discountCurveName - The name of a discount curve associated with this index (associated with it's funding or collateralization), if any.
        model - The model to be used to fetch the discount curve, if needed.
        times - A vector of given time points.
        givenForwards - A vector of given forwards (corresponding to the given time points).
        Returns:
        A new ForwardCurve object.
      • createForwardCurveFromForwards

        public static ForwardCurve createForwardCurveFromForwards(java.lang.String name,
                                                                  double[] times,
                                                                  double[] givenForwards,
                                                                  double paymentOffset)
        Create a forward curve from given times and given forwards. The forward F(t) of an index is such that F(t) * D(t+p) equals the market price of the corresponding index fixed in t and paid in t+d, where t is the fixing time of the index and t+p is the payment time of the index. F(t) is the corresponding forward and D is the associated discount curve.
        Parameters:
        name - The name of this curve.
        times - A vector of given time points.
        givenForwards - A vector of given forwards (corresponding to the given time points).
        paymentOffset - The maturity of the underlying index modeled by this curve.
        Returns:
        A new ForwardCurve object.
      • createForwardCurveFromDiscountFactors

        public static ForwardCurve createForwardCurveFromDiscountFactors(java.lang.String name,
                                                                         double[] times,
                                                                         double[] givenDiscountFactors,
                                                                         double paymentOffset)
        Create a forward curve from given times and discount factors. The forward curve will have times.length-1 fixing times from times[0] to times[times.length-2] where the forwards are calculated via forward[timeIndex] = (givenDiscountFactors[timeIndex]/givenDiscountFactors[timeIndex+1]-1.0) / (times[timeIndex+1] - times[timeIndex]); Note: If time[0] > 0, then the discount factor 1.0 will inserted at time 0.0
        Parameters:
        name - The name of this curve.
        times - A vector of given time points.
        givenDiscountFactors - A vector of given discount factors (corresponding to the given time points).
        paymentOffset - The maturity of the underlying index modeled by this curve.
        Returns:
        A new ForwardCurve object.
      • createForwardCurveFromForwards

        public static ForwardCurve createForwardCurveFromForwards(java.lang.String name,
                                                                  double[] times,
                                                                  double[] givenForwards,
                                                                  AnalyticModelInterface model,
                                                                  java.lang.String discountCurveName,
                                                                  double paymentOffset)
        Create a forward curve from given times and given forwards with respect to an associated discount curve and payment offset.
        Parameters:
        name - The name of this curve.
        times - A vector of given time points.
        givenForwards - A vector of given forwards (corresponding to the given time points).
        model - An analytic model providing a context. The discount curve (if needed) is obtained from this model.
        discountCurveName - Name of the discount curve associated with this index (associated with it's funding or collateralization).
        paymentOffset - Time between fixing and payment.
        Returns:
        A new ForwardCurve object.
      • getForward

        public double getForward(AnalyticModelInterface model,
                                 double fixingTime)
        Returns the forward for the corresponding fixing time.
        Specified by:
        getForward in interface ForwardCurveInterface
        Parameters:
        model - An analytic model providing a context. The discount curve (if needed) is obtained from this model.
        fixingTime - The fixing time of the index.
        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.
      • getInterpolationEntityForward

        public ForwardCurve.InterpolationEntityForward getInterpolationEntityForward()
        Returns the special interpolation method used for this forward curve.
        Returns:
        The interpolation method used for the forward.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Curve

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.