Module net.finmath.lib
Class CapVolMarketData
java.lang.Object
net.finmath.marketdata.model.volatility.caplet.CapVolMarketData
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 Summary
ConstructorsConstructorDescriptionCapVolMarketData(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.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. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getCapVolData(int expiry, double strike)
double
getCapVolData(int i, int j)
int
getColumnIndex(double strike)
int
getExpiryInMonths(int i)
double
getExpiryInYears(int i)
int[]
double[]
getIndex()
int
double
int
int
static String
getOffsetCodeFromIndex(String index)
int
getRowIndex(int expiryInMonths)
double
getShift()
double
getStrike(int j)
double[]
int
int
int
double[][]
void
setCapVolMatrixEntry(int i, int j, double newValue)
-
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:
shift
- The shift of the volatilities.underlyingTenorInMonths
- The underlying tenor in months.underlyingTenorInMonthsBeforeChange
- The underlying tenor in months before the tenor change.capVolatilities
- The matrix with cap volatilities as entries.expiryVectorInMonths
- The expiry dates given in months.strikeVector
- The caplet strikes.index
- The forward curve index.indexBeforeChange
- The forward curve index before the tenor change.discountIndex
- The discount curve index.capTenorStructure
- Enum that determines the currency.tenorChangeTimeInMonths
- The time in months after which the tenor changes.
-
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.capVolatilities
- The matrix with cap volatilities as entries.expiryVectorInMonths
- The expiry dates given in months.strikeVector
- The caplet strikes.capTenorStructure
- Enum that determines the currency.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
-
getUnderlyingTenorInMonths
public int getUnderlyingTenorInMonths() -
getUnderlyingTenorInMonthsBeforeChange
public int getUnderlyingTenorInMonthsBeforeChange() -
getTenorChangeTimeInMonths
public int getTenorChangeTimeInMonths() -
getIndex
-
getIndexBeforeChange
-
getDiscountIndex
-
setCapVolMatrixEntry
public void setCapVolMatrixEntry(int i, int j, double newValue) -
getOffsetCodeFromIndex
-