public virtual void test_forwardFxRatePointSensitivity()
        {
            PointSensitivityBuilder computed = PRICER.forwardFxRatePointSensitivity(FWD, PROVIDER);
            FxForwardSensitivity    expected = FxForwardSensitivity.of(CurrencyPair.of(USD, KRW), USD, FWD.PaymentDate, 1d);

            assertEquals(computed, expected);
        }
        public virtual void test_compareExcludingSensitivity()
        {
            FxOptionSensitivity a1    = FxOptionSensitivity.of(NAME, PAIR, EXPIRY, STRIKE, FORWARD, GBP, SENSI_VALUE);
            FxOptionSensitivity a2    = FxOptionSensitivity.of(NAME, PAIR, EXPIRY, STRIKE, FORWARD, GBP, SENSI_VALUE);
            FxOptionSensitivity b     = FxOptionSensitivity.of(NAME, CurrencyPair.of(EUR, USD), EXPIRY, STRIKE, FORWARD, GBP, SENSI_VALUE);
            FxOptionSensitivity c     = FxOptionSensitivity.of(NAME, PAIR, EXPIRY + 1, STRIKE, FORWARD, GBP, SENSI_VALUE);
            FxOptionSensitivity d     = FxOptionSensitivity.of(NAME, PAIR, EXPIRY, 0.96, FORWARD, GBP, SENSI_VALUE);
            FxOptionSensitivity e     = FxOptionSensitivity.of(NAME, PAIR, EXPIRY, STRIKE, 0.81, GBP, SENSI_VALUE);
            FxOptionSensitivity f     = FxOptionSensitivity.of(NAME, PAIR, EXPIRY, STRIKE, FORWARD, EUR, SENSI_VALUE);
            ZeroRateSensitivity other = ZeroRateSensitivity.of(GBP, 2d, 32d);

            assertEquals(a1.compareKey(a2), 0);
            assertEquals(a1.compareKey(b) < 0, true);
            assertEquals(b.compareKey(a1) > 0, true);
            assertEquals(a1.compareKey(c) < 0, true);
            assertEquals(c.compareKey(a1) > 0, true);
            assertEquals(a1.compareKey(d) < 0, true);
            assertEquals(d.compareKey(a1) > 0, true);
            assertEquals(a1.compareKey(e) < 0, true);
            assertEquals(e.compareKey(a1) > 0, true);
            assertEquals(a1.compareKey(f) > 0, true);
            assertEquals(f.compareKey(a1) < 0, true);
            assertEquals(a1.compareKey(other) < 0, true);
            assertEquals(other.compareKey(a1) > 0, true);
        }
Example #3
0
 //-------------------------------------------------------------------------
 public virtual void coverage()
 {
     FxForwardSensitivity test1 = FxForwardSensitivity.of(CURRENCY_PAIR, GBP, REFERENCE_DATE, SENSITIVITY);
     coverImmutableBean(test1);
     FxForwardSensitivity test2 = FxForwardSensitivity.of(CurrencyPair.of(USD, JPY), JPY, date(2015, 9, 27), 4.25d);
     coverBeanEquals(test1, test2);
 }
Example #4
0
        //-------------------------------------------------------------------------
        public virtual void test_toFxForwardSensitivity()
        {
            FxIndexSensitivity   test         = FxIndexSensitivity.of(GBP_USD_WM_OBS, GBP, USD, SENSITIVITY_VALUE);
            LocalDate            maturityDate = GBP_USD_WM.calculateMaturityFromFixing(FIXING_DATE, REF_DATA);
            FxForwardSensitivity expected     = FxForwardSensitivity.of(CurrencyPair.of(GBP, USD), GBP, maturityDate, USD, SENSITIVITY_VALUE);

            assertEquals(test.toFxForwardSensitivity(), expected);
        }
        public virtual void coverage()
        {
            FxOptionSensitivity test1 = FxOptionSensitivity.of(NAME, PAIR, EXPIRY, STRIKE, FORWARD, GBP, SENSI_VALUE);

            coverImmutableBean(test1);
            FxOptionSensitivity test2 = FxOptionSensitivity.of(NAME2, CurrencyPair.of(EUR, USD), EXPIRY, 0.8, 0.9, EUR, 1.1);

            coverBeanEquals(test1, test2);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            FxOptionVolatilitiesNode test1 = FxOptionVolatilitiesNode.of(EUR_GBP, SPOT_DATE_OFFSET, BDA, ValueType.BLACK_VOLATILITY, QUOTE_ID, Tenor.TENOR_3M, STRIKE);

            coverImmutableBean(test1);
            FxOptionVolatilitiesNode test2 = FxOptionVolatilitiesNode.of(CurrencyPair.of(GBP, USD), DaysAdjustment.NONE, BusinessDayAdjustment.NONE, ValueType.RISK_REVERSAL, QuoteId.of(StandardId.of("OG", "foo")), Tenor.TENOR_6M, DeltaStrike.of(0.1));

            coverBeanEquals(test1, test2);
        }
        public virtual void test_of_amounts_switchOrder()
        {
            ResolvedFxSingle test = ResolvedFxSingle.of(USD_M1600, GBP_P1000, DATE_2015_06_30);

            assertEquals(test.BaseCurrencyPayment, PAYMENT_GBP_P1000);
            assertEquals(test.CounterCurrencyPayment, PAYMENT_USD_M1600);
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, GBP_P1000);
        }
        public virtual void test_of_rate_switchOrder()
        {
            FxSingle test = FxSingle.of(USD_M1600, FxRate.of(USD, GBP, 1d / 1.6d), DATE_2015_06_30);

            assertEquals(test.BaseCurrencyAmount, GBP_P1000);
            assertEquals(test.CounterCurrencyAmount, USD_M1600);
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, GBP_P1000);
        }
        public virtual void test_of_amounts_bothZero()
        {
            ResolvedFxSingle test = ResolvedFxSingle.of(CurrencyAmount.zero(GBP), CurrencyAmount.zero(USD), DATE_2015_06_30);

            assertEquals(test.BaseCurrencyPayment, Payment.of(CurrencyAmount.zero(GBP), DATE_2015_06_30));
            assertEquals(test.CounterCurrencyPayment, Payment.of(CurrencyAmount.zero(USD), DATE_2015_06_30));
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, CurrencyAmount.zero(USD));
        }
        public virtual void test_builder_switchOrder()
        {
            FxSingle test = FxSingle.meta().builder().set(FxSingle.meta().baseCurrencyPayment(), Payment.of(USD_M1600, DATE_2015_06_30)).set(FxSingle.meta().counterCurrencyPayment(), Payment.of(GBP_P1000, DATE_2015_06_30)).build();

            assertEquals(test.BaseCurrencyAmount, GBP_P1000);
            assertEquals(test.CounterCurrencyAmount, USD_M1600);
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, GBP_P1000);
        }
        //-------------------------------------------------------------------------
        public virtual void test_of_rate_rightOrder()
        {
            ResolvedFxSingle test = ResolvedFxSingle.of(GBP_P1000, FxRate.of(GBP, USD, 1.6d), DATE_2015_06_30);

            assertEquals(test.BaseCurrencyPayment, Payment.of(GBP_P1000, DATE_2015_06_30));
            assertEquals(test.CounterCurrencyPayment, Payment.of(USD_M1600, DATE_2015_06_30));
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, GBP_P1000);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @DataProvider(name = "currencyPair") public static Object[][] data_currency_pair()
        public static object[][] data_currency_pair()
        {
            return(new object[][]
            {
                new object[] { FxSwapConventions.EUR_USD, CurrencyPair.of(EUR, USD) },
                new object[] { FxSwapConventions.EUR_GBP, CurrencyPair.of(EUR, GBP) },
                new object[] { FxSwapConventions.GBP_USD, CurrencyPair.of(GBP, USD) },
                new object[] { FxSwapConventions.GBP_JPY, CurrencyPair.of(GBP, JPY) }
            });
        }
        public virtual void test_of_rate_bothZero()
        {
            FxSingle test = FxSingle.of(CurrencyAmount.zero(GBP), FxRate.of(USD, GBP, 1.6d), DATE_2015_06_30);

            assertEquals(test.BaseCurrencyAmount, CurrencyAmount.zero(GBP));
            assertEquals(test.CounterCurrencyAmount.Amount, CurrencyAmount.zero(USD).Amount, 1e-12);
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, CurrencyAmount.of(USD, 0d));
        }
Example #14
0
 //-------------------------------------------------------------------------
 public virtual void test_convertedTo()
 {
     FxForwardSensitivity @base = FxForwardSensitivity.of(CURRENCY_PAIR, GBP, REFERENCE_DATE, SENSITIVITY);
     double rate = 1.4d;
     FxMatrix matrix = FxMatrix.of(CurrencyPair.of(EUR, USD), rate);
     FxForwardSensitivity test1 = (FxForwardSensitivity) @base.convertedTo(USD, matrix);
     FxForwardSensitivity expected = FxForwardSensitivity.of(CURRENCY_PAIR, GBP, REFERENCE_DATE, USD, SENSITIVITY * rate);
     assertEquals(test1, expected);
     FxForwardSensitivity test2 = (FxForwardSensitivity) @base.convertedTo(EUR, matrix);
     assertEquals(test2, @base);
 }
        //-------------------------------------------------------------------------
        public virtual void test_fxForwardRates()
        {
            ImmutableRatesProvider test = ImmutableRatesProvider.builder(VAL_DATE).fxRateProvider(FX_MATRIX).discountCurve(GBP, DISCOUNT_CURVE_GBP).discountCurve(USD, DISCOUNT_CURVE_USD).build();
            DiscountFxForwardRates res  = (DiscountFxForwardRates)test.fxForwardRates(CurrencyPair.of(GBP, USD));

            assertEquals(res.BaseCurrencyDiscountFactors, ZeroRateDiscountFactors.of(GBP, VAL_DATE, DISCOUNT_CURVE_GBP));
            assertEquals(res.CounterCurrencyDiscountFactors, ZeroRateDiscountFactors.of(USD, VAL_DATE, DISCOUNT_CURVE_USD));
            assertEquals(res.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(res.FxRateProvider, FX_MATRIX);
            assertEquals(res.ValuationDate, VAL_DATE);
        }
Example #16
0
        public virtual void getValues()
        {
            FxRateScenarioArray rates = FxRateScenarioArray.of(Currency.EUR, Currency.USD, DoubleArray.of(1.07, 1.08, 1.09));

            assertThat(rates.Pair).isEqualTo(CurrencyPair.of(Currency.EUR, Currency.USD));
            assertThat(rates.ScenarioCount).isEqualTo(3);
            assertThat(rates.get(0)).isEqualTo(FxRate.of(Currency.EUR, Currency.USD, 1.07));
            assertThat(rates.get(1)).isEqualTo(FxRate.of(Currency.EUR, Currency.USD, 1.08));
            assertThat(rates.get(2)).isEqualTo(FxRate.of(Currency.EUR, Currency.USD, 1.09));
            assertThrows(typeof(System.IndexOutOfRangeException), () => rates.get(3));
        }
        public virtual void test_of_rate_withAdjustment()
        {
            FxSingle test = FxSingle.of(GBP_P1000, FxRate.of(GBP, USD, 1.6d), DATE_2015_06_30, BDA);

            assertEquals(test.BaseCurrencyAmount, GBP_P1000);
            assertEquals(test.CounterCurrencyAmount, USD_M1600);
            assertEquals(test.PaymentDate, DATE_2015_06_30);
            assertEquals(test.PaymentDateAdjustment, BDA);
            assertEquals(test.CurrencyPair, CurrencyPair.of(GBP, USD));
            assertEquals(test.ReceiveCurrencyAmount, GBP_P1000);
        }
        public virtual void test_singleDiscountCurveParameterSensitivity()
        {
            ZeroRateSensitivity            zeroPt   = ZeroRateSensitivity.of(USD, 10d, 5d);
            CreditCurveZeroRateSensitivity creditPt = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY_ABC, JPY, 2d, 3d);
            FxForwardSensitivity           fxPt     = FxForwardSensitivity.of(CurrencyPair.of(JPY, USD), USD, LocalDate.of(2017, 2, 14), 15d);
            CreditRatesProvider            test     = ImmutableCreditRatesProvider.builder().creditCurves(ImmutableMap.of(Pair.of(LEGAL_ENTITY_ABC, USD), LegalEntitySurvivalProbabilities.of(LEGAL_ENTITY_ABC, CRD_ABC_USD), Pair.of(LEGAL_ENTITY_ABC, JPY), LegalEntitySurvivalProbabilities.of(LEGAL_ENTITY_ABC, CRD_ABC_JPY), Pair.of(LEGAL_ENTITY_DEF, JPY), LegalEntitySurvivalProbabilities.of(LEGAL_ENTITY_DEF, CRD_DEF))).discountCurves(ImmutableMap.of(USD, DSC_USD, JPY, DSC_JPY)).recoveryRateCurves(ImmutableMap.of(LEGAL_ENTITY_ABC, RR_ABC, LEGAL_ENTITY_DEF, RR_DEF)).valuationDate(VALUATION).build();
            CurrencyParameterSensitivities computed = CurrencyParameterSensitivities.of(test.singleDiscountCurveParameterSensitivity(zeroPt.combinedWith(creditPt).combinedWith(fxPt).build(), USD));
            CurrencyParameterSensitivities expected = DSC_USD.parameterSensitivity(zeroPt);

            assertTrue(computed.equalWithTolerance(expected, 1.0e-14));
        }
