java.lang.Object
net.finmath.singleswaprate.Utils
A collection of utility methods for dealing with the
net.finmath.singleswaprate
package.- Author:
- Christian Fries, Roland Bachl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SwaptionDataLattice
convertCashLatticeToNormalVolatility(SwaptionDataLattice cashLattice, VolatilityCubeModel model)
Convert a lattice containing cash settled swaption prices to payer normal volatilities.static SwaptionDataLattice
convertMapOfTablesToLattice(Map<Integer,DataTable> tables, SwaptionDataLattice.QuotingConvention quotingConvention, LocalDate referenceDate, String discountCurveName, String forwardCurveName, SchedulePrototype fixMetaSchedule, SchedulePrototype floatMetaSchedule)
Convert a map ofDataTable
containing swaption data to aSwaptionDataLattice
.static SwaptionDataLattice
convertTableToLattice(DataTable table, SwaptionDataLattice.QuotingConvention quotingConvention, LocalDate referenceDate, String discountCurveName, String forwardCurveName, SchedulePrototype fixMetaSchedule, SchedulePrototype floatMetaSchedule)
Convert aDataTable
containing swaption data to aSwaptionDataLattice
.static SwaptionDataLattice
shiftCashToPhysicalSmile(VolatilityCubeModel model, SwaptionDataLattice physicalSwaptions, SwaptionDataLattice... cashSwaptions)
Create smiles for physically settled swaptions by shifting the smiles from cash settled swaptions onto atm levels of physically settled swaptions.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
convertTableToLattice
public static SwaptionDataLattice convertTableToLattice(DataTable table, SwaptionDataLattice.QuotingConvention quotingConvention, LocalDate referenceDate, String discountCurveName, String forwardCurveName, SchedulePrototype fixMetaSchedule, SchedulePrototype floatMetaSchedule)Convert aDataTable
containing swaption data to aSwaptionDataLattice
. The table needs to be inDataTable.TableConvention.MONTHS
.- Parameters:
table
- The table in conventionDataTable.TableConvention.MONTHS
containing swaption data.quotingConvention
- The quoting convention of the data.referenceDate
- The reference date associated with the swaptions.discountCurveName
- The name of the discount curve to be used for the swaptions.forwardCurveName
- The name of the forward curve to be used for the swaptions.fixMetaSchedule
- The ScheduleMetaData to be used for the fix schedules of the swaptions.floatMetaSchedule
- The ScheduleMetaData to be used for the float schedules of the swaptions.- Returns:
- SwaptionDataLattice containing the swaptions of the table.
-
convertMapOfTablesToLattice
public static SwaptionDataLattice convertMapOfTablesToLattice(Map<Integer,DataTable> tables, SwaptionDataLattice.QuotingConvention quotingConvention, LocalDate referenceDate, String discountCurveName, String forwardCurveName, SchedulePrototype fixMetaSchedule, SchedulePrototype floatMetaSchedule)Convert a map ofDataTable
containing swaption data to aSwaptionDataLattice
. The data of the swaptions is arranged in tables by moneyness, which is used as key in the map. The tables need to be inDataTable.TableConvention.MONTHS
.- Parameters:
tables
- A map of tables, containing swaption data in conventionDataTable.TableConvention.MONTHS
, per moneyness.quotingConvention
- The quoting convention of the data.referenceDate
- The reference date associated with the swaptions.discountCurveName
- The name of the discount curve to be used for the swaptions.forwardCurveName
- The name of the forward curve to be used for the swaptions.fixMetaSchedule
- The ScheduleMetaData to be used for the fix schedules of the swaptions.floatMetaSchedule
- The ScheduleMetaData to be used for the float schedules of the swaptions.- Returns:
- SwaptionDataLattice containing the swaptions of the tables.
-
shiftCashToPhysicalSmile
public static SwaptionDataLattice shiftCashToPhysicalSmile(VolatilityCubeModel model, SwaptionDataLattice physicalSwaptions, SwaptionDataLattice... cashSwaptions)Create smiles for physically settled swaptions by shifting the smiles from cash settled swaptions onto atm levels of physically settled swaptions.- Parameters:
model
- Contains curves to translate swaption data to normal volatility. Can be null, if data already in normal volatility.physicalSwaptions
- The physically settled atm swaptions.cashSwaptions
- The smile points with corresponding atm nodes of cash swaptions.- Returns:
- The lattice containing the shifted physically settled swaption smiles.
-
convertCashLatticeToNormalVolatility
public static SwaptionDataLattice convertCashLatticeToNormalVolatility(SwaptionDataLattice cashLattice, VolatilityCubeModel model)Convert a lattice containing cash settled swaption prices to payer normal volatilities. Conversion assumes put-call-parity.- Parameters:
cashLattice
- The lattice of cash settled swaptions.model
- The model containing curves for conversion.- Returns:
- The converted lattice.
-