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 Details

    • FlatForwardFXCurve

      public FlatForwardFXCurve​(int epochDate, CurrencyPair currencyPair, double fxSpot, int[] dateArray, double[] fxForwardArray) throws java.lang.Exception
      FlatForwardVolatilityCurve Constructor
      Parameters:
      epochDate - Epoch Date
      currencyPair - Currency Pair
      fxSpot - FX Spot
      dateArray - Array of the Pillar Dates
      fxForwardArray - 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.Exception
      Description copied from class: FXCurve
      Calculate the FX Forward to the given Date
      Specified by:
      fx in class FXCurve
      Parameters:
      date - Date
      Returns:
      The FX Forward
      Throws:
      java.lang.Exception - Thrown if the FX Forward cannot be calculated
    • 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 class FXCurve
      Parameters:
      dateNodeArray - Array of Date Nodes
      valuationParams - Valuation Parameters
      numeratorDiscountCurve - Discount Curve Numerator
      denominatorDiscountCurve - Discount Curve Denominator
      basisOnDenominator - 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 class FXCurve
      Parameters:
      dateNodeArray - Array of Date Nodes
      valuationParams - Valuation Parameters
      numeratorDiscountCurve - Discount Curve Numerator
      denominatorDiscountCurve - Discount Curve Denominator
      basisOnDenominator - 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 class FXCurve
      Parameters:
      dateNodeArray - Array of Date Nodes
      valuationParams - Valuation Parameters
      numeratorDiscountCurve - Discount Curve Numerator
      denominatorDiscountCurve - Discount Curve Denominator
      basisOnDenominator - 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 class FXCurve
      Parameters:
      dateNodeArray - Array of Date Nodes
      valuationParams - Valuation Parameters
      numeratorDiscountCurve - Discount Curve Numerator
      denominatorDiscountCurve - Discount Curve Denominator
      basisOnDenominator - 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.Exception
      Description copied from class: FXCurve
      Calculate the rate implied by the discount curve inputs to a specified date
      Specified by:
      rate in class FXCurve
      Parameters:
      dateNodeArray - Array of Date Nodes
      valuationParams - ValuationParams
      numeratorDiscountCurve - Discount Curve Numerator
      denominatorDiscountCurve - Discount Curve Denominator
      date - Date to which the implied rate is sought
      basisOnDenominator - 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

      public WengertJacobian jackDForwardDManifestMeasure​(java.lang.String manifestMeasure, int date)
      Description copied from class: FXCurve
      Retrieve the Manifest Measure Jacobian of the Forward Rate to the given date
      Specified by:
      jackDForwardDManifestMeasure in class FXCurve
      Parameters:
      manifestMeasure - Manifest Measure
      date - 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 Index
      value - 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 index
      value - 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)