Example #19
0
        public virtual void fxRate()
        {
            FxRateScenarioArray rates = FxRateScenarioArray.of(CurrencyPair.of(Currency.EUR, Currency.USD), DoubleArray.of(1.07, 1.08, 1.09));

            assertThat(rates.fxRate(Currency.EUR, Currency.USD, 0)).isEqualTo(1.07);
            assertThat(rates.fxRate(Currency.EUR, Currency.USD, 1)).isEqualTo(1.08);
            assertThat(rates.fxRate(Currency.EUR, Currency.USD, 2)).isEqualTo(1.09);

            assertThat(rates.fxRate(Currency.USD, Currency.EUR, 0)).isEqualTo(1 / 1.07);
            assertThat(rates.fxRate(Currency.USD, Currency.EUR, 1)).isEqualTo(1 / 1.08);
            assertThat(rates.fxRate(Currency.USD, Currency.EUR, 2)).isEqualTo(1 / 1.09);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            DiscountFxForwardRates test1 = DiscountFxForwardRates.of(CURRENCY_PAIR, FX_RATE, DFCURVE_GBP, DFCURVE_USD);

            coverImmutableBean(test1);
            DiscountFxForwardRates test2 = DiscountFxForwardRates.of(CURRENCY_PAIR, FX_RATE.inverse(), DFCURVE_GBP2, DFCURVE_USD2);

            coverBeanEquals(test1, test2);
            DiscountFxForwardRates test3 = DiscountFxForwardRates.of(CurrencyPair.of(USD, EUR), FxRate.of(EUR, USD, 1.2d), DFCURVE_USD, ZeroRateDiscountFactors.of(EUR, DATE_VAL, CURVE2));

            coverBeanEquals(test1, test3);
        }
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            BondFutureOptionSensitivity @base = BondFutureOptionSensitivity.of(NAME, OPTION_EXPIRY, FUTURE_EXPIRY, STRIKE_PRICE, FUTURE_PRICE, GBP, SENSITIVITY);
            double   rate   = 1.5d;
            FxMatrix matrix = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            BondFutureOptionSensitivity test1    = (BondFutureOptionSensitivity)@base.convertedTo(USD, matrix);
            BondFutureOptionSensitivity expected = BondFutureOptionSensitivity.of(NAME, OPTION_EXPIRY, FUTURE_EXPIRY, STRIKE_PRICE, FUTURE_PRICE, USD, SENSITIVITY * rate);

            assertEquals(test1, expected);
            BondFutureOptionSensitivity test2 = (BondFutureOptionSensitivity)@base.convertedTo(GBP, matrix);

            assertEquals(test2, @base);
        }
