Module net.finmath.lib
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 Summary
Constructors Constructor Description 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.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CapTenorStructure
getCapTenorStructure()
double
getCapVolData(int expiry, double strike)
double
getCapVolData(int i, int j)
int
getColumnIndex(double strike)
String
getDiscountIndex()
int
getExpiryInMonths(int i)
double
getExpiryInYears(int i)
int[]
getExpiryVectorInMonths()
double[]
getExpiryVectorInYears()
String
getIndex()
String
getIndexBeforeChange()
int
getMaxExpiryInMonths()
double
getMaxExpiryInYears()
int
getNumberOfExpiryDates()
int
getNumberOfStrikes()
static String
getOffsetCodeFromIndex(String index)
int
getRowIndex(int expiryInMonths)
double
getShift()
double
getStrike(int j)
double[]
getStrikeVector()
int
getTenorChangeTimeInMonths()
int
getUnderlyingTenorInMonths()
int
getUnderlyingTenorInMonthsBeforeChange()
double[][]
getVolMatrix()
void
setCapVolMatrixEntry(int i, int j, double newValue)
-
-
-
Constructor Detail
-
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 Detail
-
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)
-
-