public virtual void recovery_test_blackCurve()
        {
            SurfaceIborCapletFloorletVolatilityBootstrapDefinition definition = SurfaceIborCapletFloorletVolatilityBootstrapDefinition.of(IborCapletFloorletVolatilitiesName.of("test"), USD_LIBOR_3M, ACT_ACT_ISDA, LINEAR, LINEAR);
            DoubleArray strikes = createBlackStrikes();

            for (int i = 0; i < strikes.size(); ++i)
            {
                Pair <IList <Period>, DoubleMatrix> trimedData = trimData(createBlackMaturities(), createBlackDataMatrixForStrike(i));
                RawOptionData data = RawOptionData.of(trimedData.First, DoubleArray.of(strikes.get(i)), ValueType.STRIKE, trimedData.Second, ValueType.BLACK_VOLATILITY);
                IborCapletFloorletVolatilityCalibrationResult           res         = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
                BlackIborCapletFloorletExpiryStrikeVolatilities         resVol      = (BlackIborCapletFloorletExpiryStrikeVolatilities)res.Volatilities;
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, resVol).Amount;
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL);
                }
            }
        }
        public virtual void test_recovery_black_fixedRho()
        {
            SabrIborCapletFloorletVolatilityBootstrapDefinition definition = SabrIborCapletFloorletVolatilityBootstrapDefinition.ofFixedRho(IborCapletFloorletVolatilitiesName.of("test"), USD_LIBOR_3M, ACT_ACT_ISDA, 0.0, CurveInterpolators.STEP_UPPER, CurveExtrapolators.FLAT, CurveExtrapolators.FLAT, SabrHaganVolatilityFunctionProvider.DEFAULT);
            DoubleMatrix  volData    = createFullBlackDataMatrix();
            double        errorValue = 1.0e-3;
            DoubleMatrix  error      = DoubleMatrix.filled(volData.rowCount(), volData.columnCount(), errorValue);
            RawOptionData data       = RawOptionData.of(createBlackMaturities(), createBlackStrikes(), ValueType.STRIKE, volData, error, ValueType.BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult res     = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            SabrParametersIborCapletFloorletVolatilities  resVols = (SabrParametersIborCapletFloorletVolatilities)res.Volatilities;
            double expSq = 0d;

            for (int i = 0; i < NUM_BLACK_STRIKES; ++i)
            {
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_SABR.presentValue(caps[j], RATES_PROVIDER, resVols).Amount;
                    expSq += Math.Pow((priceOrg - priceCalib) / priceOrg / errorValue, 2);
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL * 3d);
                }
            }
            assertEquals(res.ChiSquare, expSq, expSq * 1.0e-14);
            assertEquals(resVols.Index, USD_LIBOR_3M);
            assertEquals(resVols.Name, definition.Name);
            assertEquals(resVols.ValuationDateTime, CALIBRATION_TIME);
            assertEquals(resVols.Parameters.ShiftCurve, definition.ShiftCurve);
            assertEquals(resVols.Parameters.RhoCurve, definition.RhoCurve.get());
        }
        public virtual void recovery_test_blackSurface()
        {
            SurfaceIborCapletFloorletVolatilityBootstrapDefinition definition = SurfaceIborCapletFloorletVolatilityBootstrapDefinition.of(IborCapletFloorletVolatilitiesName.of("test"), USD_LIBOR_3M, ACT_ACT_ISDA, LINEAR, LINEAR);
            DoubleArray   strikes = createBlackStrikes();
            RawOptionData data    = RawOptionData.of(createBlackMaturities(), strikes, ValueType.STRIKE, createFullBlackDataMatrix(), ValueType.BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult   res    = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            BlackIborCapletFloorletExpiryStrikeVolatilities resVol = (BlackIborCapletFloorletExpiryStrikeVolatilities)res.Volatilities;

            for (int i = 0; i < strikes.size(); ++i)
            {
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, resVol).Amount;
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL);
                }
            }
            assertEquals(res.ChiSquare, 0d);
            assertEquals(resVol.Index, USD_LIBOR_3M);
            assertEquals(resVol.Name, definition.Name);
            assertEquals(resVol.ValuationDateTime, CALIBRATION_TIME);
            InterpolatedNodalSurface surface = (InterpolatedNodalSurface)resVol.Surface;

            for (int i = 0; i < surface.ParameterCount; ++i)
            {
                GenericVolatilitySurfacePeriodParameterMetadata metadata = (GenericVolatilitySurfacePeriodParameterMetadata)surface.getParameterMetadata(i);
                assertEquals(metadata.Strike.Value, surface.YValues.get(i));
            }
        }
