Examples of CouponDefinition


Examples of com.opengamma.analytics.financial.instrument.payment.CouponDefinition

        final double cpnActual = Math.min(Math.max(cpnFloor, cpnMain), cpnCap);
        fixedCpn.add(cpnActual);
      }
    }
    // Derivatives
    final CouponDefinition cpn0 = getNthPayment(0);
    if (!date.isAfter(cpn0.getPaymentDate())) {
      if (isFixed[0]) {
        cpnList.add(new CouponFixed(getCurrency(), TimeCalculator.getTimeBetween(date, cpn0.getPaymentDate()), yieldCurveNames[0], cpn0.getPaymentYearFraction(), cpn0.getNotional(), fixedCpn.get(0),
            cpn0.getAccrualStartDate(), cpn0.getAccrualEndDate()));
      } else { // CouponIborGearingDefinition
        cpnList.add(((CouponIborGearingDefinition) cpn0).toDerivative(date, yieldCurveNames));
      }
    }
    for (int loopcpn = 1; loopcpn < getNumberOfPayments(); loopcpn++) {
      final CouponDefinition cpn = getNthPayment(loopcpn);
      if (!date.isAfter(getNthPayment(loopcpn).getPaymentDate())) {
        if (isFixed[loopcpn]) {
          cpnList.add(new CouponFixed(getCurrency(), TimeCalculator.getTimeBetween(date, cpn.getPaymentDate()), yieldCurveNames[0], cpn.getPaymentYearFraction(), cpn.getNotional(), fixedCpn
              .get(loopcpn), cpn.getAccrualStartDate(), cpn.getAccrualEndDate()));
        } else {
          cpnList.add(((CouponIborRatchetDefinition) cpn).toDerivative(date, yieldCurveNames));
        }
      }
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.instrument.payment.CouponDefinition

        final double cpnActual = Math.min(Math.max(cpnFloor, cpnMain), cpnCap);
        fixedCpn.add(cpnActual);
      }
    }
    // Derivatives
    final CouponDefinition cpn0 = getNthPayment(0);
    if (!date.isAfter(cpn0.getPaymentDate())) {
      if (isFixed[0]) {
        cpnList.add(new CouponFixed(getCurrency(), TimeCalculator.getTimeBetween(date, cpn0.getPaymentDate()), cpn0.getPaymentYearFraction(), cpn0.getNotional(), fixedCpn.get(0),
            cpn0.getAccrualStartDate(), cpn0.getAccrualEndDate()));
      } else { // CouponIborGearingDefinition
        cpnList.add(((CouponIborGearingDefinition) cpn0).toDerivative(date));
      }
    }
    for (int loopcpn = 1; loopcpn < getNumberOfPayments(); loopcpn++) {
      final CouponDefinition cpn = getNthPayment(loopcpn);
      if (!date.isAfter(getNthPayment(loopcpn).getPaymentDate())) {
        if (isFixed[loopcpn]) {
          cpnList.add(new CouponFixed(getCurrency(), TimeCalculator.getTimeBetween(date, cpn.getPaymentDate()), cpn.getPaymentYearFraction(), cpn.getNotional(), fixedCpn
              .get(loopcpn), cpn.getAccrualStartDate(), cpn.getAccrualEndDate()));
        } else {
          cpnList.add(((CouponIborRatchetDefinition) cpn).toDerivative(date));
        }
      }
    }
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.