Example #22
0
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            FxIndexSensitivity @base    = FxIndexSensitivity.of(GBP_USD_WM_OBS, GBP, SENSITIVITY_VALUE);
            double             rate     = 1.35d;
            FxMatrix           matrix   = FxMatrix.of(CurrencyPair.of(EUR, USD), rate);
            FxIndexSensitivity test1    = (FxIndexSensitivity)@base.convertedTo(EUR, matrix);
            FxIndexSensitivity expected = FxIndexSensitivity.of(GBP_USD_WM_OBS, GBP, EUR, SENSITIVITY_VALUE / rate);

            assertEquals(test1, expected);
            FxIndexSensitivity test2 = (FxIndexSensitivity)@base.convertedTo(USD, matrix);

            assertEquals(test2, @base);
        }
        public virtual void test_convertedTo()
        {
            IssuerCurveZeroRateSensitivity @base = IssuerCurveZeroRateSensitivity.of(CURRENCY, YEARFRAC, GROUP, VALUE);
            double   rate   = 1.5d;
            FxMatrix matrix = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            IssuerCurveZeroRateSensitivity test1 = @base.convertedTo(USD, matrix);

            assertEquals(test1, @base);
            IssuerCurveZeroRateSensitivity test2    = @base.convertedTo(GBP, matrix);
            IssuerCurveZeroRateSensitivity expected = IssuerCurveZeroRateSensitivity.of(CURRENCY, YEARFRAC, GBP, GROUP, VALUE / rate);

            assertEquals(test2, expected);
        }
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            IborCapletFloorletSensitivity @base = IborCapletFloorletSensitivity.of(NAME, EXPIRY, STRIKE, FORWARD, GBP, SENSITIVITY);
            double   rate   = 1.5d;
            FxMatrix matrix = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            IborCapletFloorletSensitivity test1    = @base.convertedTo(USD, matrix);
            IborCapletFloorletSensitivity expected = IborCapletFloorletSensitivity.of(NAME, EXPIRY, STRIKE, FORWARD, USD, SENSITIVITY * rate);

            assertEquals(test1, expected);
            IborCapletFloorletSensitivity test2 = @base.convertedTo(GBP, matrix);

            assertEquals(test2, @base);
        }
Example #25
0
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            double sensi = 32d;
            InflationRateSensitivity @base = InflationRateSensitivity.of(GB_HICP_OBS, sensi);
            double   rate   = 1.5d;
            FxMatrix matrix = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            InflationRateSensitivity test1    = (InflationRateSensitivity)@base.convertedTo(USD, matrix);
            InflationRateSensitivity expected = InflationRateSensitivity.of(GB_HICP_OBS, USD, sensi * rate);

            assertEquals(test1, expected);
            InflationRateSensitivity test2 = (InflationRateSensitivity)@base.convertedTo(GBP, matrix);

            assertEquals(test2, @base);
        }
Example #26
0
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            double sensi = 32d;
            CreditCurveZeroRateSensitivity @base = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, sensi);
            double   rate   = 1.5d;
            FxMatrix matrix = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            CreditCurveZeroRateSensitivity test1    = @base.convertedTo(USD, matrix);
            CreditCurveZeroRateSensitivity expected = CreditCurveZeroRateSensitivity.of(LEGAL_ENTITY, GBP, YEAR_FRACTION, USD, rate * sensi);

            assertEquals(test1, expected);
            CreditCurveZeroRateSensitivity test2 = @base.convertedTo(GBP, matrix);

            assertEquals(test2, @base);
        }
Example #27
0
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            double sensi = 32d;
            ZeroRateSensitivity @base    = ZeroRateSensitivity.of(GBP, YEARFRAC, sensi);
            double              rate     = 1.5d;
            FxMatrix            matrix   = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            ZeroRateSensitivity test1    = (ZeroRateSensitivity)@base.convertedTo(USD, matrix);
            ZeroRateSensitivity expected = ZeroRateSensitivity.of(GBP, YEARFRAC, USD, rate * sensi);

            assertEquals(test1, expected);
            ZeroRateSensitivity test2 = (ZeroRateSensitivity)@base.convertedTo(GBP, matrix);

            assertEquals(test2, @base);
        }
Example #28
0
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo()
        {
            double sensi = 32d;
            IborRateSensitivity @base    = IborRateSensitivity.of(GBP_LIBOR_3M_OBSERVATION, sensi);
            double              rate     = 1.5d;
            FxMatrix            matrix   = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            IborRateSensitivity test1    = (IborRateSensitivity)@base.convertedTo(USD, matrix);
            IborRateSensitivity expected = IborRateSensitivity.of(GBP_LIBOR_3M_OBSERVATION, USD, sensi * rate);

            assertEquals(test1, expected);
            IborRateSensitivity test2 = (IborRateSensitivity)@base.convertedTo(GBP, matrix);

            assertEquals(test2, @base);
        }
Example #29
0
        public virtual void test_dates()
        {
            FxIndex test = ImmutableFxIndex.builder().name("Test").currencyPair(CurrencyPair.of(EUR, GBP)).fixingCalendar(NO_HOLIDAYS).maturityDateOffset(DaysAdjustment.ofCalendarDays(2)).build();

            assertEquals(test.calculateMaturityFromFixing(date(2014, 10, 13), REF_DATA), date(2014, 10, 15));
            assertEquals(test.calculateFixingFromMaturity(date(2014, 10, 15), REF_DATA), date(2014, 10, 13));
            // weekend
            assertEquals(test.calculateMaturityFromFixing(date(2014, 10, 16), REF_DATA), date(2014, 10, 18));
            assertEquals(test.calculateFixingFromMaturity(date(2014, 10, 18), REF_DATA), date(2014, 10, 16));
            assertEquals(test.calculateMaturityFromFixing(date(2014, 10, 17), REF_DATA), date(2014, 10, 19));
            assertEquals(test.calculateFixingFromMaturity(date(2014, 10, 19), REF_DATA), date(2014, 10, 17));
            // input date is Sunday
            assertEquals(test.calculateMaturityFromFixing(date(2014, 10, 19), REF_DATA), date(2014, 10, 21));
            assertEquals(test.calculateFixingFromMaturity(date(2014, 10, 19), REF_DATA), date(2014, 10, 17));
        }
Example #30
0
        //-------------------------------------------------------------------------
        public virtual void test_convertedTo_singleCurrency()
        {
            double             rate     = 1.5d;
            FxMatrix           matrix   = FxMatrix.of(CurrencyPair.of(GBP, USD), rate);
            PointSensitivities @base    = PointSensitivities.of(Lists.newArrayList(CS3, CS2, CS1));
            PointSensitivities test1    = @base.convertedTo(USD, matrix);
            PointSensitivity   c1Conv   = CS1.convertedTo(USD, matrix);
            PointSensitivity   c2Conv   = CS2.convertedTo(USD, matrix);
            PointSensitivity   c3Conv   = CS3.convertedTo(USD, matrix);
            PointSensitivities expected = PointSensitivities.of(Lists.newArrayList(c3Conv, c2Conv, c1Conv));

            assertEquals(test1.normalized(), expected.normalized());
            PointSensitivities test2 = @base.convertedTo(GBP, matrix);

            assertEquals(test2.normalized(), @base.normalized());
        }