public class SABRCubeCalibration extends Object
SABRVolatilityCube using custom optimization. Increased performance compared to default approach, by using a SABRShiftedSmileCalibration to get
initial values and then splitting the calibration of the entire cube into calibration of slices along individual maturities. The slices do not interact with each other, because
the annuities depend only on sub-tenors of schedules with the same maturity.| Modifier and Type | Class and Description |
|---|---|
protected class |
SABRCubeCalibration.SwaptionInfo
Compact identifier for the swaptions to be created during the optimization.
|
| Constructor and Description |
|---|
SABRCubeCalibration(LocalDate referenceDate,
SwaptionDataLattice cashPayerPremiums,
SwaptionDataLattice cashReceiverPremiums,
SwaptionDataLattice physicalPremiumsATM,
VolatilityCubeModel model,
AnnuityMapping.AnnuityMappingType annuityMappingType)
Create the calibrator.
|
SABRCubeCalibration(LocalDate referenceDate,
SwaptionDataLattice cashPayerPremiums,
SwaptionDataLattice cashReceiverPremiums,
SwaptionDataLattice physicalPremiumsATM,
VolatilityCubeModel model,
AnnuityMapping.AnnuityMappingType annuityMappingType,
double sabrDisplacement,
double sabrBeta,
double correlationDecay,
double iborOisDecorrelation)
Create the calibrator.
|
| Modifier and Type | Method and Description |
|---|---|
protected double[] |
applyParameterBounds(double[] parameters)
Apply bounds to parameters.
|
SABRVolatilityCube |
calibrate(String cubeName,
int[] terminations)
Run the calibration.
|
double |
getBeta() |
double |
getCorrelationDecay() |
double |
getDisplacement() |
double |
getIborOisDecorrelation() |
int |
getMaxIterations() |
int |
getNumberOfThreads() |
double |
getReplicationLowerBound() |
int |
getReplicationNumberOfEvaluationPoints() |
double |
getReplicationUpperBound() |
protected void |
initializeParameters(int maturity)
Prepare the parameters for the start of the calibration.
|
boolean |
isReplicationUseAsOffset() |
boolean |
isUseLinearInterpolation() |
void |
setCalibrationParameters(int maxIterations,
int numberOfThreads)
Set the parameters for calibration.
|
void |
setCorrelationDecay(double correlationDecay) |
void |
setIborOisDecorrelation(double iborOisDecorrelation) |
void |
setInitialParameters(DataTable initialRhos,
DataTable initialBaseVols,
DataTable initialVolvols)
Prepare the parameters for the start of the calibration.
|
void |
setReplicationParameters(boolean useAsOffset,
double lowerBound,
double upperBound,
int numberOfEvaluationPoints)
Set the parameters for the swaption replication.
|
void |
setUseLinearInterpolation(boolean useLinearInterpolation) |
public SABRCubeCalibration(LocalDate referenceDate, SwaptionDataLattice cashPayerPremiums, SwaptionDataLattice cashReceiverPremiums, SwaptionDataLattice physicalPremiumsATM, VolatilityCubeModel model, AnnuityMapping.AnnuityMappingType annuityMappingType)
referenceDate - The reference date of the cube.cashPayerPremiums - The lattice containing market targets for cash settled payer swaptions. The lattice needs to be quoted in QuotingConvention.PRICE.cashReceiverPremiums - The lattice containing market targets for cash settled receiver swaptions. The lattice needs to be quoted in QuotingConvention.PRICE.physicalPremiumsATM - Table containing physical settled swaption atm premiums.model - The model providing context.annuityMappingType - The type of annuity mapping to be used for calibration.IllegalArgumentException - Triggers when data is not provided in QuotingConvention.Price.public SABRCubeCalibration(LocalDate referenceDate, SwaptionDataLattice cashPayerPremiums, SwaptionDataLattice cashReceiverPremiums, SwaptionDataLattice physicalPremiumsATM, VolatilityCubeModel model, AnnuityMapping.AnnuityMappingType annuityMappingType, double sabrDisplacement, double sabrBeta, double correlationDecay, double iborOisDecorrelation)
referenceDate - The reference date of the cube.cashPayerPremiums - The lattice containing market targets for cash settled payer swaptions. The lattice needs to be quoted in QuotingConvention.PRICE.cashReceiverPremiums - The lattice containing market targets for cash settled receiver swaptions. The lattice needs to be quoted in QuotingConvention.PRICE.physicalPremiumsATM - Table containing physical settled swaption atm premiums.model - The model providing context.annuityMappingType - The type of annuity mapping to be used for calibration.sabrDisplacement - The displacement parameter for the SABR curves in the resulting cube.sabrBeta - The beta parameter for the SABR curves in the resulting cube.correlationDecay - The correlation decay parameter for resulting cube.iborOisDecorrelation - The ibor ois decorrelation parameter for the resulting cube.public SABRVolatilityCube calibrate(String cubeName, int[] terminations) throws SolverException
cubeName - The name of the final cube.terminations - The tenors, which are to be calibrated in each slice.SolverException - Thrown when either the calibration of final or initial parameters (if not provided) fails.public void setInitialParameters(DataTable initialRhos, DataTable initialBaseVols, DataTable initialVolvols)
initialRhos - The table of initial values for rhos.initialBaseVols - The table of initial values for base volatilities.initialVolvols - The table of initial values for volvols.protected void initializeParameters(int maturity)
maturity - The maturity for which to calibrate.protected double[] applyParameterBounds(double[] parameters)
parameters - The raw parameters of the cube as array.public void setCalibrationParameters(int maxIterations,
int numberOfThreads)
maxIterations - The maximum number of iterations done during calibration.numberOfThreads - The number of processor threads to be used.public int getMaxIterations()
public int getNumberOfThreads()
public void setReplicationParameters(boolean useAsOffset,
double lowerBound,
double upperBound,
int numberOfEvaluationPoints)
useAsOffset - Are the values of lower and upperBound to be understood as offsets from the par swap rate?lowerBound - The lowest strike allowed.upperBound - The maximal strike allowed.numberOfEvaluationPoints - The number of points to be evaluated during the integration.public boolean isReplicationUseAsOffset()
public double getReplicationLowerBound()
public double getReplicationUpperBound()
public int getReplicationNumberOfEvaluationPoints()
public double getCorrelationDecay()
public void setCorrelationDecay(double correlationDecay)
public double getIborOisDecorrelation()
public void setIborOisDecorrelation(double iborOisDecorrelation)
public double getDisplacement()
public double getBeta()
public boolean isUseLinearInterpolation()
public void setUseLinearInterpolation(boolean useLinearInterpolation)
useLinearInterpolation - Set whether the interpolation of SABR parameters should be linear as opposed to piecewise cubic spline.Copyright © 2019. All rights reserved.