Class CapVolMarketData

java.lang.Object
net.finmath.marketdata.model.volatility.caplet.CapVolMarketData

public class CapVolMarketData extends Object
This class is a container for all the cap data needed to perform the caplet bootstrapping.
Author:
Daniel Willhalm, Christian Fries (review and fixes)
  • Constructor Details

    • CapVolMarketData

      public CapVolMarketData(String index, String discountIndex, String indexBeforeChange, CapTenorStructure capTenorStructure, int[] expiryVectorInMonths, double[] strikeVector, double[][] capVolatilities, double shift, int underlyingTenorInMonths, int tenorChangeTimeInMonths, int underlyingTenorInMonthsBeforeChange)
      The constructor of the cap volatility market data class. In case the underlying tenor changes throughout the expiry dates two indexes and tenors are submitted as parameters.
      Parameters:
      index - The forward curve index.
      discountIndex - The discount curve index.
      indexBeforeChange - The forward curve index before the tenor change.
      capTenorStructure - Enum that determines the currency.
      expiryVectorInMonths - The expiry dates given in months.
      strikeVector - The caplet strikes.
      capVolatilities - The matrix with cap volatilities as entries.
      shift - The shift of the volatilities.
      underlyingTenorInMonths - The underlying tenor in months.
      tenorChangeTimeInMonths - The time in months after which the tenor changes.
      underlyingTenorInMonthsBeforeChange - The underlying tenor in months before the tenor change.
    • CapVolMarketData

      public CapVolMarketData(String index, String discountIndex, CapTenorStructure capTenorStructure, int[] expiryVectorInMonths, double[] strikeVector, double[][] capVolatilities, double shift, int underlyingTenorInMonths)
      Overloaded constructor of the cap volatility market data class that assumes no tenor change.
      Parameters:
      index - The forward curve index.
      discountIndex - The discount curve index.
      capTenorStructure - Enum that determines the currency.
      expiryVectorInMonths - The expiry dates given in months.
      strikeVector - The caplet strikes.
      capVolatilities - The matrix with cap volatilities as entries.
      shift - The shift of the volatilities.
      underlyingTenorInMonths - The underlying tenor in months.
  • Method Details

    • getCapVolData

      public double getCapVolData(int expiry, double strike)
    • getCapVolData

      public double getCapVolData(int i, int j)
    • getShift

      public double getShift()
    • getNumberOfStrikes

      public int getNumberOfStrikes()
    • getNumberOfExpiryDates

      public int getNumberOfExpiryDates()
    • getMaxExpiryInMonths

      public int getMaxExpiryInMonths()
    • getMaxExpiryInYears

      public double getMaxExpiryInYears()
    • getExpiryInMonths

      public int getExpiryInMonths(int i)
    • getExpiryInYears

      public double getExpiryInYears(int i)
    • getVolMatrix

      public double[][] getVolMatrix()
    • getStrikeVector

      public double[] getStrikeVector()
    • getExpiryVectorInMonths

      public int[] getExpiryVectorInMonths()
    • getExpiryVectorInYears

      public double[] getExpiryVectorInYears()
    • getRowIndex

      public int getRowIndex(int expiryInMonths)
    • getStrike

      public double getStrike(int j)
    • getColumnIndex

      public int getColumnIndex(double strike)
    • getCapTenorStructure

      public CapTenorStructure getCapTenorStructure()
    • getUnderlyingTenorInMonths

      public int getUnderlyingTenorInMonths()
    • getUnderlyingTenorInMonthsBeforeChange

      public int getUnderlyingTenorInMonthsBeforeChange()
    • getTenorChangeTimeInMonths

      public int getTenorChangeTimeInMonths()
    • getIndex

      public String getIndex()
    • getIndexBeforeChange

      public String getIndexBeforeChange()
    • getDiscountIndex

      public String getDiscountIndex()
    • setCapVolMatrixEntry

      public void setCapVolMatrixEntry(int i, int j, double newValue)
    • getOffsetCodeFromIndex

      public static String getOffsetCodeFromIndex(String index)