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 inputsMergedDiscountForwardCurve
bootstrapBasisDC(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)
Bootstrap the discount curve from the discount curve inputsboolean
bumpNodeValue(int nodeIndex, double value)
Bump the node value at the node specified the index by the valuedouble
fx(int date)
Calculate the FX Forward to the given Datedouble
fxSpot()
Retrieve the FX Spotdouble[]
impliedNodeRates(int[] dateNodeArray, ValuationParams valuationParams, MergedDiscountForwardCurve numeratorDiscountCurve, MergedDiscountForwardCurve denominatorDiscountCurve, boolean basisOnDenominator)
Calculate the rates implied by the discount curve inputsWengertJacobian
jackDForwardDManifestMeasure(java.lang.String manifestMeasure, int date)
Retrieve the Manifest Measure Jacobian of the Forward Rate to the given datedouble
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
setFlatValue(double value)
Set the flat value across all the nodesboolean
setNodeValue(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, shiftManifestMeasure
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.drip.analytics.definition.Curve
calibComp, currency, epoch, label, manifestMeasure, setCCIS
Methods 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:FXCurve
Calculate 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:FXCurve
Calculate the set of Zero basis given the input discount curves- Specified by:
zeroBasis
in 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:FXCurve
Calculate the rates implied by the discount curve inputs- Specified by:
impliedNodeRates
in 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:FXCurve
Bootstrap the basis to the discount curve inputs- Specified by:
bootstrapBasis
in 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:FXCurve
Bootstrap the discount curve from the discount curve inputs- Specified by:
bootstrapBasisDC
in 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:FXCurve
Calculate the rate implied by the discount curve inputs to a specified date- Specified by:
rate
in 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:FXCurve
Retrieve the Manifest Measure Jacobian of the Forward Rate to the given date- Specified by:
jackDForwardDManifestMeasure
in 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:ExplicitBootCurve
Set 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:ExplicitBootCurve
Bump 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:ExplicitBootCurve
Set the flat value across all the nodes- Parameters:
value
- node value- Returns:
- Success (true), failure (false)
-