Class ForwardCurveWithFixings

    • Constructor Detail

      • ForwardCurveWithFixings

        public ForwardCurveWithFixings​(ForwardCurve curveInterface,
                                       ForwardCurve fixedPartCurve,
                                       double fixedPartStartTime,
                                       double fixedPartEndTime)
        Create a piecewise forward curve.
        Parameters:
        curveInterface - Base curve, to be used by default.
        fixedPartCurve - CurveFromInterpolationPoints to be used for the open time interval from fixedPartStartTime to fixedPartEndTime.
        fixedPartStartTime - Start time of the interval where we use the fixedPartCurve.
        fixedPartEndTime - End time of the interval where we use the fixedPartCurve.
    • Method Detail

      • getForward

        public double getForward​(AnalyticModel model,
                                 double fixingTime)
        Description copied from interface: ForwardCurve
        Returns the forward for the corresponding fixing time.
        Specified by:
        getForward in interface ForwardCurve
        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​(AnalyticModel model,
                                 double fixingTime,
                                 double paymentOffset)
        Description copied from interface: ForwardCurve
        Returns the forward for the corresponding fixing time and paymentOffset.
        Specified by:
        getForward in interface ForwardCurve
        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.
      • getForwards

        public double[] getForwards​(AnalyticModel model,
                                    double[] fixingTimes)
        Returns the forwards for a given vector fixing times.
        Parameters:
        model - An analytic model providing a context. The discount curve (if needed) is obtained from this model.
        fixingTimes - The given fixing times.
        Returns:
        The forward rates.
      • getDiscountCurveName

        public String getDiscountCurveName()
        Specified by:
        getDiscountCurveName in interface ForwardCurve
        Returns:
        The name of the discount curve associated with this forward curve (e.g. OIS for collateralized forwards)
      • getPaymentOffset

        public double getPaymentOffset​(double fixingTime)
        Description copied from interface: ForwardCurve
        Returns the payment offset associated with this forward curve and a corresponding fixingTime.
        Specified by:
        getPaymentOffset in interface ForwardCurve
        Parameters:
        fixingTime - The fixing time of the index associated with this forward curve.
        Returns:
        The payment offset associated with this forward curve.