Package org.drip.state.nonlinear
Class FlatForwardFXCurve
java.lang.Object
org.drip.state.fx.FXCurve
org.drip.state.fx.ExplicitBootFXCurve
org.drip.state.nonlinear.FlatForwardFXCurve
- All Implemented Interfaces:
Curve,ExplicitBootCurve,LatentState
public class FlatForwardFXCurve extends ExplicitBootFXCurve
FlatForwardFXCurve manages the Volatility Latent State, using the Forward FX as the State Response
Representation.
| Module | Product Core Module |
| Library | Fixed Income Analytics |
| Project | Latent State Inference and Creation Utilities |
| Package | Nonlinear (i.e., Boot) Latent State Construction |
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description FlatForwardFXCurve(int epochDate, CurrencyPair currencyPair, double fxSpot, int[] dateArray, double[] fxForwardArray)FlatForwardVolatilityCurve Constructor -
Method Summary
Modifier and Type Method Description double[]bootstrapBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Bootstrap the basis to the discount curve inputsMergedDiscountForwardCurvebootstrapBasisDC(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Bootstrap the discount curve from the discount curve inputsbooleanbumpNodeValue(int nodeIndex, double value)Bump the node value at the node specified the index by the valuedoublefx(int date)Calculate the FX Forward to the given DatedoublefxSpot()Retrieve the FX Spotdouble[]impliedNodeRates(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Calculate the rates implied by the discount curve inputsWengertJacobianjackDForwardDManifestMeasure(java.lang.String manifestMeasure, int date)Retrieve the Manifest Measure Jacobian of the Forward Rate to the given datedoublerate(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, int date, boolean basisOnDenominator)Calculate the rate implied by the discount curve inputs to a specified datebooleansetFlatValue(double value)Set the flat value across all the nodesbooleansetNodeValue(int nodeIndex, double value)Set the Value/Slope at the Node specified by the Indexdouble[]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 org.drip.state.fx.FXCurve
calibComp, currency, currencyPair, customTweakManifestMeasure, customTweakQuantificationMetric, epoch, fx, fx, jackDForwardDManifestMeasure, jackDForwardDManifestMeasure, label, manifestMeasure, parallelShiftManifestMeasure, parallelShiftQuantificationMetric, setCCIS, shiftManifestMeasureMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drip.analytics.definition.Curve
calibComp, currency, epoch, label, manifestMeasure, setCCISMethods inherited from interface org.drip.state.representation.LatentState
customTweakManifestMeasure, customTweakQuantificationMetric, parallelShiftManifestMeasure, parallelShiftQuantificationMetric, shiftManifestMeasure
-
Constructor Details
-
FlatForwardFXCurve
public FlatForwardFXCurve(int epochDate, CurrencyPair currencyPair, double fxSpot, int[] dateArray, double[] fxForwardArray) throws java.lang.ExceptionFlatForwardVolatilityCurve Constructor- Parameters:
epochDate- Epoch DatecurrencyPair- Currency PairfxSpot- FX SpotdateArray- Array of the Pillar DatesfxForwardArray- Array of the corresponding FX Forward Nodes- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-
-
Method Details
-
fx
public double fx(int date) throws java.lang.ExceptionDescription copied from class:FXCurveCalculate the FX Forward to the given Date -
fxSpot
public double fxSpot()Retrieve the FX Spot- Returns:
- The FX Spot
-
zeroBasis
public double[] zeroBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Description copied from class:FXCurveCalculate the set of Zero basis given the input discount curves- Specified by:
zeroBasisin classFXCurve- 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 double[] impliedNodeRates(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Description copied from class:FXCurveCalculate the rates implied by the discount curve inputs- Specified by:
impliedNodeRatesin classFXCurve- 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
-
bootstrapBasis
public double[] bootstrapBasis(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Description copied from class:FXCurveBootstrap the basis to the discount curve inputs- Specified by:
bootstrapBasisin classFXCurve- 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 MergedDiscountForwardCurve bootstrapBasisDC(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)Description copied from class:FXCurveBootstrap the discount curve from the discount curve inputs- Specified by:
bootstrapBasisDCin classFXCurve- 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
-
rate
public double rate(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, int date, boolean basisOnDenominator) throws java.lang.ExceptionDescription copied from class:FXCurveCalculate the rate implied by the discount curve inputs to a specified date- Specified by:
ratein classFXCurve- 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
-
jackDForwardDManifestMeasure
Description copied from class:FXCurveRetrieve the Manifest Measure Jacobian of the Forward Rate to the given date- Specified by:
jackDForwardDManifestMeasurein classFXCurve- Parameters:
manifestMeasure- Manifest Measuredate- Date- Returns:
- The Manifest Measure Jacobian of the Forward Rate to the given date
-
setNodeValue
public boolean setNodeValue(int nodeIndex, double value)Description copied from interface:ExplicitBootCurveSet the Value/Slope at the Node specified by the Index- Parameters:
nodeIndex- Node Indexvalue- Node Value- Returns:
- Success (true), failure (false)
-
bumpNodeValue
public boolean bumpNodeValue(int nodeIndex, double value)Description copied from interface:ExplicitBootCurveBump the node value at the node specified the index by the value- Parameters:
nodeIndex- node indexvalue- node bump value- Returns:
- Success (true), failure (false)
-
setFlatValue
public boolean setFlatValue(double value)Description copied from interface:ExplicitBootCurveSet the flat value across all the nodes- Parameters:
value- node value- Returns:
- Success (true), failure (false)
-