public class DerivedFXForward extends FXForwardCurve
NULL_SER_STRING, VERSION
Constructor and Description |
---|
DerivedFXForward(byte[] ab)
FXCurve de-serialization from input byte array
|
DerivedFXForward(CurrencyPair cp,
JulianDate dtSpot,
double dblFXSpot,
double[] adblDate,
double[] adblFXFwd,
boolean[] abIsPIP)
Creates an FXCurve from the CurrencyPair, FX Spot, and the FX Forward parameters
|
Modifier and Type | Method and Description |
---|---|
double[] |
bootstrapBasis(ValuationParams valParam,
DiscountCurve dcNum,
DiscountCurve dcDenom,
boolean bBasisOnDenom)
Bootstrap the basis to the discount curve inputs
|
DiscountCurve |
bootstrapBasisDC(ValuationParams valParam,
DiscountCurve dcNum,
DiscountCurve dcDenom,
boolean bBasisOnDenom)
Bootstrap the discount curve from the discount curve inputs
|
boolean |
buildInterpolator()
Build the interpolator post the curve sweeping build
|
boolean |
bumpNodeValue(int iIndex,
double dblValue)
Bump the node value at the node specified the index by the value
|
double[] |
calcImpliedNodeRates(ValuationParams valParam,
DiscountCurve dcNum,
DiscountCurve dcDenom,
boolean bBasisOnDenom)
Calculate the rates implied by the discount curve inputs
|
double |
calcImpliedRate(ValuationParams valParam,
DiscountCurve dcNum,
DiscountCurve dcDenom,
double dblDate,
boolean bBasisOnDenom)
Calculate the rate implied by the discount curve inputs to a specified date
|
Curve |
createParallelShiftedCurve(double dblShift)
Create a parallel quote shifted curve
|
Curve |
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.lang.String[] |
getCompMeasures()
Retrieve all the calibration measures
|
double[] |
getCompQuotes()
Retrieve all the calibration quotes
|
CurrencyPair |
getCurrencyPair()
Returns the CurrencyPair
|
double[] |
getFullBasis(ValuationParams valParam,
DiscountCurve dcNum,
DiscountCurve dcDenom,
boolean bBasisOnDenom)
Calculates the set of full basis given the input discount curves
|
double |
getFXSpot()
Returns the FX Spot
|
java.lang.String |
getName()
Gets the curve name
|
JulianDate |
getNodeDate(int iIndex)
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 |
getSpotDate()
Returns the Spot Date
|
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
|
boolean |
setNodeValue(int iIndex,
double dblValue)
Set the Value/Slope at the Node specified by the Index
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter, getFieldDelimiter, getObjectTrailer
public DerivedFXForward(CurrencyPair cp, JulianDate dtSpot, double dblFXSpot, double[] adblDate, double[] adblFXFwd, boolean[] abIsPIP) throws java.lang.Exception
cp
- CurrencyPairdtSpot
- Spot DatedblFXSpot
- FX Spot RateadblDate
- Array of datesadblFXFwd
- Array of FX ForwardsabIsPIP
- Array of PIP indicatorsjava.lang.Exception
- Creates the FXCurve instancepublic DerivedFXForward(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if FXCurve cannot be properly de-serializedpublic boolean initializeCalibrationRun(double dblLeftSlope)
Curve
dblLeftSlope
- Left Slopepublic int numCalibNodes()
Curve
public CurrencyPair getCurrencyPair()
FXForwardCurve
getCurrencyPair
in class FXForwardCurve
public JulianDate getSpotDate()
FXForwardCurve
getSpotDate
in class FXForwardCurve
public double getFXSpot()
FXForwardCurve
getFXSpot
in class FXForwardCurve
public double[] getFullBasis(ValuationParams valParam, DiscountCurve dcNum, DiscountCurve dcDenom, boolean bBasisOnDenom)
FXForwardCurve
getFullBasis
in class FXForwardCurve
valParam
- ValuationParamsdcNum
- Discount Curve NumeratordcDenom
- Discount Curve DenominatorbBasisOnDenom
- True if the basis is calculated on the denominator discount curvepublic double[] bootstrapBasis(ValuationParams valParam, DiscountCurve dcNum, DiscountCurve dcDenom, boolean bBasisOnDenom)
FXForwardCurve
bootstrapBasis
in class FXForwardCurve
valParam
- ValuationParamsdcNum
- Discount Curve NumeratordcDenom
- Discount Curve DenominatorbBasisOnDenom
- True if the basis is calculated on the denominator discount curvepublic DiscountCurve bootstrapBasisDC(ValuationParams valParam, DiscountCurve dcNum, DiscountCurve dcDenom, boolean bBasisOnDenom)
FXForwardCurve
bootstrapBasisDC
in class FXForwardCurve
valParam
- ValuationParamsdcNum
- Discount Curve NumeratordcDenom
- Discount Curve DenominatorbBasisOnDenom
- True if the basis is calculated on the denominator discount curvepublic double calcImpliedRate(ValuationParams valParam, DiscountCurve dcNum, DiscountCurve dcDenom, double dblDate, boolean bBasisOnDenom) throws java.lang.Exception
FXForwardCurve
calcImpliedRate
in class FXForwardCurve
valParam
- ValuationParamsdcNum
- Discount Curve NumeratordcDenom
- Discount Curve DenominatordblDate
- Date to which the implied rate is soughtbBasisOnDenom
- True if the implied rate is calculated on the denominator discount curvejava.lang.Exception
- Thrown if the implied rate cannot be calculatedpublic double[] calcImpliedNodeRates(ValuationParams valParam, DiscountCurve dcNum, DiscountCurve dcDenom, boolean bBasisOnDenom)
FXForwardCurve
calcImpliedNodeRates
in class FXForwardCurve
valParam
- ValuationParamsdcNum
- Discount Curve NumeratordcDenom
- Discount Curve DenominatorbBasisOnDenom
- True if the basis is calculated on the denominator discount curvepublic boolean setNodeValue(int iIndex, double dblValue)
Curve
iIndex
- Node IndexdblValue
- Node Valuepublic boolean bumpNodeValue(int iIndex, double dblValue)
Curve
iIndex
- node indexdblValue
- node bump valuepublic boolean setFlatValue(double dblValue)
Curve
dblValue
- node valuepublic java.lang.String displayString()
Curve
public double[] getCompQuotes()
Curve
public java.lang.String[] getCompMeasures()
Curve
public double getQuote(java.lang.String strInstr) throws java.lang.Exception
Curve
java.lang.Exception
public JulianDate getNodeDate(int iIndex)
Curve
iIndex
- node indexpublic CalibratableComponent[] getCalibComponents()
Curve
public java.lang.String getName()
Curve
public Curve createParallelShiftedCurve(double dblShift)
Curve
dblShift
- Parallel shiftpublic Curve createTweakedCurve(NodeTweakParams ntp)
Curve
ntp
- Node Tweak Parameterspublic JulianDate getStartDate()
Curve
public byte[] serialize()
Serializer
serialize
in class Serializer
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer
public boolean buildInterpolator()
Curve
public static void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception