Package com.opengamma.analytics.financial.instrument.annuity

Examples of com.opengamma.analytics.financial.instrument.annuity.AnnuityCapFloorCMSDefinition


    final ZonedDateTime START_DATE = ScheduleCalculator.getAdjustedDate(SPOT_DATE, START_CMSCAP, EUR1YEURIBOR6M.getIborIndex().getBusinessDayConvention(), CALENDAR, EUR1YEURIBOR6M.getIborIndex()
        .isEndOfMonth());
    final ZonedDateTime END_DATE = START_DATE.plus(LENGTH_CMSCAP);
    final Period capPeriod = Period.ofMonths(6);
    final DayCount capDayCount = DayCountFactory.INSTANCE.getDayCount("ACT/360");
    final AnnuityCapFloorCMSDefinition capDefinition = AnnuityCapFloorCMSDefinition.from(START_DATE, END_DATE, NOTIONAL, INDEX_SWAP_5Y, capPeriod, capDayCount, false, STRIKE, IS_CAP, CALENDAR);
    final Annuity<? extends Payment> cap = capDefinition.toDerivative(REFERENCE_DATE);
    final double pvCalculator = PVSSC.visit(cap, SABR_MULTICURVES).getAmount(EUR);
    double pvExpected = 0.0;
    for (int loopcpn = 0; loopcpn < cap.getNumberOfPayments(); loopcpn++) {
      pvExpected += PVSSC.visit(cap.getNthPayment(loopcpn), SABR_MULTICURVES).getAmount(EUR);
    }
View Full Code Here


    final ZonedDateTime START_DATE = ScheduleCalculator.getAdjustedDate(SPOT_DATE, START_CMSCAP, EUR1YEURIBOR6M.getIborIndex().getBusinessDayConvention(), CALENDAR, EUR1YEURIBOR6M.getIborIndex()
        .isEndOfMonth());
    final ZonedDateTime END_DATE = START_DATE.plus(LENGTH_CMSCAP);
    final Period capPeriod = Period.ofMonths(6);
    final DayCount capDayCount = DayCountFactory.INSTANCE.getDayCount("ACT/360");
    final AnnuityCapFloorCMSDefinition capDefinition = AnnuityCapFloorCMSDefinition.from(START_DATE, END_DATE, NOTIONAL, INDEX_SWAP_5Y, capPeriod, capDayCount, false, STRIKE, IS_CAP, CALENDAR);
    final Annuity<? extends Payment> cap = capDefinition.toDerivative(REFERENCE_DATE);
    MultipleCurrencyMulticurveSensitivity pvcsCalculator = PVCSSSC.visit(cap, SABR_MULTICURVES);
    pvcsCalculator = pvcsCalculator.cleaned();
    MultipleCurrencyMulticurveSensitivity pvcsExpected = new MultipleCurrencyMulticurveSensitivity();
    for (int loopcpn = 0; loopcpn < cap.getNumberOfPayments(); loopcpn++) {
      pvcsExpected = pvcsExpected.plus(PVCSSSC.visit(cap.getNthPayment(loopcpn), SABR_MULTICURVES));
View Full Code Here

    final ZonedDateTime START_DATE = ScheduleCalculator.getAdjustedDate(SPOT_DATE, START_CMSCAP, USD_GENERATOR.getIborIndex().getBusinessDayConvention(), CALENDAR, USD_GENERATOR.getIborIndex()
        .isEndOfMonth());
    final ZonedDateTime END_DATE = START_DATE.plus(LENGTH_CMSCAP);
    final Period capPeriod = Period.ofMonths(6);
    final DayCount capDayCount = DayCountFactory.INSTANCE.getDayCount("ACT/360");
    final AnnuityCapFloorCMSDefinition capDefinition = AnnuityCapFloorCMSDefinition.from(START_DATE, END_DATE, NOTIONAL, USD_SWAP_10Y, capPeriod, capDayCount, false, STRIKE, IS_CAP, CALENDAR);
    final Annuity<? extends Payment> cap = capDefinition.toDerivative(REFERENCE_DATE, CURVES_NAME);
    final double pvCalculator = cap.accept(PVC_SABR, SABR_BUNDLE);
    double pvExpected = 0.0;
    for (int loopcpn = 0; loopcpn < cap.getNumberOfPayments(); loopcpn++) {
      pvExpected += cap.getNthPayment(loopcpn).accept(PVC_SABR, SABR_BUNDLE);
    }
View Full Code Here

    final ZonedDateTime START_DATE = ScheduleCalculator.getAdjustedDate(SPOT_DATE, START_CMSCAP, USD_GENERATOR.getIborIndex().getBusinessDayConvention(), CALENDAR, USD_GENERATOR.getIborIndex()
        .isEndOfMonth());
    final ZonedDateTime END_DATE = START_DATE.plus(LENGTH_CMSCAP);
    final Period capPeriod = Period.ofMonths(6);
    final DayCount capDayCount = DayCountFactory.INSTANCE.getDayCount("ACT/360");
    final AnnuityCapFloorCMSDefinition capDefinition = AnnuityCapFloorCMSDefinition.from(START_DATE, END_DATE, NOTIONAL, USD_SWAP_10Y, capPeriod, capDayCount, false, STRIKE, IS_CAP, CALENDAR);
    final Annuity<? extends Payment> cap = capDefinition.toDerivative(REFERENCE_DATE, CURVES_NAME);
    InterestRateCurveSensitivity pvcsCalculator = new InterestRateCurveSensitivity(cap.accept(PVCSC_SABR, SABR_BUNDLE));
    pvcsCalculator = pvcsCalculator.cleaned();
    InterestRateCurveSensitivity pvcsExpected = new InterestRateCurveSensitivity();
    for (int loopcpn = 0; loopcpn < cap.getNumberOfPayments(); loopcpn++) {
      pvcsExpected = pvcsExpected.plus(new InterestRateCurveSensitivity(cap.getNthPayment(loopcpn).accept(PVCSC_SABR, SABR_BUNDLE)));
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.instrument.annuity.AnnuityCapFloorCMSDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.