public class SwaptionDataLattice extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
SwaptionDataLattice.QuotingConvention
Quoting convention for swaption data in a lattice.
|
| Constructor and Description |
|---|
SwaptionDataLattice(LocalDate referenceDate,
SwaptionDataLattice.QuotingConvention quotingConvention,
double displacement,
String forwardCurveName,
String discountCurveName,
SchedulePrototype floatMetaSchedule,
SchedulePrototype fixMetaSchedule,
double[] maturities,
double[] tenors,
double[] moneynesss,
double[] values)
Create the lattice with
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL. |
SwaptionDataLattice(LocalDate referenceDate,
SwaptionDataLattice.QuotingConvention quotingConvention,
double displacement,
String forwardCurveName,
String discountCurveName,
SchedulePrototype floatMetaSchedule,
SchedulePrototype fixMetaSchedule,
int[] maturitiesInMonths,
int[] tenorsInMonths,
int[] moneynessBP,
double[] values)
Create the lattice with
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL. |
SwaptionDataLattice(LocalDate referenceDate,
SwaptionDataLattice.QuotingConvention quotingConvention,
double displacement,
String forwardCurveName,
String discountCurveName,
SchedulePrototype floatMetaSchedule,
SchedulePrototype fixMetaSchedule,
String[] tenorCodes,
int[] moneynessBP,
double[] values)
Create the lattice with
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL. |
SwaptionDataLattice(LocalDate referenceDate,
SwaptionDataLattice.QuotingConvention quotingConvention,
String forwardCurveName,
String discountCurveName,
SchedulePrototype floatMetaSchedule,
SchedulePrototype fixMetaSchedule,
double[] maturities,
double[] tenors,
double[] moneynesss,
double[] values)
Create the lattice.
|
SwaptionDataLattice(LocalDate referenceDate,
SwaptionDataLattice.QuotingConvention quotingConvention,
String forwardCurveName,
String discountCurveName,
SchedulePrototype floatMetaSchedule,
SchedulePrototype fixMetaSchedule,
int[] maturitiesInMonths,
int[] tenorsInMonths,
int[] moneynessBP,
double[] values)
Create the lattice.
|
SwaptionDataLattice(LocalDate referenceDate,
SwaptionDataLattice.QuotingConvention quotingConvention,
String forwardCurveName,
String discountCurveName,
SchedulePrototype floatMetaSchedule,
SchedulePrototype fixMetaSchedule,
String[] tenorCodes,
int[] moneynessBP,
double[] values)
Create the lattice.
|
| Modifier and Type | Method and Description |
|---|---|
SwaptionDataLattice |
append(SwaptionDataLattice other,
AnalyticModel model)
Append the data of another lattice to this lattice.
|
boolean |
containsEntryFor(int maturityInMonths,
int tenorInMonths,
int moneynessBP)
Returns true if the lattice contains an entry at the specified location.
|
SwaptionDataLattice |
convertLattice(SwaptionDataLattice.QuotingConvention targetConvention,
AnalyticModel model)
Convert this lattice to store data in the given convention.
|
SwaptionDataLattice |
convertLattice(SwaptionDataLattice.QuotingConvention targetConvention,
double displacement,
AnalyticModel model)
Convert this lattice to store data in the given convention.
|
String |
getDiscountCurveName() |
double |
getDisplacement() |
SchedulePrototype |
getFixMetaSchedule() |
SchedulePrototype |
getFloatMetaSchedule() |
String |
getForwardCurveName() |
Map<Integer,int[][]> |
getGridNodesPerMoneyness()
Get a view of the locations of swaptions in this lattice.
|
int[] |
getMaturities()
Return all maturities for which data exists.
|
double[] |
getMaturities(double moneyness)
Return all valid maturities for a given moneyness.
|
int[] |
getMaturities(int moneynessBP)
Return all valid maturities for a given moneyness.
|
int[] |
getMoneyness()
Return all levels of moneyness for which data exists.
|
double[] |
getMoneynessAsOffsets()
Return all levels of moneyness for which data exists.
|
SwaptionDataLattice.QuotingConvention |
getQuotingConvention() |
LocalDate |
getReferenceDate() |
int[] |
getTenors()
Return all tenors for which data exists.
|
double[] |
getTenors(double moneyness,
double maturity)
Return all valid tenors for a given moneyness and maturity.
|
int[] |
getTenors(int moneynessBP,
int maturityInMonths)
Return all valid tenors for a given moneyness and maturity.
|
double |
getValue(double maturity,
double tenor,
double moneyness)
Return the value in the quoting convention of this lattice.
|
double |
getValue(double maturity,
double tenor,
double moneyness,
SwaptionDataLattice.QuotingConvention convention,
double displacement,
AnalyticModel model)
Return the value in the given quoting convention.
|
double |
getValue(int maturityInMonths,
int tenorInMonths,
int moneynessBP)
Return the value in the quoting convention of this lattice.
|
double |
getValue(int maturityInMonths,
int tenorInMonths,
int moneynessBP,
SwaptionDataLattice.QuotingConvention convention,
double displacement,
AnalyticModel model)
Return the value in the given quoting convention.
|
double |
getValue(String tenorCode,
int moneynessBP)
Return the value in the quoting convention of this lattice.
|
double |
getValue(String tenorCode,
int moneynessBP,
SwaptionDataLattice.QuotingConvention convention,
double displacement,
AnalyticModel model)
Return the value in the given quoting convention.
|
int |
size() |
String |
toString() |
public SwaptionDataLattice(LocalDate referenceDate, SwaptionDataLattice.QuotingConvention quotingConvention, String forwardCurveName, String discountCurveName, SchedulePrototype floatMetaSchedule, SchedulePrototype fixMetaSchedule, double[] maturities, double[] tenors, double[] moneynesss, double[] values)
referenceDate - The reference date of the swaptions.quotingConvention - The quoting convention of the data.forwardCurveName - The name of the forward curve associated with these swaptions.discountCurveName - The name of the discount curve associated with these swaptions.floatMetaSchedule - The conventions used for the float leg of the swaptions.fixMetaSchedule - The conventions used for the fixed leg of the swaptions.maturities - The maturities of the options as year fraction from the reference date.tenors - The tenors of the swaps as year fraction from the reference date.moneynesss - The moneyness' as actual difference of strike to par swap rate.values - The values to be stored.public SwaptionDataLattice(LocalDate referenceDate, SwaptionDataLattice.QuotingConvention quotingConvention, String forwardCurveName, String discountCurveName, SchedulePrototype floatMetaSchedule, SchedulePrototype fixMetaSchedule, int[] maturitiesInMonths, int[] tenorsInMonths, int[] moneynessBP, double[] values)
referenceDate - The reference date of the swaptions.quotingConvention - The quoting convention of the data.forwardCurveName - The name of the forward curve associated with these swaptions.discountCurveName - The name of the discount curve associated with these swaptions.floatMetaSchedule - The conventions used for the float leg of the swaptions.fixMetaSchedule - The conventions used for the fixed leg of the swaptions.maturitiesInMonths - The maturities of the options as offset in months from the reference date.tenorsInMonths - The tenors of the swaps as offset in months from the option maturity.moneynessBP - The moneyness' in basis points on the par swap rate.values - The values to be stored.public SwaptionDataLattice(LocalDate referenceDate, SwaptionDataLattice.QuotingConvention quotingConvention, String forwardCurveName, String discountCurveName, SchedulePrototype floatMetaSchedule, SchedulePrototype fixMetaSchedule, String[] tenorCodes, int[] moneynessBP, double[] values)
referenceDate - The reference date of the swaptions.quotingConvention - The quoting convention of the data.forwardCurveName - The name of the forward curve associated with these swaptions.discountCurveName - The name of the discount curve associated with these swaptions.floatMetaSchedule - The conventions used for the float leg of the swaptions.fixMetaSchedule - The conventions used for the fixed leg of the swaptions.tenorCodes - The schedules of the swaptions encoded in the format '6M10Y'moneynessBP - The moneyness' in basis points on the par swap rate.values - The values to be stored.public SwaptionDataLattice(LocalDate referenceDate, SwaptionDataLattice.QuotingConvention quotingConvention, double displacement, String forwardCurveName, String discountCurveName, SchedulePrototype floatMetaSchedule, SchedulePrototype fixMetaSchedule, int[] maturitiesInMonths, int[] tenorsInMonths, int[] moneynessBP, double[] values)
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL.referenceDate - The reference date of the swaptions.quotingConvention - The quoting convention of the data.displacement - The displacement used the implied lognormal volatilities.forwardCurveName - The name of the forward curve associated with these swaptions.discountCurveName - The name of the discount curve associated with these swaptions.floatMetaSchedule - The conventions used for the float leg of the swaptions.fixMetaSchedule - The conventions used for the fixed leg of the swaptions.maturitiesInMonths - The maturities of the options as offset in months from the reference date.tenorsInMonths - The tenors of the swaps as offset in months from the option maturity.moneynessBP - The moneyness' in basis points on the par swap rate.values - The values to be stored.public SwaptionDataLattice(LocalDate referenceDate, SwaptionDataLattice.QuotingConvention quotingConvention, double displacement, String forwardCurveName, String discountCurveName, SchedulePrototype floatMetaSchedule, SchedulePrototype fixMetaSchedule, double[] maturities, double[] tenors, double[] moneynesss, double[] values)
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL.referenceDate - The reference date of the swaptions.quotingConvention - The quoting convention of the data.displacement - The displacement used the implied lognormal volatilities.forwardCurveName - The name of the forward curve associated with these swaptions.discountCurveName - The name of the discount curve associated with these swaptions.floatMetaSchedule - The conventions used for the float leg of the swaptions.fixMetaSchedule - The conventions used for the fixed leg of the swaptions.maturities - The maturities of the options as year fraction from the reference date.tenors - The tenors of the swaps as year fraction from the reference date.moneynesss - The moneyness' as actual difference of strike to par swap rate.values - The values to be stored.public SwaptionDataLattice(LocalDate referenceDate, SwaptionDataLattice.QuotingConvention quotingConvention, double displacement, String forwardCurveName, String discountCurveName, SchedulePrototype floatMetaSchedule, SchedulePrototype fixMetaSchedule, String[] tenorCodes, int[] moneynessBP, double[] values)
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL.referenceDate - The reference date of the swaptions.quotingConvention - The quoting convention of the data.displacement - The displacement used the implied lognormal volatilities.forwardCurveName - The name of the forward curve associated with these swaptions.discountCurveName - The name of the discount curve associated with these swaptions.floatMetaSchedule - The conventions used for the float leg of the swaptions.fixMetaSchedule - The conventions used for the fixed leg of the swaptions.tenorCodes - The schedules of the swaptions encoded in the format '6M10Y'moneynessBP - The moneyness' in basis points on the par swap rate.values - The values to be stored.public SwaptionDataLattice convertLattice(SwaptionDataLattice.QuotingConvention targetConvention, AnalyticModel model)
targetConvention - The convention to store the data in.model - The model for context.public SwaptionDataLattice convertLattice(SwaptionDataLattice.QuotingConvention targetConvention, double displacement, AnalyticModel model)
targetConvention - The convention to store the data in.displacement - The displacement to use, if applicable.model - The model for context.public SwaptionDataLattice append(SwaptionDataLattice other, AnalyticModel model)
other - The lattice containing the data to be appended.model - The model to use for context, in case the other lattice follows a different convention.public Map<Integer,int[][]> getGridNodesPerMoneyness()
public int[] getMoneyness()
public double[] getMoneynessAsOffsets()
public int[] getMaturities()
public int[] getMaturities(int moneynessBP)
moneynessBP - The moneyness in bp for which to get the maturities.public double[] getMaturities(double moneyness)
moneyness - The moneyness as actual offset from par swap rate for which to get the maturities.public int[] getTenors()
public int[] getTenors(int moneynessBP,
int maturityInMonths)
moneynessBP - The moneyness in bp for which to get the tenors.maturityInMonths - The maturities in months for which to get the tenors.public double[] getTenors(double moneyness,
double maturity)
moneyness - The moneyness as actual offset from par swap rate for which to get the maturities.maturity - The maturities as year fraction from the reference date.public boolean containsEntryFor(int maturityInMonths,
int tenorInMonths,
int moneynessBP)
maturityInMonths - The maturity in months to check.tenorInMonths - The tenor in months to check.moneynessBP - The moneyness in bp to check.public double getValue(double maturity,
double tenor,
double moneyness)
maturity - The maturity of the option as year fraction from the reference date.tenor - The tenor of the swap as year fraction from the reference date.moneyness - The moneyness as actual difference of strike to par swap rate.public double getValue(int maturityInMonths,
int tenorInMonths,
int moneynessBP)
maturityInMonths - The maturity of the option as offset in months from the reference date.tenorInMonths - The tenor of the swap as offset in months from the option maturity.moneynessBP - The moneyness in basis points on the par swap rate.public double getValue(String tenorCode, int moneynessBP)
tenorCode - The schedule of the swaption encoded in the format '6M10Y'moneynessBP - The moneyness in basis points on the par swap rate.public double getValue(double maturity,
double tenor,
double moneyness,
SwaptionDataLattice.QuotingConvention convention,
double displacement,
AnalyticModel model)
maturity - The maturity of the option as year fraction from the reference date.tenor - The tenor of the swap as year fraction from the reference date.moneyness - The moneyness as actual difference of strike to par swap rate.convention - The desired quoting convention.displacement - The displacement to be used, if converting to log normal implied volatility.model - The model for context.public double getValue(int maturityInMonths,
int tenorInMonths,
int moneynessBP,
SwaptionDataLattice.QuotingConvention convention,
double displacement,
AnalyticModel model)
maturityInMonths - The maturity of the option as offset in months from the reference date.tenorInMonths - The tenor of the swap as offset in months from the option maturity.moneynessBP - The moneyness in basis points on the par swap rate, as understood in the original convention.convention - The desired quoting convention.displacement - The displacement to be used, if converting to log normal implied volatility.model - The model for context.public double getValue(String tenorCode, int moneynessBP, SwaptionDataLattice.QuotingConvention convention, double displacement, AnalyticModel model)
tenorCode - The schedule of the swaption encoded in the format '6M10Y'moneynessBP - The moneyness in basis points on the par swap rate, as understood in the original convention.convention - The desired quoting convention.displacement - The displacement to be used, if converting to log normal implied volatility.model - The model for context.public int size()
public LocalDate getReferenceDate()
public SwaptionDataLattice.QuotingConvention getQuotingConvention()
public double getDisplacement()
SwaptionDataLattice.QuotingConvention.PAYERVOLATILITYLOGNORMAL.public String getForwardCurveName()
public String getDiscountCurveName()
public SchedulePrototype getFloatMetaSchedule()
public SchedulePrototype getFixMetaSchedule()
Copyright © 2019. All rights reserved.