public virtual void test_combinedWith_mutable() { SwaptionSabrSensitivity @base = SwaptionSabrSensitivity.of(NAME, EXPIRY, TENOR, SabrParameterType.ALPHA, GBP, 32d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(@base); PointSensitivityBuilder test = @base.combinedWith(new MutablePointSensitivities()); assertEquals(test, expected); }
public virtual void test_combinedWith_mutable() { OvernightRateSensitivity @base = OvernightRateSensitivity.of(GBP_SONIA_OBSERVATION, 32d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(@base); PointSensitivityBuilder test = @base.combinedWith(new MutablePointSensitivities()); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { ZeroRateSensitivity base1 = ZeroRateSensitivity.of(GBP, YEARFRAC, 32d); ZeroRateSensitivity base2 = ZeroRateSensitivity.of(GBP, YEARFRAC2, 22d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { IborRateSensitivity base1 = IborRateSensitivity.of(GBP_LIBOR_3M_OBSERVATION, 32d); IborRateSensitivity base2 = IborRateSensitivity.of(GBP_LIBOR_3M_OBSERVATION2, 22d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { CreditCurveZeroRateSensitivity base1 = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, 32d); CreditCurveZeroRateSensitivity base2 = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, 22d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { InflationRateSensitivity base1 = InflationRateSensitivity.of(CH_CPI_OBS, 5.0); InflationRateSensitivity base2 = InflationRateSensitivity.of(CH_CPI_OBS, 7.0); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { SwaptionSensitivity base1 = SwaptionSensitivity.of(NAME, EXPIRY, TENOR, STRIKE, FORWARD, GBP, 32d); SwaptionSensitivity base2 = SwaptionSensitivity.of(NAME, EXPIRY, TENOR, STRIKE, FORWARD, GBP, 22d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { FxIndexSensitivity base1 = FxIndexSensitivity.of(GBP_USD_WM_OBS, USD, GBP, SENSITIVITY_VALUE); FxIndexSensitivity base2 = FxIndexSensitivity.of(GBP_USD_WM_OBS, USD, GBP, 4.25d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { IborCapletFloorletSabrSensitivity base1 = IborCapletFloorletSabrSensitivity.of(NAME, EXPIRY, SabrParameterType.ALPHA, GBP, 32d); IborCapletFloorletSabrSensitivity base2 = IborCapletFloorletSabrSensitivity.of(NAME, EXPIRY, SabrParameterType.ALPHA, GBP, 22d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }
//------------------------------------------------------------------------- public virtual void test_combinedWith() { OvernightRateSensitivity base1 = OvernightRateSensitivity.of(GBP_SONIA_OBSERVATION, 32d); OvernightRateSensitivity base2 = OvernightRateSensitivity.of(OvernightIndexObservation.of(GBP_SONIA, date(2015, 10, 27), REF_DATA), 22d); MutablePointSensitivities expected = new MutablePointSensitivities(); expected.add(base1).add(base2); PointSensitivityBuilder test = base1.combinedWith(base2); assertEquals(test, expected); }