Class SABRShiftedSmileCalibration


  • public class SABRShiftedSmileCalibration
    extends Object
    Calibration of a SABRVolatilityCube by shifting increments in the market data of cash settled swaptions onto physically settled swaptions and calibrating a SABR model on the resulting smiles. The calibration happens per node and is thus much faster than a calibration of the whole cube at once.
    Author:
    Christian Fries, Roland Bachl
    • Constructor Detail

      • SABRShiftedSmileCalibration

        public SABRShiftedSmileCalibration​(LocalDate referenceDate,
                                           SwaptionDataLattice cashPayerPremiums,
                                           SwaptionDataLattice cashReceiverPremiums,
                                           SwaptionDataLattice physicalPremiumsATM,
                                           AnalyticModel model,
                                           double sabrDisplacement,
                                           double sabrBeta,
                                           double correlationDecay,
                                           double iborOisDecorrelation)
        Create the calibrator to be able to modify calibration parameters before building the cube.
        Parameters:
        referenceDate - The reference date of the calibrated cube.
        cashPayerPremiums - Lattice containing cash settled payer swaption premiums.
        cashReceiverPremiums - Lattice containing cash settled receiver swaption premiums.
        physicalPremiumsATM - Table containing physical settled swaption atm premiums.
        model - The model providing context.
        sabrDisplacement - The displacement parameter the SABR smiles of the cube is supposed to have.
        sabrBeta - The beta parameter the SABR smiles of the cubes are supposed to have.
        correlationDecay - The correlation decay parameter the cube is supposed to have.
        iborOisDecorrelation - The ibor ois decorrelation parameter the calibrated cube is supposed to have.
    • Method Detail

      • createSABRVolatilityCube

        public static SABRVolatilityCube createSABRVolatilityCube​(String name,
                                                                  LocalDate referenceDate,
                                                                  SwaptionDataLattice cashPayerPremiums,
                                                                  SwaptionDataLattice cashReceiverPremiums,
                                                                  SwaptionDataLattice physicalPremiumsATM,
                                                                  AnalyticModel model,
                                                                  double sabrDisplacement,
                                                                  double sabrBeta,
                                                                  double correlationDecay,
                                                                  double iborOisDecorrelation)
                                                           throws SolverException
        Calibrate a cube via shifting cash settled swaption smiles onto physically settled swaption atm volatility. Using the default calibration parameters.
        Parameters:
        name - The name of the calibrated cube.
        referenceDate - The reference date of the tables.
        cashPayerPremiums - Lattice containing cash settled payer swaption premiums.
        cashReceiverPremiums - Lattice containing cash settled receiver swaption premiums.
        physicalPremiumsATM - Table containing physical settled swaption atm premiums.
        model - The model for context.
        sabrDisplacement - The displacement parameter the SABR smiles of the cube is supposed to have.
        sabrBeta - The beta parameter the SABR smiles of the cubes are supposed to have.
        correlationDecay - The correlation decay parameter the cube is supposed to have.
        iborOisDecorrelation - The ibor ois decorrelation parameter the calibrated cube is sipposed to have.
        Returns:
        The calibrated cube.
        Throws:
        SolverException - Thrown when solvers fail to find suitable parameters.
      • createVolatilityCubeLattice

        public static Map<Integer,​DataTable> createVolatilityCubeLattice​(String name,
                                                                               LocalDate referenceDate,
                                                                               SwaptionDataLattice cashPayerPremiums,
                                                                               SwaptionDataLattice cashReceiverPremiums,
                                                                               SwaptionDataLattice physicalPremiumsATM,
                                                                               AnalyticModel model)
        Return all data points as volatilities that serve as calibration targets. Points are sorted into maps according to their strike in moneyness.
        Parameters:
        name - The name of the tables. Will be amended by their strike in moneyness.
        referenceDate - The reference date of the tables.
        cashPayerPremiums - Lattice containing cash settled payer swaption premiums.
        cashReceiverPremiums - Lattice containing cash settled receiver swaption premiums.
        physicalPremiumsATM - Table containing physical settled swaption atm premiums.
        model - The model for context.
        Returns:
        The set of maps containing market data volatility points.
      • build

        public SABRVolatilityCube build​(String name)
                                 throws SolverException
        Perform the calibrations and build the cube.
        Parameters:
        name - The name of the cube.
        Returns:
        The calibrated cube.
        Throws:
        SolverException - Thrown when solvers fail to find suitable parameters.
      • setCalibrationParameters

        public void setCalibrationParameters​(int maxIterations,
                                             int numberOfThreads)
        Set the parameters for calibration.
        Parameters:
        maxIterations - The maximum number of iterations done during calibration.
        numberOfThreads - The number of processor threads to be used.
      • getMaxIterations

        public int getMaxIterations()
        Returns:
        The maximum number of iterations of the optimizer.
      • getNumberOfThreads

        public int getNumberOfThreads()
        Returns:
        The number of threads the optimizer is allowed to use.
      • isUseLinearInterpolation

        public boolean isUseLinearInterpolation()
        Returns:
        True if tables holding SABR parameters use linear interpolation, false if piecewise cubic spline.
      • setUseLinearInterpolation

        public void setUseLinearInterpolation​(boolean useLinearInterpolation)
        Parameters:
        useLinearInterpolation - Set whether the interpolation of SABR parameters should be linear as opposed to piecewise cubic spline.