Пример #4
0
        public virtual void recovery_test_flat()
        {
            DoubleArray initial = DoubleArray.of(0.4, 0.95, 0.5, 0.05);
            SabrIborCapletFloorletVolatilityCalibrationDefinition definition = SabrIborCapletFloorletVolatilityCalibrationDefinition.ofFixedBeta(NAME, USD_LIBOR_3M, ACT_ACT_ISDA, ALPHA_KNOTS, BETA_RHO_KNOTS, NU_KNOTS, initial, LINEAR, FLAT, FLAT, HAGAN);
            DoubleArray   strikes = createBlackStrikes();
            RawOptionData data    = RawOptionData.of(createBlackMaturities(), strikes, ValueType.STRIKE, createFullFlatBlackDataMatrix(), ValueType.BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult res    = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            SabrIborCapletFloorletVolatilities            resVol = (SabrIborCapletFloorletVolatilities)res.Volatilities;

            for (int i = 0; i < NUM_BLACK_STRIKES; ++i)
            {
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsFlatBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_SABR.presentValue(caps[j], RATES_PROVIDER, resVol).Amount;
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL);
                }
            }
        }
Пример #5
0
        public virtual void recovery_test_black_fixedRho()
        {
            double rho = 0.15;
            SabrIborCapletFloorletVolatilityCalibrationDefinition definition = SabrIborCapletFloorletVolatilityCalibrationDefinition.ofFixedRho(NAME, USD_LIBOR_3M, ACT_ACT_ISDA, rho, ALPHA_KNOTS, BETA_RHO_KNOTS, NU_KNOTS, DOUBLE_QUADRATIC, FLAT, FLAT, HAGAN);
            ImmutableList <Period> maturities = createBlackMaturities();
            DoubleArray            strikes    = createBlackStrikes();
            DoubleMatrix           volData    = createFullBlackDataMatrix();
            DoubleMatrix           error      = DoubleMatrix.filled(volData.rowCount(), volData.columnCount(), 1.0e-3);
            RawOptionData          data       = RawOptionData.of(maturities, strikes, ValueType.STRIKE, volData, error, ValueType.BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult res     = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            SabrParametersIborCapletFloorletVolatilities  resVols = (SabrParametersIborCapletFloorletVolatilities)res.Volatilities;

            for (int i = 0; i < NUM_BLACK_STRIKES; ++i)
            {
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_SABR.presentValue(caps[j], RATES_PROVIDER, resVols).Amount;
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL * 5d);
                }
            }
            assertEquals(resVols.Index, USD_LIBOR_3M);
            assertEquals(resVols.Name, definition.Name);
            assertEquals(resVols.ValuationDateTime, CALIBRATION_TIME);
            assertEquals(resVols.ParameterCount, ALPHA_KNOTS.size() + BETA_RHO_KNOTS.size() + NU_KNOTS.size() + 2);     // beta, shift counted
            assertEquals(resVols.Parameters.ShiftCurve, definition.ShiftCurve);
            assertEquals(resVols.Parameters.RhoCurve, definition.RhoCurve.get());
        }
Пример #6
0
        public virtual void test_volatility_sensitivity()
        {
            double eps   = 1.0e-6;
            int    nData = TIME.size();

            for (int i = 0; i < NB_TEST; i++)
            {
                for (int k = 0; k < NB_TEST; k++)
                {
                    double expiryTime = VOLS.relativeTime(TEST_OPTION_EXPIRY[i]);
                    IborCapletFloorletSensitivity point = IborCapletFloorletSensitivity.of(VOLS.Name, expiryTime, TEST_STRIKE[k], TEST_FORWARD, GBP, TEST_SENSITIVITY[i]);
                    double[] sensFd = new double[nData];
                    for (int j = 0; j < nData; j++)
                    {
                        DoubleArray volDataUp            = VOL.subArray(0, nData).with(j, VOL.get(j) + eps);
                        DoubleArray volDataDw            = VOL.subArray(0, nData).with(j, VOL.get(j) - eps);
                        InterpolatedNodalSurface paramUp = InterpolatedNodalSurface.of(METADATA, TIME, STRIKE, volDataUp, INTERPOLATOR_2D);
                        InterpolatedNodalSurface paramDw = InterpolatedNodalSurface.of(METADATA, TIME, STRIKE, volDataDw, INTERPOLATOR_2D);
                        BlackIborCapletFloorletExpiryStrikeVolatilities provUp = BlackIborCapletFloorletExpiryStrikeVolatilities.of(GBP_LIBOR_3M, VAL_DATE_TIME, paramUp);
                        BlackIborCapletFloorletExpiryStrikeVolatilities provDw = BlackIborCapletFloorletExpiryStrikeVolatilities.of(GBP_LIBOR_3M, VAL_DATE_TIME, paramDw);
                        double volUp = provUp.volatility(TEST_OPTION_EXPIRY[i], TEST_STRIKE[k], TEST_FORWARD);
                        double volDw = provDw.volatility(TEST_OPTION_EXPIRY[i], TEST_STRIKE[k], TEST_FORWARD);
                        double fd    = 0.5 * (volUp - volDw) / eps;
                        sensFd[j] = fd * TEST_SENSITIVITY[i];
                    }
                    CurrencyParameterSensitivity sensActual = VOLS.parameterSensitivity(point).Sensitivities.get(0);
                    double[] computed = sensActual.Sensitivity.toArray();
                    assertTrue(DoubleArrayMath.fuzzyEquals(computed, sensFd, eps));
                }
            }
        }
        public virtual void recovery_test_shiftedBlack()
        {
            double        lambdaT    = 0.07;
            double        lambdaK    = 0.07;
            double        error      = 1.0e-5;
            ConstantCurve shiftCurve = ConstantCurve.of("Black shift", 0.02);
            DirectIborCapletFloorletVolatilityDefinition definition = DirectIborCapletFloorletVolatilityDefinition.of(NAME, USD_LIBOR_3M, ACT_ACT_ISDA, lambdaT, lambdaK, INTERPOLATOR, shiftCurve);
            ImmutableList <Period> maturities  = createBlackMaturities();
            DoubleArray            strikes     = createBlackStrikes();
            DoubleMatrix           errorMatrix = DoubleMatrix.filled(maturities.size(), strikes.size(), error);
            RawOptionData          data        = RawOptionData.of(maturities, strikes, STRIKE, createFullBlackDataMatrix(), errorMatrix, BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult          res     = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities resVols = (ShiftedBlackIborCapletFloorletExpiryStrikeVolatilities)res.Volatilities;

            for (int i = 0; i < NUM_BLACK_STRIKES; ++i)
            {
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, resVols).Amount;
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL);
                }
            }
            assertTrue(res.ChiSquare > 0d);
            assertEquals(resVols.Index, USD_LIBOR_3M);
            assertEquals(resVols.Name, definition.Name);
            assertEquals(resVols.ValuationDateTime, CALIBRATION_TIME);
            assertEquals(resVols.ShiftCurve, definition.ShiftCurve.get());
        }
 private System.Func <Surface, IborCapletFloorletVolatilities> blackVolatilitiesFunction(IborIndex index, ZonedDateTime calibrationDateTime)
 {
     System.Func <Surface, IborCapletFloorletVolatilities> func = (Surface s) =>
     {
         return(BlackIborCapletFloorletExpiryStrikeVolatilities.of(index, calibrationDateTime, s));
     };
     return(func);
 }
 //-----------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj.GetType() == this.GetType())
     {
         BlackIborCapletFloorletExpiryStrikeVolatilities other = (BlackIborCapletFloorletExpiryStrikeVolatilities)obj;
         return(JodaBeanUtils.equal(index, other.index) && JodaBeanUtils.equal(valuationDateTime, other.valuationDateTime) && JodaBeanUtils.equal(surface, other.surface));
     }
     return(false);
 }
        private void testSurfaceSensitivity(CurrencyParameterSensitivity computed, BlackIborCapletFloorletExpiryStrikeVolatilities vols, System.Func <IborCapletFloorletVolatilities, CurrencyAmount> valueFn)
        {
            double pvBase = valueFn(vols).Amount;
            InterpolatedNodalSurface surfaceBase = (InterpolatedNodalSurface)vols.Surface;
            int nParams = surfaceBase.ParameterCount;

            for (int i = 0; i < nParams; i++)
            {
                DoubleArray zBumped = surfaceBase.ZValues.with(i, surfaceBase.ZValues.get(i) + EPS_FD);
                InterpolatedNodalSurface surfaceBumped = surfaceBase.withZValues(zBumped);
                BlackIborCapletFloorletExpiryStrikeVolatilities volsBumped = BlackIborCapletFloorletExpiryStrikeVolatilities.of(vols.Index, vols.ValuationDateTime, surfaceBumped);
                double fd = (valueFn(volsBumped).Amount - pvBase) / EPS_FD;
                assertEquals(computed.Sensitivity.get(i), fd, NOTIONAL * EPS_FD);
            }
        }
        public virtual void recovery_test_flat()
        {
            double lambdaT = 0.01;
            double lambdaK = 0.01;
            double error   = 1.0e-3;
            DirectIborCapletFloorletVolatilityDefinition definition = DirectIborCapletFloorletVolatilityDefinition.of(NAME, USD_LIBOR_3M, ACT_ACT_ISDA, lambdaT, lambdaK, INTERPOLATOR);
            ImmutableList <Period> maturities  = createBlackMaturities();
            DoubleArray            strikes     = createBlackStrikes();
            DoubleMatrix           errorMatrix = DoubleMatrix.filled(maturities.size(), strikes.size(), error);
            RawOptionData          data        = RawOptionData.of(maturities, strikes, STRIKE, createFullFlatBlackDataMatrix(), errorMatrix, BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult   res    = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            BlackIborCapletFloorletExpiryStrikeVolatilities resVol = (BlackIborCapletFloorletExpiryStrikeVolatilities)res.Volatilities;
            Surface resSurface = resVol.Surface;
            int     nParams    = resSurface.ParameterCount;

            for (int i = 0; i < nParams; ++i)
            {
                assertEquals(resSurface.getParameter(i), 0.5, 1.0e-11);
            }
        }
        public virtual void test_recovery_flatVol()
        {
            double beta = 0.8;
            SabrIborCapletFloorletVolatilityBootstrapDefinition definition = SabrIborCapletFloorletVolatilityBootstrapDefinition.ofFixedBeta(IborCapletFloorletVolatilitiesName.of("test"), USD_LIBOR_3M, ACT_ACT_ISDA, beta, CurveInterpolators.STEP_UPPER, CurveExtrapolators.FLAT, CurveExtrapolators.FLAT, SabrHaganVolatilityFunctionProvider.DEFAULT);
            RawOptionData data = RawOptionData.of(createBlackMaturities(), createBlackStrikes(), ValueType.STRIKE, createFullFlatBlackDataMatrix(), ValueType.BLACK_VOLATILITY);
            IborCapletFloorletVolatilityCalibrationResult res     = CALIBRATOR.calibrate(definition, CALIBRATION_TIME, data, RATES_PROVIDER);
            SabrParametersIborCapletFloorletVolatilities  resVols = (SabrParametersIborCapletFloorletVolatilities)res.Volatilities;

            for (int i = 0; i < NUM_BLACK_STRIKES; ++i)
            {
                Pair <IList <ResolvedIborCapFloorLeg>, IList <double> > capsAndVols = getCapsFlatBlackVols(i);
                IList <ResolvedIborCapFloorLeg> caps = capsAndVols.First;
                IList <double> vols  = capsAndVols.Second;
                int            nCaps = caps.Count;
                for (int j = 0; j < nCaps; ++j)
                {
                    ConstantSurface volSurface = ConstantSurface.of(Surfaces.blackVolatilityByExpiryStrike("test", ACT_ACT_ISDA), vols[j]);
                    BlackIborCapletFloorletExpiryStrikeVolatilities constVol = BlackIborCapletFloorletExpiryStrikeVolatilities.of(USD_LIBOR_3M, CALIBRATION_TIME, volSurface);
                    double priceOrg   = LEG_PRICER_BLACK.presentValue(caps[j], RATES_PROVIDER, constVol).Amount;
                    double priceCalib = LEG_PRICER_SABR.presentValue(caps[j], RATES_PROVIDER, resVols).Amount;
                    assertEquals(priceOrg, priceCalib, Math.Max(priceOrg, 1d) * TOL);
                }
            }
        }
 /// <summary>
 /// Creates volatilities provider with specified date and index.
 /// </summary>
 /// <param name="valuationDate">  the valuation date </param>
 /// <param name="index">  the index </param>
 /// <returns>  the volatilities provider </returns>
 public static BlackIborCapletFloorletExpiryStrikeVolatilities createBlackVolatilities(ZonedDateTime valuationDate, IborIndex index)
 {
     return(BlackIborCapletFloorletExpiryStrikeVolatilities.of(index, valuationDate, BLACK_SURFACE_EXP_STR));
 }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            double chiSq = 5.5e-12;
            IborCapletFloorletVolatilityCalibrationResult test1 = IborCapletFloorletVolatilityCalibrationResult.ofLeastSquare(VOLS, chiSq);

            coverImmutableBean(test1);
            IborCapletFloorletVolatilityCalibrationResult test2 = IborCapletFloorletVolatilityCalibrationResult.ofRootFind(BlackIborCapletFloorletExpiryStrikeVolatilities.of(GBP_LIBOR_3M, VALUATION, SURFACE));

            coverBeanEquals(test1, test2);
        }