public class DiscountCurveFromForwardCurve extends AbstractCurve implements Serializable, DiscountCurveInterface
Note that a special interpolation is performed for in-between points.
Hence, creating a ForwardCurveFromDiscountCurve and from it
a DiscountCurveFromForwardCurve will not recover the original curve
since interpolation points may be lost.
| Constructor and Description |
|---|
DiscountCurveFromForwardCurve(ForwardCurveInterface forwardCurve)
Create a discount curve using a given forward curve.
|
DiscountCurveFromForwardCurve(ForwardCurveInterface forwardCurve,
double periodLengthTimeScaling)
Create a discount curve using a given forward curve.
|
DiscountCurveFromForwardCurve(String forwardCurveName)
Create a discount curve using a given forward curve.
|
DiscountCurveFromForwardCurve(String forwardCurveName,
double periodLengthTimeScaling)
Create a discount curve using a given forward curve.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
CurveBuilderInterface |
getCloneBuilder()
Returns a curve builder bases on a clone of this curve.
|
double |
getDiscountFactor(AnalyticModelInterface model,
double maturity)
Returns the discount factor for the corresponding maturity.
|
double |
getDiscountFactor(double maturity)
Returns the discount factor for the corresponding maturity.
|
double[] |
getParameter()
Get the current parameter associated with the state of the objects.
|
double |
getValue(AnalyticModelInterface model,
double time)
Returns the value for the time using the interpolation method associated with this curve
within a given context, i.e., a model.
|
int |
hashCode() |
void |
setParameter(double[] parameter)
Set the current parameter and change the state of the objects.
|
clone, getCloneForParameter, getName, getReferenceDate, getValue, getValues, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitclone, getCloneForParameter, getName, getReferenceDate, getValuepublic DiscountCurveFromForwardCurve(String forwardCurveName, double periodLengthTimeScaling)
forwardCurveName - The name of the forward curve used for calculation of the discount factors.periodLengthTimeScaling - A scaling factor applied to d, adjusting for the internal double time to the period length daycount fraction (note that this may only be an approximate solution to capture daycount effects).public DiscountCurveFromForwardCurve(ForwardCurveInterface forwardCurve, double periodLengthTimeScaling)
forwardCurve - The forward curve used for calculation of the discount factors.periodLengthTimeScaling - A scaling factor applied to d, adjusting for the internal double time to the period length daycount fraction (note that this may only be an approximate solution to capture daycount effects).public DiscountCurveFromForwardCurve(String forwardCurveName)
forwardCurveName - The name of the forward curve used for calculation of the discount factors.public DiscountCurveFromForwardCurve(ForwardCurveInterface forwardCurve)
forwardCurve - The forward curve used for calculation of the discount factors.public double getDiscountFactor(double maturity)
DiscountCurveInterfacegetDiscountFactor in interface DiscountCurveInterfacematurity - The maturity for which the discount factor is requested.public double getDiscountFactor(AnalyticModelInterface model, double maturity)
DiscountCurveInterfacegetDiscountFactor in interface DiscountCurveInterfacemodel - An analytic model providing a context. Some curves do not need this (can be null).maturity - The maturity for which the discount factor is requested.public double getValue(AnalyticModelInterface model, double time)
CurveInterfacegetValue in interface CurveInterfacemodel - An analytic model providing a context.time - Time for which the value should be returned.public double[] getParameter()
ParameterObjectInterfacegetParameter in interface ParameterObjectInterfacepublic void setParameter(double[] parameter)
ParameterObjectInterfacesetParameter in interface ParameterObjectInterfaceparameter - The parameter associated with the new state of the objects.public CurveBuilderInterface getCloneBuilder() throws CloneNotSupportedException
CurveInterfacegetCloneBuilder in interface CurveInterfaceCloneNotSupportedException - Thrown, when this curve could not be cloned.Copyright © 2017. All rights reserved.