public class CalibratedDiscountCurve extends DiscountCurve
NULL_SER_STRING, VERSION
Constructor and Description |
---|
CalibratedDiscountCurve(byte[] ab)
DiscountCurve de-serialization from input byte array
|
CalibratedDiscountCurve(JulianDate dtStart,
java.lang.String strCurrency,
double[] adblDate,
double[] adblRate)
Boot-straps a discount curve from an array of dates and discount rates
|
Modifier and Type | Method and Description |
---|---|
boolean |
bumpNodeValue(int iNodeIndex,
double dblValue)
Bumped the node value at the node specified the index by the value
|
double |
calcImpliedRate(double dblDate)
Calculates the implied rate to the given date
|
double |
calcImpliedRate(double dblDt1,
double dblDt2)
Computes the implied rate between 2 dates
|
double |
calcImpliedRate(java.lang.String strTenor)
Calculates the implied rate to the given tenor
|
double |
calcImpliedRate(java.lang.String strTenor1,
java.lang.String strTenor2)
Calculate the implied rate between 2 tenors
|
CalibratedDiscountCurve |
createBasisRateShiftedCurve(double[] adblDate,
double[] adblBasis)
Creates a shifted curve from an array of basis shifts
|
CalibratedDiscountCurve |
createParallelRateShiftedCurve(double dblShift)
Creates a parallel rate shifted discount curve
|
CalibratedDiscountCurve |
createParallelShiftedCurve(double dblShift)
Creates a parallel quote shifted curve
|
DiscountCurve |
createTweakedCurve(NodeTweakParams ntp)
Creates the curve from the tweaked parameters
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
java.lang.String |
displayString()
Gets the display String - mostly for informational purposes
|
CalibratableComponent[] |
getCalibComponents()
Retrieves all the calibration components
|
double[] |
getCompQuotes()
Retrieves all the calibration quotes
|
java.lang.String |
getCurrency()
Gets the currency
|
double |
getDF(double dblDate)
Calculates the discount factor to the given date
|
double |
getDF(JulianDate dt)
Calculates the discount factor to the given date
|
double |
getDF(java.lang.String strTenor)
Calculates the discount factor to the given tenor
|
double |
getEffectiveDF(double dblDate1,
double dblDate2)
Computes the time-weighted discount factor between 2 dates
|
double |
getEffectiveDF(JulianDate dt1,
JulianDate dt2)
Computes the time-weighted discount factor between 2 dates
|
double |
getEffectiveDF(java.lang.String strTenor1,
java.lang.String strTenor2)
Computes the time-weighted discount factor between 2 tenors
|
java.lang.String |
getName()
Gets the curve name
|
JulianDate |
getNodeDate(int iNode)
Gets 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()
Gets the epoch date
|
static void |
main(java.lang.String[] astrArgs) |
byte[] |
serialize()
Serialize into a byte array.
|
boolean |
setFlatValue(double dblValue)
Sets the flat value across all the nodes
|
void |
setInstrCalibInputs(ValuationParams valParam,
CalibratableComponent[] aCalibInst,
double[] adblCalibQuote,
java.lang.String[] astrCalibMeasure,
java.util.Map<JulianDate,java.util.Map<java.lang.String,java.lang.Double>> mmFixing,
QuotingParams quotingParams)
Sets the calibration inputs
|
boolean |
setNodeValue(int iNodeIndex,
double dblValue)
Sets the value at the node specified by the index
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter, getFieldDelimiter, getObjectTrailer
public CalibratedDiscountCurve(JulianDate dtStart, java.lang.String strCurrency, double[] adblDate, double[] adblRate) throws java.lang.Exception
dtStart
- Epoch DatestrCurrency
- CurrencyadblDate
- Array of DatesadblRate
- Array of Ratesjava.lang.Exception
- Thrown if the curve cannot be createdpublic CalibratedDiscountCurve(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if DiscountCurve cannot be properly de-serializedpublic void setInstrCalibInputs(ValuationParams valParam, CalibratableComponent[] aCalibInst, double[] adblCalibQuote, java.lang.String[] astrCalibMeasure, java.util.Map<JulianDate,java.util.Map<java.lang.String,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 JulianDate getNodeDate(int iNode)
Curve
iNode
- node indexpublic double getQuote(java.lang.String strInstr) throws java.lang.Exception
Curve
java.lang.Exception
public CalibratedDiscountCurve createParallelShiftedCurve(double dblShift)
Curve
dblShift
- Parallel shiftpublic CalibratedDiscountCurve createParallelRateShiftedCurve(double dblShift)
DiscountCurve
createParallelRateShiftedCurve
in class DiscountCurve
dblShift
- Parallel shiftpublic CalibratedDiscountCurve 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 double getDF(JulianDate dt) throws java.lang.Exception
DiscountCurve
getDF
in class DiscountCurve
dt
- Datejava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic double getDF(java.lang.String strTenor) throws java.lang.Exception
DiscountCurve
getDF
in class DiscountCurve
strTenor
- Tenorjava.lang.Exception
- Thrown if the discount factor cannot be calculatedpublic 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 static void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception