Examples of PaymentFixed


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

      addcf(flow, p.getPaymentTime(), p.getAmount());
    }
    final PaymentFixed[] agregatedCfe = new PaymentFixed[flow.size()];
    int loopcf = 0;
    for (final double time : flow.keySet()) {
      agregatedCfe[loopcf++] = new PaymentFixed(ccy, time, flow.get(time));
    }
    return new AnnuityPaymentFixed(agregatedCfe);
  }
View Full Code Here

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

      addcf(flow, p.getPaymentTime(), p.getAmount());
    }
    final PaymentFixed[] agregatedCfe = new PaymentFixed[flow.size()];
    int loopcf = 0;
    for (final double time : flow.keySet()) {
      agregatedCfe[loopcf++] = new PaymentFixed(ccy, time, flow.get(time));
    }
    return new AnnuityPaymentFixed(agregatedCfe);

  }
View Full Code Here

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

  //REVIEW: the method that this is testing (one that took an array of InstrumentDerivative has gone - leaving this test in for now
  public void presentValueWithPremium() {
    final double expectedPriceLongPayer = 2419978.690;
    final double premiumAmount = expectedPriceLongPayer / MULTICURVES.getDiscountFactor(EUR, SWAPTION_LONG_PAYER.getSettlementTime());
    final PaymentFixedDefinition premiumDefinition = new PaymentFixedDefinition(EUR, SETTLEMENT_DATE, -premiumAmount);
    final PaymentFixed premium = premiumDefinition.toDerivative(REFERENCE_DATE);
    final MultipleCurrencyAmount pvPremium = premium.accept(PVDC, MULTICURVES);
    final MultipleCurrencyAmount swaptionPV = SWAPTION_LONG_PAYER.accept(PVSSC, SABR_MULTICURVES);
    assertEquals("swaption present value with premium", -expectedPriceLongPayer, pvPremium.getAmount(EUR), TOLERANCE_PV);
    assertEquals("swaption present value with premium", expectedPriceLongPayer, swaptionPV.getAmount(EUR), TOLERANCE_PV);
  }
View Full Code Here

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

  @Deprecated
  @Override
  public Forex toDerivative(final ZonedDateTime date, final String... yieldCurveNames) {
    ArgumentChecker.notNull(date, "date");
    ArgumentChecker.notNull(yieldCurveNames, "Curves");
    final PaymentFixed payment1 = _paymentCurrency1.toDerivative(date, yieldCurveNames[0]);
    final PaymentFixed payment2 = _paymentCurrency2.toDerivative(date, yieldCurveNames[1]);
    return new Forex(payment1, payment2);
  }
View Full Code Here

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

  }

  @Override
  public Forex toDerivative(final ZonedDateTime date) {
    ArgumentChecker.notNull(date, "date");
    final PaymentFixed payment1 = _paymentCurrency1.toDerivative(date);
    final PaymentFixed payment2 = _paymentCurrency2.toDerivative(date);
    return new Forex(payment1, payment2);
  }
View Full Code Here

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

  @SuppressWarnings("deprecation")
  @Test
  public void toDerivativeBeforeSettleDeprecated() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 6, 16);
    final BondFutureOptionPremiumTransaction transactionConverted = FVU1_C120_TR_DEFINITION.toDerivative(referenceDate, CURVE_NAMES);
    final PaymentFixed premium = FVU1_C120_TR_DEFINITION.getPremium().toDerivative(referenceDate, CURVE_NAMES[1]);
    final BondFutureOptionPremiumTransaction transactionExpected = new BondFutureOptionPremiumTransaction(FVU1_C120_SEC_DEFINITION.toDerivative(referenceDate,
        CURVE_NAMES), QUANTITY, premium);
    assertEquals("Bond future option premium security definition: toDerivative", transactionExpected, transactionConverted);
  }
View Full Code Here

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

  @SuppressWarnings("deprecation")
  @Test
  public void toDerivativeOnSettleDeprecated() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 6, 17);
    final BondFutureOptionPremiumTransaction transactionConverted = FVU1_C120_TR_DEFINITION.toDerivative(referenceDate, CURVE_NAMES);
    final PaymentFixed premium = FVU1_C120_TR_DEFINITION.getPremium().toDerivative(referenceDate, CURVE_NAMES[1]);
    final BondFutureOptionPremiumTransaction transactionExpected = new BondFutureOptionPremiumTransaction(FVU1_C120_SEC_DEFINITION.toDerivative(referenceDate,
        CURVE_NAMES), QUANTITY, premium);
    assertEquals("Bond future option premium security definition: toDerivative", transactionExpected, transactionConverted);
  }
View Full Code Here

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

  @SuppressWarnings("deprecation")
  @Test
  public void toDerivativeAfterSettleDeprecated() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 6, 20);
    final BondFutureOptionPremiumTransaction transactionConverted = FVU1_C120_TR_DEFINITION.toDerivative(referenceDate, CURVE_NAMES);
    final PaymentFixed premium = new PaymentFixed(FVU1_C120_TR_DEFINITION.getCurrency(), 0.0, 0.0, CURVE_NAMES[1]);
    final BondFutureOptionPremiumTransaction transactionExpected = new BondFutureOptionPremiumTransaction(FVU1_C120_SEC_DEFINITION.toDerivative(referenceDate,
        CURVE_NAMES), QUANTITY, premium);
    assertEquals("Bond future option premium security definition: toDerivative", transactionExpected, transactionConverted);
  }
View Full Code Here

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

   */
  @Test
  public void toDerivativeBeforeSettle() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 6, 16);
    final BondFutureOptionPremiumTransaction transactionConverted = FVU1_C120_TR_DEFINITION.toDerivative(referenceDate);
    final PaymentFixed premium = FVU1_C120_TR_DEFINITION.getPremium().toDerivative(referenceDate);
    final BondFutureOptionPremiumTransaction transactionExpected = new BondFutureOptionPremiumTransaction(FVU1_C120_SEC_DEFINITION.toDerivative(referenceDate), QUANTITY, premium);
    assertEquals("Bond future option premium security definition: toDerivative", transactionExpected, transactionConverted);
  }
View Full Code Here

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

   */
  @Test
  public void toDerivativeOnSettle() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 6, 17);
    final BondFutureOptionPremiumTransaction transactionConverted = FVU1_C120_TR_DEFINITION.toDerivative(referenceDate);
    final PaymentFixed premium = FVU1_C120_TR_DEFINITION.getPremium().toDerivative(referenceDate);
    final BondFutureOptionPremiumTransaction transactionExpected = new BondFutureOptionPremiumTransaction(FVU1_C120_SEC_DEFINITION.toDerivative(referenceDate), QUANTITY, premium);
    assertEquals("Bond future option premium security definition: toDerivative", transactionExpected, transactionConverted);
  }
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.