public class VolatilityCubeFactory extends Object
| Constructor and Description |
|---|
VolatilityCubeFactory(LocalDate referenceDate,
SwaptionDataLattice cashPayerPremiums,
SwaptionDataLattice cashReceiverPremiums,
SwaptionDataLattice physicalPremiumsATM,
double displacement,
double beta,
double correlationDecay,
double iborOisDecorrelation,
AnnuityMapping.AnnuityMappingType annuityMappingType)
Create the factory.
|
public VolatilityCubeFactory(LocalDate referenceDate, SwaptionDataLattice cashPayerPremiums, SwaptionDataLattice cashReceiverPremiums, SwaptionDataLattice physicalPremiumsATM, double displacement, double beta, double correlationDecay, double iborOisDecorrelation, AnnuityMapping.AnnuityMappingType annuityMappingType)
referenceDate - The reference date the cubes will have.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.displacement - The displacement a cube should use.beta - The SABR beta parameter SABR cube should use.correlationDecay - The correlation decay parameter a cube should use.iborOisDecorrelation - The ibor ois decorrelation a cube should use.annuityMappingType - The type of annuity mapping to use when building the cube.public SABRVolatilityCubeParallel buildParallelSABRCube(String name, double rho, double volvol, SwaptionDataLattice physicalATMSwaptions, VolatilityCubeModel model)
SABRVolatilityCubeParallel from parameters via SABRVolatilityCubeParallelFactory.name - The name of the cube.rho - The SABR parameter rho.volvol - The SABR volvol parameter.physicalATMSwaptions - Lattice containing at-the-money values of physically settled swaptions.model - The model for context.public SABRVolatilityCube buildShiftedSmileSABRCube(String name, VolatilityCubeModel model) throws SolverException
SABRVolatilityCube by calibration via SABRShiftedSmileCalibration.name - The name of the cube.model - The model for context.SolverException - Thrown when solvers fail to find suitable parameters.public SABRVolatilityCube buildSABRVolatilityCube(String name, VolatilityCubeModel model, int[] terminations) throws SolverException
SABRVolatilityCube by calibration via SABRCubeCalibration.name - The name of the cube.model - The model for context.terminations - The terminations to calibrate to in each slice.SolverException - Thrown when either the calibration of final or initial parameters (if not provided) fails.public SABRVolatilityCube buildSABRVolatilityCube(String name, VolatilityCubeModel model, int[] terminations, DataTable initialRhos, DataTable initialBaseVols, DataTable initialVolvols) throws SolverException
SABRVolatilityCube by calibration via SABRCubeCalibration.name - The name of the cube.model - The model for context.terminations - The terminations to calibrate to in each slice.initialRhos - Table containing initial rhos for the calibration.initialBaseVols - Table containing initial base volatilities for the calibration.initialVolvols - Table containing initial volvols for the calibration.SolverException - Thrown when either the calibration of final or initial parameters (if not provided) fails.public int getNumberOfThreads()
public int getMaxIterations()
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 void setReplicationParameters(double lowerBound,
double upperBound,
int numberOfEvaluationPoints)
lowerBound - The lowest swap rate to be evaluated.upperBound - The highest swap rate to be evaluated.numberOfEvaluationPoints - The number of points to be evaluated during replication.public double getReplicationLowerBound()
public double getReplicationUpperBound()
public double getReplicationNumberOfEvaluationPoints()
Copyright © 2019. All rights reserved.