static CapitalIndexedBondCurveDataSet()
        {
            DoubleArray   timeIssuer = DoubleArray.of(0.2493150684931507, 0.4986301369863014, 0.9397260273972603, 1.9760386256456322, 4.975342465753425, 9.850355565536344);
            DoubleArray   rateIssuer = DoubleArray.of(6.796425420368682E-5, 3.114315257821455E-4, 7.126179601599612E-4, 0.04946562985220742, 0.01404542200399637, 0.022260846895257275);
            CurveMetadata metaIssuer = Curves.zeroRates(ISSUER_CURVE_NAME, ACT_ACT_ISDA);

            ISSUER_CURVE = InterpolatedNodalCurve.of(metaIssuer, timeIssuer, rateIssuer, INTERPOLATOR);
            DoubleArray   timeRepo = DoubleArray.of(0.0027397260273972603, 0.0136986301369863, 0.1095890410958904, 0.18904109589041096, 0.27123287671232876, 0.5178082191780822, 0.7671232876712328, 1.0191780821917809, 2.025218953514485, 3.0246575342465754, 4.021917808219178, 5.019178082191781, 6.019754472640168, 7.024657534246575, 8.024657534246575, 9.024657534246575, 10.019754472640168);
            DoubleArray   rateRepo = DoubleArray.of(0.0016222186172986138, 0.001622209965572477, 7.547616096755544E-4, 9.003947315389025E-4, 9.833562990057003E-4, 9.300905368344651E-4, 0.0010774349342544426, 0.001209299356175582, 0.003243498783874946, 0.007148138535707508, 0.011417234937364525, 0.015484713638367467, 0.01894872475170524, 0.02177798040124286, 0.024146976832379798, 0.02610320121432829, 0.027814843351943817);
            CurveMetadata metaRepo = Curves.zeroRates(REPO_CURVE_NAME, ACT_ACT_ISDA);

            REPO_CURVE = InterpolatedNodalCurve.of(metaRepo, timeRepo, rateRepo, INTERPOLATOR);
            DoubleArray   timeCpi  = DoubleArray.of(10, 22, 34, 46, 58, 70, 82, 94, 106, 118, 142, 178, 238, 298, 358);
            DoubleArray   valueCpi = DoubleArray.of(242.88404516129032, 248.03712245417105, 252.98128118335094, 258.0416354687366, 263.20242369585515, 268.4653023378886, 273.83617795725064, 279.3124974961296, 284.8987721100803, 290.5954768446179, 302.3336095056465, 320.8351638061777, 354.2203489141063, 391.08797576744865, 431.7913437911175);
            CurveMetadata metaCpi  = Curves.prices("cpiCurve");

            CPI_CURVE = InterpolatedNodalCurve.of(metaCpi, timeCpi, valueCpi, INTERPOLATOR);
            DoubleArray   timeRpi  = DoubleArray.of(10, 22, 34, 46, 58, 70, 82, 94, 106, 118, 142);
            DoubleArray   valueRpi = DoubleArray.of(263.49967737807305, 270.2383424030053, 277.34957060924364, 284.992794643866, 293.2359607153748, 302.0252215004671, 311.3482439082226, 321.10465920118116, 331.44556112285863, 342.4913522908549, 366.076015086898);
            CurveMetadata metaRpi  = Curves.prices("rpiCurve");

            RPI_CURVE = InterpolatedNodalCurve.of(metaRpi, timeRpi, valueRpi, INTERPOLATOR);
            DoubleArray   timeCpij  = DoubleArray.of(10, 22, 34, 46, 58, 70, 82, 94, 106, 118, 142, 178, 238, 298, 358);
            DoubleArray   valueCpij = DoubleArray.of(103.3374833371608, 104.2306743501241, 104.3107880426369, 104.27037709028433, 104.19961127790909, 104.062704760821, 103.89860712110973, 103.73391283682416, 103.78374038315715, 103.83356515845553, 104.18698970060639, 104.72128789312038, 106.46204440686186, 108.231124353441, 110.03241679315009);
            CurveMetadata metaCpij  = Curves.prices("cpijCurve");

            CPIJ_CURVE = InterpolatedNodalCurve.of(metaCpij, timeCpij, valueCpij, INTERPOLATOR);
        }
예제 #2
0
        private ImmutableRatesProvider createProvider(double rateStart, double rateStartInterp, double rateEnd, double rateEndInterp)
        {
            LocalDateDoubleTimeSeries timeSeries = LocalDateDoubleTimeSeries.of(VAL_DATE.with(lastDayOfMonth()), 300);
            InterpolatedNodalCurve    curve      = InterpolatedNodalCurve.of(Curves.prices("GB-RPIX"), DoubleArray.of(4, 5, 16, 17), DoubleArray.of(rateStart, rateStartInterp, rateEnd, rateEndInterp), INTERPOLATOR);

            return(ImmutableRatesProvider.builder(VAL_DATE).priceIndexCurve(GB_RPIX, curve).timeSeries(GB_RPIX, timeSeries).build());
        }