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) |
CurveBuilder |
getCloneBuilder()
Returns a curve builder bases on a clone of this curve.
|
RandomVariable |
getDiscountFactor(AnalyticModel model,
double maturity)
Returns the discount factor for the corresponding maturity.
|
RandomVariable |
getDiscountFactor(double maturity)
Returns the discount factor for the corresponding maturity.
|
RandomVariable[] |
getParameter()
Get the current parameter associated with the state of the objects.
|
RandomVariable |
getValue(AnalyticModel 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(RandomVariable[] 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 RandomVariable getDiscountFactor(double maturity)
DiscountCurveInterfacegetDiscountFactor in interface DiscountCurveInterfacematurity - The maturity for which the discount factor is requested.public RandomVariable getDiscountFactor(AnalyticModel 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 RandomVariable getValue(AnalyticModel model, double time)
Curvepublic RandomVariable[] getParameter()
ParameterObjectgetParameter in interface ParameterObjectpublic void setParameter(RandomVariable[] parameter)
ParameterObjectsetParameter in interface ParameterObjectparameter - The parameter associated with the new state of the objects.public CurveBuilder getCloneBuilder() throws CloneNotSupportedException
CurvegetCloneBuilder in interface CurveCloneNotSupportedException - Thrown, when this curve could not be cloned.Copyright © 2019. All rights reserved.