- java.lang.Object
-
- net.finmath.marketdata2.model.curves.AbstractCurve
-
- net.finmath.marketdata2.model.curves.CurveInterpolation
-
- net.finmath.marketdata2.model.curves.AbstractForwardCurve
-
- All Implemented Interfaces:
Serializable
,Cloneable
,ParameterObject
,Curve
,ForwardCurveInterface
- Direct Known Subclasses:
ForwardCurveFromDiscountCurve
,ForwardCurveInterpolation
public abstract class AbstractForwardCurve extends CurveInterpolation implements ForwardCurveInterface
Abstract base class for a forward curve, extending a curve object It stores the maturity of the underlying index (paymentOffset) and the associated discount curve.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.finmath.marketdata2.model.curves.CurveInterpolation
CurveInterpolation.Builder, CurveInterpolation.ExtrapolationMethod, CurveInterpolation.InterpolationEntity, CurveInterpolation.InterpolationMethod
-
-
Constructor Summary
Constructors Constructor Description AbstractForwardCurve(String name, LocalDate referenceDate, double paymentOffset, String discountCurveName)
Construct a base forward curve with a reference date and a payment offset.AbstractForwardCurve(String name, LocalDate referenceDate, String paymentOffsetCode, BusinessdayCalendar paymentBusinessdayCalendar, BusinessdayCalendar.DateRollConvention paymentDateRollConvention, String discountCurveName)
Construct a base forward curve with a reference date and a payment offset.AbstractForwardCurve(String name, LocalDate referenceDate, String paymentOffsetCode, BusinessdayCalendar paymentBusinessdayCalendar, BusinessdayCalendar.DateRollConvention paymentDateRollConvention, CurveInterpolation.InterpolationMethod interpolationMethod, CurveInterpolation.ExtrapolationMethod extrapolationMethod, CurveInterpolation.InterpolationEntity interpolationEntity, String discountCurveName)
Construct a base forward curve with a reference date and a payment offset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDiscountCurveName()
RandomVariable[]
getForwards(AnalyticModel model, double[] fixingTimes)
Returns the forwards for a given vector fixing times.BusinessdayCalendar
getPaymentBusinessdayCalendar()
protected BusinessdayCalendar.DateRollConvention
getPaymentDateRollConvention()
double
getPaymentOffset(double fixingTime)
Returns the payment offset associated with this forward curve and a corresponding fixingTime.String
getPaymentOffsetCode()
String
toString()
-
Methods inherited from class net.finmath.marketdata2.model.curves.CurveInterpolation
addPoint, clone, getCloneBuilder, getCloneForParameter, getExtrapolationMethod, getInterpolationEntity, getInterpolationMethod, getParameter, getParameterIndex, getTimeIndex, getValue, getValue, setParameter
-
Methods inherited from class net.finmath.marketdata2.model.curves.AbstractCurve
getName, getReferenceDate, getValues
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.marketdata2.model.curves.Curve
clone, getCloneBuilder, getCloneForParameter, getName, getReferenceDate, getValue, getValue
-
Methods inherited from interface net.finmath.marketdata2.model.curves.ForwardCurveInterface
getForward, getForward
-
Methods inherited from interface net.finmath.marketdata2.calibration.ParameterObject
getParameter, setParameter
-
-
-
-
Constructor Detail
-
AbstractForwardCurve
public AbstractForwardCurve(String name, LocalDate referenceDate, String paymentOffsetCode, BusinessdayCalendar paymentBusinessdayCalendar, BusinessdayCalendar.DateRollConvention paymentDateRollConvention, CurveInterpolation.InterpolationMethod interpolationMethod, CurveInterpolation.ExtrapolationMethod extrapolationMethod, CurveInterpolation.InterpolationEntity interpolationEntity, String discountCurveName)
Construct a base forward curve with a reference date and a payment offset.- Parameters:
name
- The name of this curve.referenceDate
- The reference date for this curve, 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.discountCurveName
- The name of the discount curve associated with this forward curve (e.g. OIS for collateralized forwards).
-
AbstractForwardCurve
public AbstractForwardCurve(String name, LocalDate referenceDate, String paymentOffsetCode, BusinessdayCalendar paymentBusinessdayCalendar, BusinessdayCalendar.DateRollConvention paymentDateRollConvention, String discountCurveName)
Construct a base forward curve with a reference date and a payment offset.- Parameters:
name
- The name of this curve.referenceDate
- The reference date for this curve, 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.discountCurveName
- The name of the discount curve associated with this forward curve (e.g. OIS for collateralized forwards).
-
AbstractForwardCurve
public AbstractForwardCurve(String name, LocalDate referenceDate, double paymentOffset, String discountCurveName)
Construct a base forward curve with a reference date and a payment offset.- Parameters:
name
- The name of this curve.referenceDate
- The reference date for this curve, i.e., the date which defined t=0.paymentOffset
- The maturity of the index modeled by this curve.discountCurveName
- The name of the discount curve associated with this forward curve (e.g. OIS for collateralized forwards).
-
-
Method Detail
-
getDiscountCurveName
public String getDiscountCurveName()
- Specified by:
getDiscountCurveName
in interfaceForwardCurveInterface
- 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:ForwardCurveInterface
Returns the payment offset associated with this forward curve and a corresponding fixingTime.- Specified by:
getPaymentOffset
in interfaceForwardCurveInterface
- Parameters:
fixingTime
- The fixing time of the index associated with this forward curve.- Returns:
- The payment offset associated with this forward curve.
-
getForwards
public RandomVariable[] 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.
-
toString
public String toString()
- Overrides:
toString
in classCurveInterpolation
-
getPaymentOffsetCode
public String getPaymentOffsetCode()
-
getPaymentBusinessdayCalendar
public BusinessdayCalendar getPaymentBusinessdayCalendar()
-
getPaymentDateRollConvention
protected BusinessdayCalendar.DateRollConvention getPaymentDateRollConvention()
-
-