示例#1
0
        static DiscountingTermDepositProductPricerTest()
        {
            CurveInterpolator      interp   = CurveInterpolators.DOUBLE_QUADRATIC;
            DoubleArray            time_eur = DoubleArray.of(0.0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0);
            DoubleArray            rate_eur = DoubleArray.of(0.0160, 0.0135, 0.0160, 0.0185, 0.0185, 0.0195, 0.0200, 0.0210);
            InterpolatedNodalCurve dscCurve = InterpolatedNodalCurve.of(Curves.zeroRates("EUR-Discount", ACT_360), time_eur, rate_eur, interp);

            IMM_PROV = ImmutableRatesProvider.builder(VAL_DATE).discountCurve(EUR, dscCurve).build();
        }
        static DiscountingIborFixingDepositTradePricerTest()
        {
            CurveInterpolator      interp     = CurveInterpolators.DOUBLE_QUADRATIC;
            DoubleArray            time_eur   = DoubleArray.of(0.0, 0.1, 0.25, 0.5, 0.75, 1.0, 2.0);
            DoubleArray            rate_eur   = DoubleArray.of(0.0160, 0.0165, 0.0155, 0.0155, 0.0155, 0.0150, 0.014);
            InterpolatedNodalCurve dscCurve   = InterpolatedNodalCurve.of(Curves.zeroRates("EUR-Discount", ACT_ACT_ISDA), time_eur, rate_eur, interp);
            DoubleArray            time_index = DoubleArray.of(0.0, 0.25, 0.5, 1.0);
            DoubleArray            rate_index = DoubleArray.of(0.0180, 0.0180, 0.0175, 0.0165);
            InterpolatedNodalCurve indexCurve = InterpolatedNodalCurve.of(Curves.zeroRates("EUR-EURIBOR6M", ACT_ACT_ISDA), time_index, rate_index, interp);

            IMM_PROV = ImmutableRatesProvider.builder(VAL_DATE).discountCurve(EUR, dscCurve).iborIndexCurve(EUR_EURIBOR_6M, indexCurve).build();
        }
示例#3
0
        static ImmutableRatesProviderSimpleData()
        {
            CurveInterpolator      interp     = CurveInterpolators.DOUBLE_QUADRATIC;
            DoubleArray            time_eur   = DoubleArray.of(0.0, 0.1, 0.25, 0.5, 0.75, 1.0, 2.0);
            DoubleArray            rate_eur   = DoubleArray.of(0.0160, 0.0165, 0.0155, 0.0155, 0.0155, 0.0150, 0.0140);
            InterpolatedNodalCurve dscCurve   = InterpolatedNodalCurve.of(Curves.zeroRates("EUR-Discount", ACT_365F), time_eur, rate_eur, interp);
            DoubleArray            time_index = DoubleArray.of(0.0, 0.25, 0.5, 1.0);
            DoubleArray            rate_index = DoubleArray.of(0.0180, 0.0180, 0.0175, 0.0165);
            InterpolatedNodalCurve indexCurve = InterpolatedNodalCurve.of(Curves.zeroRates("EUR-EURIBOR6M", ACT_365F), time_index, rate_index, interp);

            IMM_PROV_EUR_NOFIX = ImmutableRatesProvider.builder(VAL_DATE).discountCurve(EUR, dscCurve).iborIndexCurve(EUR_EURIBOR_6M, indexCurve).build();
            LocalDateDoubleTimeSeries tsE6 = LocalDateDoubleTimeSeries.builder().put(VAL_DATE, 0.012345).build();

            IMM_PROV_EUR_FIX = ImmutableRatesProvider.builder(VAL_DATE).discountCurve(EUR, dscCurve).iborIndexCurve(EUR_EURIBOR_6M, indexCurve, tsE6).build();
        }