public class HyperbolicTensionForwardRate extends DiscountCurve
NULL_SER_STRING, VERSION
Constructor and Description |
---|
HyperbolicTensionForwardRate(byte[] ab)
HyperbolicTensionForwardRate de-serialization from input byte array
|
HyperbolicTensionForwardRate(JulianDate dtStart,
java.lang.String strCurrency,
double[] adblDate)
HyperbolicTensionForwardRate constructor
|
HyperbolicTensionForwardRate(JulianDate dtStart,
java.lang.String strCurrency,
double[] adblDate,
double[] adblEndRate)
Boot-straps a Hyperbolic Tension forward discount curve from an array of dates and discount rates
|
Modifier and Type | Method and Description |
---|---|
boolean |
buildInterpolator()
Build the interpolator post the curve sweeping build
|
boolean |
bumpNodeValue(int iNodeIndex,
double dblValue)
Bump the node value at the node specified the index by the value
|
double |
calcImpliedRate(double dblDate)
Calculate the implied rate to the given date
|
double |
calcImpliedRate(double dblDt1,
double dblDt2)
Compute the implied rate between 2 dates
|
double |
calcImpliedRate(java.lang.String strTenor)
Calculate the implied rate to the given tenor
|
double |
calcImpliedRate(java.lang.String strTenor1,
java.lang.String strTenor2)
Calculate the implied rate between 2 tenors
|
HyperbolicTensionForwardRate |
createBasisRateShiftedCurve(double[] adblDate,
double[] adblBasis)
Create a shifted curve from an array of basis shifts
|
HyperbolicTensionForwardRate |
createParallelRateShiftedCurve(double dblShift)
Create a parallel rate shifted discount curve
|
HyperbolicTensionForwardRate |
createParallelShiftedCurve(double dblShift)
Create a parallel quote shifted curve
|
DiscountCurve |
createTweakedCurve(NodeTweakParams ntp)
Create the curve from the tweaked parameters
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
java.lang.String |
displayString()
Get the display String - mostly for informational purposes
|
CalibratableComponent[] |
getCalibComponents()
Retrieve all the calibration components
|
java.util.Map<JulianDate,CaseInsensitiveTreeMap<java.lang.Double>> |
getCalibFixings()
Retrieve the fixings object for calibration using floater instruments
|
double |
getCalibrationMetric()
Calculate the calibration metric for the node
|
java.lang.String[] |
getCompMeasures()
Retrieve all the calibration measures
|
double[] |
getCompQuotes()
Retrieve all the calibration quotes
|
java.lang.String |
getCurrency()
Get the currency
|
double |
getDF(double dblDate)
Calculate the discount factor to the given date
|
WengertJacobian |
getDFJacobian(double dblDate)
Retrieve the Jacobian for the DF to the given date
|
double |
getEffectiveDF(double dblDate1,
double dblDate2)
Compute the time-weighted discount factor between 2 dates
|
double |
getEffectiveDF(JulianDate dt1,
JulianDate dt2)
Compute the time-weighted discount factor between 2 dates
|
double |
getEffectiveDF(java.lang.String strTenor1,
java.lang.String strTenor2)
Compute the time-weighted discount factor between 2 tenors
|
java.lang.String |
getName()
Gets the curve name
|
JulianDate |
getNodeDate(int iNode)
Get the date at the node specified by the index
|
double |
getQuote(java.lang.String strInstr)
Retrieve the calibration quote of the given instrument
|
JulianDate |
getStartDate()
Get the epoch date
|
boolean |
initializeCalibrationRun(double dblLeftSlope)
Initialize the Calibration Run with the Left Slope
|
static void |
main(java.lang.String[] astrArgs) |
int |
numCalibNodes()
Retrieve the number of calibration nodes
|
byte[] |
serialize()
Serialize into a byte array.
|
boolean |
setFlatValue(double dblValue)
Set the flat value across all the nodes
|
void |
setInstrCalibInputs(ValuationParams valParam,
CalibratableComponent[] aCalibInst,
double[] adblCalibQuote,
java.lang.String[] astrCalibMeasure,
java.util.Map<JulianDate,CaseInsensitiveTreeMap<java.lang.Double>> mmFixing,
QuotingParams quotingParams)
Set the calibration inputs
|
boolean |
setNodeValue(int iNodeIndex,
double dblValue)
Set the Value/Slope at the Node specified by the Index
|
calcLIBOR, calcLIBOR, calcLIBOR, calcLIBOR, calcLIBORDV01, compPVDFJacobian, compPVDFJacobian, compPVQuoteJacobian, compPVQuoteJacobian, compQuoteDFJacobian, compQuoteDFJacobian, compQuoteZeroJacobian, compQuoteZeroJacobian, getDF, getDF, getDFJacobian, getDFJacobian, getForwardRateJacobian, getForwardRateJacobian, getZeroRateJacobian, getZeroRateJacobian, interpMeasure
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter, getFieldDelimiter, getObjectTrailer
public HyperbolicTensionForwardRate(JulianDate dtStart, java.lang.String strCurrency, double[] adblDate) throws java.lang.Exception
dtStart
- Start DatestrCurrency
- CurrencyadblDate
- Array of node datesjava.lang.Exception
- Thrown if the inputs are invalidpublic HyperbolicTensionForwardRate(JulianDate dtStart, java.lang.String strCurrency, double[] adblDate, double[] adblEndRate) throws java.lang.Exception
dtStart
- Epoch DatestrCurrency
- CurrencyadblDate
- Array of DatesadblEndRate
- Array of Ratesjava.lang.Exception
- Thrown if the curve cannot be createdpublic HyperbolicTensionForwardRate(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if HyperbolicTensionForwardRate cannot be properly de-serializedpublic boolean initializeCalibrationRun(double dblLeftSlope)
Curve
dblLeftSlope
- Left Slopepublic int numCalibNodes()
Curve
public java.util.Map<JulianDate,CaseInsensitiveTreeMap<java.lang.Double>> getCalibFixings()
DiscountCurve
getCalibFixings
in class DiscountCurve
public double getCalibrationMetric() throws java.lang.Exception
java.lang.Exception
public void setInstrCalibInputs(ValuationParams valParam, CalibratableComponent[] aCalibInst, double[] adblCalibQuote, java.lang.String[] astrCalibMeasure, java.util.Map<JulianDate,CaseInsensitiveTreeMap<java.lang.Double>> mmFixing, QuotingParams quotingParams)
DiscountCurve
setInstrCalibInputs
in class DiscountCurve
valParam
- ValuationParamsaCalibInst
- Array of calibration instrumentsadblCalibQuote
- Array of calibration quotesastrCalibMeasure
- Array of calibration measuresmmFixing
- Fixings mappublic CalibratableComponent[] getCalibComponents()
Curve
public double[] getCompQuotes()
Curve
public java.lang.String[] getCompMeasures()
Curve
public JulianDate getNodeDate(int iNode)
Curve
iNode
- node indexpublic double getQuote(java.lang.String strInstr) throws java.lang.Exception
Curve
java.lang.Exception
public HyperbolicTensionForwardRate createParallelShiftedCurve(double dblShift)
Curve
dblShift
- Parallel shiftpublic HyperbolicTensionForwardRate createParallelRateShiftedCurve(double dblShift)
DiscountCurve
createParallelRateShiftedCurve
in class DiscountCurve
dblShift
- Parallel shiftpublic HyperbolicTensionForwardRate createBasisRateShiftedCurve(double[] adblDate, double[] adblBasis)
DiscountCurve
createBasisRateShiftedCurve
in class DiscountCurve
adblDate
- Array of datesadblBasis
- Array of basispublic DiscountCurve createTweakedCurve(NodeTweakParams ntp)
Curve
ntp
- Node Tweak Parameterspublic java.lang.String getName()
Curve
public java.lang.String getCurrency()
DiscountCurve
getCurrency
in class DiscountCurve
public double getDF(double dblDate) throws java.lang.Exception
DiscountCurve
getDF
in class DiscountCurve
dblDate
- Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic WengertJacobian getDFJacobian(double dblDate)
DiscountCurve
getDFJacobian
in class DiscountCurve
dblDate
- Datepublic double getEffectiveDF(double dblDate1, double dblDate2) throws java.lang.Exception
DiscountCurve
getEffectiveDF
in class DiscountCurve
dblDate1
- First DatedblDate2
- Second Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic double getEffectiveDF(JulianDate dt1, JulianDate dt2) throws java.lang.Exception
DiscountCurve
getEffectiveDF
in class DiscountCurve
dt1
- First Datedt2
- Second Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic double getEffectiveDF(java.lang.String strTenor1, java.lang.String strTenor2) throws java.lang.Exception
DiscountCurve
getEffectiveDF
in class DiscountCurve
strTenor1
- First DatestrTenor2
- Second Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic boolean setNodeValue(int iNodeIndex, double dblValue)
Curve
iNodeIndex
- Node IndexdblValue
- Node Valuepublic boolean bumpNodeValue(int iNodeIndex, double dblValue)
Curve
iNodeIndex
- node indexdblValue
- node bump valuepublic boolean setFlatValue(double dblValue)
Curve
dblValue
- node valuepublic double calcImpliedRate(double dblDt1, double dblDt2) throws java.lang.Exception
DiscountCurve
calcImpliedRate
in class DiscountCurve
dblDt1
- First DatedblDt2
- Second Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic double calcImpliedRate(double dblDate) throws java.lang.Exception
DiscountCurve
calcImpliedRate
in class DiscountCurve
dblDate
- Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic double calcImpliedRate(java.lang.String strTenor) throws java.lang.Exception
DiscountCurve
calcImpliedRate
in class DiscountCurve
strTenor
- Tenorjava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic double calcImpliedRate(java.lang.String strTenor1, java.lang.String strTenor2) throws java.lang.Exception
DiscountCurve
calcImpliedRate
in class DiscountCurve
strTenor1
- Tenor startstrTenor2
- Tenor endjava.lang.Exception
public JulianDate getStartDate()
Curve
public byte[] serialize()
Serializer
serialize
in class Serializer
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer
public java.lang.String displayString()
Curve
public boolean buildInterpolator()
Curve
public static void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception