Class FRAStandardCapFloor

All Implemented Interfaces:
ComponentMarketParamRef

public class FRAStandardCapFloor
extends OptionComponent
FRAStandardCapFloor implements the Caps and Floors on the Standard FRA.



Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • FRAStandardCapFloor

      public FRAStandardCapFloor​(java.lang.String strName, Stream stream, java.lang.String strManifestMeasure, boolean bIsCap, double dblStrike, LastTradingDateSetting ltds, CashSettleParams csp, FokkerPlanckGenerator fpg) throws java.lang.Exception
      FRAStandardCapFloor constructor
      Parameters:
      strName - Name of the Cap/Floor Instance
      stream - The Underlying Stream
      strManifestMeasure - Measure of the Underlying Component
      bIsCap - Is the FRA Option a Cap? TRUE - YES
      dblStrike - Strike of the Underlying Component's Measure
      ltds - Last Trading Date Setting
      csp - Cash Settle Parameters
      fpg - The Fokker Planck Pricer Instance
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • value

      public CaseInsensitiveTreeMap<java.lang.Double> value​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp)
      Description copied from class: Component
      Generate a full list of the Product measures for the full input set of market parameters
      Specified by:
      value in class Component
      Parameters:
      valParams - ValuationParams
      pricerParams - PricerParams
      csqs - Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      Map of measure name and value
    • measureNames

      public java.util.Set<java.lang.String> measureNames()
      Description copied from class: Component
      Retrieve the ordered set of the measure names whose values will be calculated
      Specified by:
      measureNames in class Component
      Returns:
      Set of Measure Names
    • pv

      public double pv​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqc, ValuationCustomizationParams vcp) throws java.lang.Exception
      Description copied from class: Component
      Compute the PV for the specified Market Parameters
      Specified by:
      pv in class Component
      Parameters:
      valParams - ValuationParams
      pricerParams - PricerParams
      csqc - Market Parameters
      vcp - Valuation Customization Parameters
      Returns:
      The PV
      Throws:
      java.lang.Exception - Thrown if the PV cannot be computed
    • stream

      public Stream stream()
      Retrieve the Stream Instance Underlying the Cap
      Returns:
      The Stream Instance Underlying the Cap
    • isCap

      public boolean isCap()
      Indicate if this is a Cap or Floor
      Returns:
      TRUE - The Product is a Cap
    • capFloorlets

      public java.util.List<FRAStandardCapFloorlet> capFloorlets()
      Retrieve the List of the Underlying Caplets/Floorlets
      Returns:
      The List of the Underlying Caplets/Floorlets
    • atmPriceFromVolatility

      public double atmPriceFromVolatility​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, double dblFlatVolatility) throws java.lang.Exception
      Compute the ATM Cap/Floor Price from the Flat Volatility
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer Parameters
      csqs - The Market Parameters
      vcp - The Valuation Customization Parameters
      dblFlatVolatility - The Flat Volatility
      Returns:
      The Cap/Floor ATM Price
      Throws:
      java.lang.Exception - Thrown if the ATM Price cannot be calculated
    • volatilityFromATMPrice

      public double volatilityFromATMPrice​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, double dblCalibPrice) throws java.lang.Exception
      Imply the Flat Cap/Floor Volatility from the Calibration ATM Price
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer Parameters
      csqs - The Market Parameters
      vcp - The Valuation Customization Parameters
      dblCalibPrice - The Calibration Price
      Returns:
      The Cap/Floor Flat Volatility
      Throws:
      java.lang.Exception - Thrown if the Flat Volatility cannot be calculated
    • priceFromFlatVolatility

      public double priceFromFlatVolatility​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, double dblFlatVolatility) throws java.lang.Exception
      Compute the Cap/Floor Price from the Flat Volatility
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer Parameters
      csqs - The Market Parameters
      vcp - The Valuation Customization Parameters
      dblFlatVolatility - The Flat Volatility
      Returns:
      The Cap/Floor Price
      Throws:
      java.lang.Exception - Thrown if the Price cannot be calculated
    • flatVolatilityFromPrice

      public double flatVolatilityFromPrice​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, double dblCalibPrice) throws java.lang.Exception
      Imply the Flat Cap/Floor Volatility from the Calibration Price
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The Pricer Parameters
      csqs - The Market Parameters
      vcp - The Valuation Customization Parameters
      dblCalibPrice - The Calibration Price
      Returns:
      The Cap/Floor Flat Volatility
      Throws:
      java.lang.Exception - Thrown if the Price cannot be calculated
    • stripPiecewiseForwardVolatility

      public boolean stripPiecewiseForwardVolatility​(ValuationParams valParams, CreditPricerParams pricerParams, CurveSurfaceQuoteContainer csqs, ValuationCustomizationParams vcp, double dblCapVolatility, java.util.Map<JulianDate,​java.lang.Double> mapDateVol)
      Strip the Piece-wise Constant Forward Rate Volatility of the Unmarked Segment of the Volatility Term Structure
      Parameters:
      valParams - The Valuation Parameters
      pricerParams - The pricer Parameters
      csqs - The Market Parameters
      vcp - The Valuation Customization Parameters
      dblCapVolatility - The Flat Cap Volatility
      mapDateVol - The Date/Volatility Map
      Returns:
      TRUE - The Forward Rate Volatility of the Unmarked Segment of the Volatility Term Structure successfully implied
    • volatilityPRWC

      Description copied from class: CalibratableComponent
      Generate the Calibratable Linearized Predictor/Response Constraint Weights for the Non-merged Volatility Latent State from the Component's Cash Flows. The Constraints here typically correspond to Date/Cash Flow pairs and the corresponding leading PV.
      Specified by:
      volatilityPRWC in class CalibratableComponent
      Parameters:
      valParams - Valuation Parameters
      pricerParams - Pricer Parameters
      csqs - Component Market Parameters
      vcp - Valuation Customization Parameters
      pqs - Product Quote Set
      Returns:
      The Calibratable Linearized Predictor/Response Constraints (Date/Cash Flow pairs and the corresponding PV)