net.finmath.marketdata.model.curves
Class ForwardCurveWithFixings
- java.lang.Object
-
- net.finmath.marketdata.model.curves.AbstractCurve
-
- net.finmath.marketdata.model.curves.PiecewiseCurve
-
- net.finmath.marketdata.model.curves.ForwardCurveWithFixings
-
- All Implemented Interfaces:
- java.lang.Cloneable, ParameterObjectInterface, CurveInterface, ForwardCurveInterface
public class ForwardCurveWithFixings extends PiecewiseCurve implements ForwardCurveInterface
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.finmath.marketdata.model.curves.PiecewiseCurve
PiecewiseCurve.CurveBuilder
-
-
Constructor Summary
Constructors Constructor and Description ForwardCurveWithFixings(ForwardCurveInterface curveInterface, ForwardCurveInterface fixedPartCurve, double fixedPartStartTime, double fixedPartEndTime)Create a piecewise forward curve.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ForwardCurveWithFixingsclone()Create a deep copied clone.CurveInterfacegetCloneForParameter(double[] value)Create a clone with a modified parameter.java.lang.StringgetDiscountCurveName()Returns the name of the discount curve associated with this forward curve.doublegetForward(AnalyticModelInterface model, double fixingTime)Returns the forward for the corresponding fixing time.doublegetForward(AnalyticModelInterface model, double fixingTime, double paymentOffset)Returns the forward for the corresponding fixing time.double[]getForwards(AnalyticModelInterface model, double[] fixingTimes)Returns the forwards for a given vector fixing times.doublegetPaymentOffset(double fixingTime)Returns the payment offset associated with this forward curve and a corresponding fixingTime.-
Methods inherited from class net.finmath.marketdata.model.curves.PiecewiseCurve
getBaseCurve, getCloneBuilder, getFixedPartCurve, getFixedPartEndTime, getFixedPartStartTime, getName, getParameter, getReferenceDate, getValue, getValue, setParameter, toString
-
Methods inherited from class net.finmath.marketdata.model.curves.AbstractCurve
getValues
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.marketdata.model.curves.CurveInterface
getCloneBuilder, getName, getReferenceDate, getValue, getValue
-
Methods inherited from interface net.finmath.marketdata.calibration.ParameterObjectInterface
getParameter, setParameter
-
-
-
-
Constructor Detail
-
ForwardCurveWithFixings
public ForwardCurveWithFixings(ForwardCurveInterface curveInterface, ForwardCurveInterface fixedPartCurve, double fixedPartStartTime, double fixedPartEndTime)
Create a piecewise forward curve.- Parameters:
curveInterface- Base curve, to be used by default.fixedPartCurve- Curve 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(AnalyticModelInterface model, double fixingTime)
Description copied from interface:ForwardCurveInterfaceReturns the forward for the corresponding fixing time.- Specified by:
getForwardin interfaceForwardCurveInterface- 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:ForwardCurveInterfaceReturns the forward for the corresponding fixing time.- Specified by:
getForwardin interfaceForwardCurveInterface- 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(AnalyticModelInterface 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 java.lang.String getDiscountCurveName()
Description copied from interface:ForwardCurveInterfaceReturns the name of the discount curve associated with this forward curve.- Specified by:
getDiscountCurveNamein interfaceForwardCurveInterface- Returns:
- The name of the discount curve associated with this forward curve.
-
getPaymentOffset
public double getPaymentOffset(double fixingTime)
Description copied from interface:ForwardCurveInterfaceReturns the payment offset associated with this forward curve and a corresponding fixingTime.- Specified by:
getPaymentOffsetin interfaceForwardCurveInterface- Parameters:
fixingTime- The fixing time of the index associated with this forward curve.- Returns:
- The payment offset associated with this forward curve.
-
getCloneForParameter
public CurveInterface getCloneForParameter(double[] value) throws java.lang.CloneNotSupportedException
Description copied from interface:ParameterObjectInterfaceCreate a clone with a modified parameter.- Specified by:
getCloneForParameterin interfaceParameterObjectInterface- Specified by:
getCloneForParameterin interfaceCurveInterface- Overrides:
getCloneForParameterin classPiecewiseCurve- Parameters:
value- The new parameter.- Returns:
- A clone with an otherwise modified parameter.
- Throws:
java.lang.CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
clone
public ForwardCurveWithFixings clone() throws java.lang.CloneNotSupportedException
Description copied from interface:CurveInterfaceCreate a deep copied clone.- Specified by:
clonein interfaceCurveInterface- Overrides:
clonein classPiecewiseCurve- Returns:
- A clone (deep copied).
- Throws:
java.lang.CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG