Examples of CouponIborAverage


Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborAverage

    final double fixingTime = TimeCalculator.getTimeBetween(dateTime, getFixingDate());
    final double fixingPeriodStartTime1 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodStartDate1());
    final double fixingPeriodEndTime1 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodEndDate1());
    final double fixingPeriodStartTime2 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodStartDate2());
    final double fixingPeriodEndTime2 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodEndDate2());
    return new CouponIborAverage(getCurrency(), paymentTime, getPaymentYearFraction(), getNotional(), fixingTime, getIndex1(), fixingPeriodStartTime1,
        fixingPeriodEndTime1, getFixingPeriodAccrualFactor1(), getIndex2(), fixingPeriodStartTime2, fixingPeriodEndTime2, getFixingPeriodAccrualFactor2(), getWeight1(),
        getWeight2());
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborAverage

    final double fixingTime = TimeCalculator.getTimeBetween(dateTime, getFixingDate());
    final double fixingPeriodStartTime1 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodStartDate1());
    final double fixingPeriodEndTime1 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodEndDate1());
    final double fixingPeriodStartTime2 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodStartDate2());
    final double fixingPeriodEndTime2 = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodEndDate2());
    return new CouponIborAverage(getCurrency(), paymentTime, getPaymentYearFraction(), getNotional(), fixingTime, getIndex1(), fixingPeriodStartTime1,
        fixingPeriodEndTime1, getFixingPeriodAccrualFactor1(), getIndex2(), fixingPeriodStartTime2, fixingPeriodEndTime2, getFixingPeriodAccrualFactor2(), getWeight1(),
        getWeight2());
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborAverage

    final double fixingTime = actAct.getDayCountFraction(REFERENCE_DATE, FIXING_DATE);
    final double fixingPeriodStartTime1 = actAct.getDayCountFraction(REFERENCE_DATE, IBOR_AVERAGE_COUPON_DEFINITION_1.getFixingPeriodStartDate1());
    final double fixingPeriodEndTime1 = actAct.getDayCountFraction(REFERENCE_DATE, IBOR_AVERAGE_COUPON_DEFINITION_1.getFixingPeriodEndDate1());
    final double fixingPeriodStartTime2 = actAct.getDayCountFraction(REFERENCE_DATE, IBOR_AVERAGE_COUPON_DEFINITION_1.getFixingPeriodStartDate2());
    final double fixingPeriodEndTime2 = actAct.getDayCountFraction(REFERENCE_DATE, IBOR_AVERAGE_COUPON_DEFINITION_1.getFixingPeriodEndDate2());
    final CouponIborAverage couponIborAverage = new CouponIborAverage(CUR, paymentTime, ACCRUAL_FACTOR, NOTIONAL, fixingTime, INDEX_1, fixingPeriodStartTime1, fixingPeriodEndTime1,
        ACCRUAL_FACTOR_FIXING_1,
        INDEX_2, fixingPeriodStartTime2, fixingPeriodEndTime2, ACCRUAL_FACTOR_FIXING_2, WEIGHT_1, WEIGHT_2);
    CouponIborAverage convertedDefinition = (CouponIborAverage) IBOR_AVERAGE_COUPON_DEFINITION_1.toDerivative(REFERENCE_DATE);
    assertEquals(couponIborAverage, convertedDefinition);
    convertedDefinition = (CouponIborAverage) IBOR_AVERAGE_COUPON_DEFINITION_1.toDerivative(REFERENCE_DATE, FIXING_TS);
    assertEquals(couponIborAverage, convertedDefinition);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborAverage

    final Payment couponConverted = IBOR_AVERAGE_COUPON_DEFINITION_1.toDerivative(referenceDate, FIXING_TS);
    assertEquals(coupon, couponConverted);
    // The fixing is not known
    final DoubleTimeSeries<ZonedDateTime> fixingTS2 = ImmutableZonedDateTimeDoubleTimeSeries.ofUTC(new ZonedDateTime[] {ScheduleCalculator.getAdjustedDate(FIXING_DATE, -1, CALENDAR) },
        new double[] {FIXING_RATE });
    final CouponIborAverage coupon2 = new CouponIborAverage(CUR, paymentTime, ACCRUAL_FACTOR, NOTIONAL, fixingTime, INDEX_1, fixingPeriodStartTime1, fixingPeriodEndTime1,
        IBOR_AVERAGE_COUPON_DEFINITION_1.getFixingPeriodAccrualFactor1(), INDEX_2, fixingPeriodStartTime2, fixingPeriodEndTime2,
        IBOR_AVERAGE_COUPON_DEFINITION_1.getFixingPeriodAccrualFactor2(), WEIGHT_1, WEIGHT_2);
    final Payment couponConverted2 = IBOR_AVERAGE_COUPON_DEFINITION_1.toDerivative(referenceDate, fixingTS2);
    assertEquals("CouponIborAverageDefinition: toDerivative", coupon2, couponConverted2);
    final Payment couponConverted3 = IBOR_AVERAGE_COUPON_DEFINITION_1.toDerivative(referenceDate);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.