Package org.drip.state.fx
Class FXCurve
java.lang.Object
org.drip.state.fx.FXCurve
- All Implemented Interfaces:
Curve
,LatentState
- Direct Known Subclasses:
BasisSplineFXForward
,ExplicitBootFXCurve
public abstract class FXCurve extends java.lang.Object implements Curve
FXCurve is the Stub for the FX Curve for the specified Currency Pair. It implements the following
Functionality.
- Calculate the FX Forward to the given Date
- Calculate the set of Zero basis given the input discount curves
- Bootstrap the basis to the discount curve inputs
- Bootstrap the discount curve from the discount curve inputs
- Calculate the rates implied by the discount curve inputs
- Calculate the rate implied by the discount curve inputs to a specified date
- Return the Currency Pair
- Calculate the FX Forward to the given date
- Retrieve the Manifest Measure Jacobian of the Forward Rate to the given date
- Retrieve the Manifest Measure Jacobian of the Forward Rate to the date implied by the given Tenor
Module | Product Core Module |
Library | Fixed Income Analytics |
Project | Latent State Inference and Creation Utilities |
Package | FX Latent State Curve Estimator |
- Author:
- Lakshmi Krishnamurthy
-
Method Summary
Modifier and Type Method Description abstract double[]
bootstrapBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)
Bootstrap the basis to the discount curve inputsabstract MergedDiscountForwardCurve
bootstrapBasisDC(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)
Bootstrap the discount curve from the discount curve inputsCalibratableComponent[]
calibComp()
Retrieve the Calibration Componentsjava.lang.String
currency()
Get the CurrencyCurrencyPair
currencyPair()
Return the Currency PairLatentState
customTweakManifestMeasure(java.lang.String manifestMeasure, ManifestMeasureTweak manifestMeasureTweak)
Create a LatentState Instance from the Manifest Measure Tweak ParametersLatentState
customTweakQuantificationMetric(ManifestMeasureTweak manifestMeasureTweak)
Create a LatentState Instance from the Quantification Metric Tweak ParametersJulianDate
epoch()
Get the Epoch Dateabstract double
fx(int date)
Calculate the FX Forward to the given Datedouble
fx(java.lang.String tenor)
Calculate the FX Forward to the given datedouble
fx(JulianDate date)
Calculate the FX Forward to the given dateabstract double[]
impliedNodeRates(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)
Calculate the rates implied by the discount curve inputsabstract WengertJacobian
jackDForwardDManifestMeasure(java.lang.String manifestMeasure, int date)
Retrieve the Manifest Measure Jacobian of the Forward Rate to the given dateWengertJacobian
jackDForwardDManifestMeasure(java.lang.String manifestMeasure, java.lang.String tenor)
Retrieve the Manifest Measure Jacobian of the Forward Rate to the date implied by the given TenorWengertJacobian
jackDForwardDManifestMeasure(java.lang.String manifestMeasure, JulianDate date)
Retrieve the Manifest Measure Jacobian of the Forward Rate to the given dateLatentStateLabel
label()
Get the Curve Latent State Identifier LabelCaseInsensitiveTreeMap<java.lang.Double>
manifestMeasure(java.lang.String instrument)
Retrieve the Manifest Measure Map of the given Instrument used to construct the CurveLatentState
parallelShiftManifestMeasure(java.lang.String manifestMeasure, double shift)
Create a LatentState Instance from the Manifest Measure Parallel ShiftLatentState
parallelShiftQuantificationMetric(double shift)
Create a LatentState Instance from the Quantification Metric Parallel Shiftabstract double
rate(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, int date, boolean basisOnDenominator)
Calculate the rate implied by the discount curve inputs to a specified dateboolean
setCCIS(CurveConstructionInputSet curveConstructionInputSet)
Set the Curve Construction Input Set ParametersLatentState
shiftManifestMeasure(int spanIndex, java.lang.String manifestMeasure, double shift)
Create a LatentState Instance from the Shift of the Specified Manifest Measureabstract double[]
zeroBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)
Calculate the set of Zero basis given the input discount curvesMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
fx
public abstract double fx(int date) throws java.lang.ExceptionCalculate the FX Forward to the given Date- Parameters:
date
- Date- Returns:
- The FX Forward
- Throws:
java.lang.Exception
- Thrown if the FX Forward cannot be calculated
-
zeroBasis
public abstract double[] zeroBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Calculate the set of Zero basis given the input discount curves- Parameters:
dateNodeArray
- Array of Date NodesvaluationParams
- Valuation ParametersnumeratorDiscountCurve
- Discount Curve NumeratordenominatorDiscountCurve
- Discount Curve DenominatorbasisOnDenominator
- True if the basis is calculated on the denominator discount curve- Returns:
- Array of the computed basis
-
bootstrapBasis
public abstract double[] bootstrapBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Bootstrap the basis to the discount curve inputs- Parameters:
dateNodeArray
- Array of Date NodesvaluationParams
- Valuation ParametersnumeratorDiscountCurve
- Discount Curve NumeratordenominatorDiscountCurve
- Discount Curve DenominatorbasisOnDenominator
- True if the basis is calculated on the denominator discount curve- Returns:
- Array of the computed basis
-
bootstrapBasisDC
public abstract MergedDiscountForwardCurve bootstrapBasisDC(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Bootstrap the discount curve from the discount curve inputs- Parameters:
dateNodeArray
- Array of Date NodesvaluationParams
- Valuation ParametersnumeratorDiscountCurve
- Discount Curve NumeratordenominatorDiscountCurve
- Discount Curve DenominatorbasisOnDenominator
- True if the basis is calculated on the denominator discount curve- Returns:
- Array of the computed basis
-
impliedNodeRates
public abstract double[] impliedNodeRates(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Calculate the rates implied by the discount curve inputs- Parameters:
dateNodeArray
- Array of Date NodesvaluationParams
- Valuation ParametersnumeratorDiscountCurve
- Discount Curve NumeratordenominatorDiscountCurve
- Discount Curve DenominatorbasisOnDenominator
- True if the basis is calculated on the denominator discount curve- Returns:
- Array of the computed implied rates
-
rate
public abstract double rate(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, int date, boolean basisOnDenominator) throws java.lang.ExceptionCalculate the rate implied by the discount curve inputs to a specified date- Parameters:
dateNodeArray
- Array of Date NodesvaluationParams
- ValuationParamsnumeratorDiscountCurve
- Discount Curve NumeratordenominatorDiscountCurve
- Discount Curve Denominatordate
- Date to which the implied rate is soughtbasisOnDenominator
- True if the implied rate is calculated on the denominator discount curve- Returns:
- Implied rate
- Throws:
java.lang.Exception
- Thrown if the implied rate cannot be calculated
-
label
Description copied from interface:Curve
Get the Curve Latent State Identifier Label -
currency
public java.lang.String currency()Description copied from interface:Curve
Get the Currency -
epoch
Description copied from interface:Curve
Get the Epoch Date -
currencyPair
Return the Currency Pair- Returns:
- CurrencyPair
-
fx
Calculate the FX Forward to the given date- Parameters:
date
- Date- Returns:
- The FX Forward
- Throws:
java.lang.Exception
- Thrown if the FX Forward cannot be calculated
-
fx
public double fx(java.lang.String tenor) throws java.lang.ExceptionCalculate the FX Forward to the given date- Parameters:
tenor
- The Tenor- Returns:
- The FX Forward
- Throws:
java.lang.Exception
- Thrown if the FX Forward cannot be calculated
-
setCCIS
Description copied from interface:Curve
Set the Curve Construction Input Set Parameters -
calibComp
Description copied from interface:Curve
Retrieve the Calibration Components -
manifestMeasure
Description copied from interface:Curve
Retrieve the Manifest Measure Map of the given Instrument used to construct the Curve- Specified by:
manifestMeasure
in interfaceCurve
- Parameters:
instrument
- The Calibration Instrument's Code whose Manifest Measure Map is sought- Returns:
- The Manifest Measure Map of the given Instrument used to construct the Curve
-
parallelShiftManifestMeasure
Description copied from interface:LatentState
Create a LatentState Instance from the Manifest Measure Parallel Shift- Specified by:
parallelShiftManifestMeasure
in interfaceLatentState
- Parameters:
manifestMeasure
- The Specified Manifest Measureshift
- Parallel shift of the Manifest Measure- Returns:
- New LatentState Instance corresponding to the Parallel Shifted Manifest Measure
-
shiftManifestMeasure
public LatentState shiftManifestMeasure(int spanIndex, java.lang.String manifestMeasure, double shift)Description copied from interface:LatentState
Create a LatentState Instance from the Shift of the Specified Manifest Measure- Specified by:
shiftManifestMeasure
in interfaceLatentState
- Parameters:
spanIndex
- Index into the Span that identifies the InstrumentmanifestMeasure
- The Specified Manifest Measureshift
- Shift of the Manifest Measure- Returns:
- New LatentState Instance corresponding to the Shift of the Specified Manifest Measure
-
customTweakManifestMeasure
public LatentState customTweakManifestMeasure(java.lang.String manifestMeasure, ManifestMeasureTweak manifestMeasureTweak)Description copied from interface:LatentState
Create a LatentState Instance from the Manifest Measure Tweak Parameters- Specified by:
customTweakManifestMeasure
in interfaceLatentState
- Parameters:
manifestMeasure
- The Specified Manifest MeasuremanifestMeasureTweak
- Manifest Measure Tweak Parameters- Returns:
- New LatentState Instance corresponding to the Tweaked Manifest Measure
-
parallelShiftQuantificationMetric
Description copied from interface:LatentState
Create a LatentState Instance from the Quantification Metric Parallel Shift- Specified by:
parallelShiftQuantificationMetric
in interfaceLatentState
- Parameters:
shift
- Parallel shift of the Quantification Metric- Returns:
- New LatentState Instance corresponding to the Parallel Shifted Quantification Metric
-
customTweakQuantificationMetric
Description copied from interface:LatentState
Create a LatentState Instance from the Quantification Metric Tweak Parameters- Specified by:
customTweakQuantificationMetric
in interfaceLatentState
- Parameters:
manifestMeasureTweak
- Quantification Metric Tweak Parameters- Returns:
- New LatentState Instance corresponding to the Tweaked Quantification Metric
-
jackDForwardDManifestMeasure
public abstract WengertJacobian jackDForwardDManifestMeasure(java.lang.String manifestMeasure, int date)Retrieve the Manifest Measure Jacobian of the Forward Rate to the given date- Parameters:
manifestMeasure
- Manifest Measuredate
- Date- Returns:
- The Manifest Measure Jacobian of the Forward Rate to the given date
-
jackDForwardDManifestMeasure
public WengertJacobian jackDForwardDManifestMeasure(java.lang.String manifestMeasure, JulianDate date)Retrieve the Manifest Measure Jacobian of the Forward Rate to the given date- Parameters:
manifestMeasure
- Manifest Measuredate
- Date- Returns:
- The Manifest Measure Jacobian of the Forward Rate to the given date
-
jackDForwardDManifestMeasure
public WengertJacobian jackDForwardDManifestMeasure(java.lang.String manifestMeasure, java.lang.String tenor)Retrieve the Manifest Measure Jacobian of the Forward Rate to the date implied by the given Tenor- Parameters:
manifestMeasure
- Manifest Measuretenor
- Tenor- Returns:
- The Manifest Measure Jacobian of the Forward Rate to the date implied by the given Tenor
-