Examples of FixedPaymentMatrix


Examples of com.opengamma.financial.analytics.cashflow.FixedPaymentMatrix

      final LocalDate date = deserializer.fieldValueToObject(LocalDate.class, dateFields.get(i));
      final MultipleCurrencyAmount mca = deserializer.fieldValueToObject(MultipleCurrencyAmount.class, mcaFields.get(i));
      values.put(date, mca);
    }
    final int maxAmounts = message.getInt(MAX_AMOUNTS_FIELD);
    return new FixedPaymentMatrix(values, maxAmounts);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.cashflow.FixedPaymentMatrix

  public void cycleObject() {
    final TreeMap<LocalDate, MultipleCurrencyAmount> map = new TreeMap<LocalDate, MultipleCurrencyAmount>();
    map.put(LocalDate.of(2000, 1, 1), MultipleCurrencyAmount.of(CurrencyAmount.of(Currency.USD, 1000)));
    map.put(LocalDate.of(2000, 2, 5), MultipleCurrencyAmount.of(CurrencyAmount.of(Currency.USD, 2000), CurrencyAmount.of(Currency.EUR, 4000)));
    map.put(LocalDate.of(2010, 1, 1), MultipleCurrencyAmount.of(CurrencyAmount.of(Currency.USD, -3000), CurrencyAmount.of(Currency.GBP, 700)));
    final FixedPaymentMatrix matrix = new FixedPaymentMatrix(map);
    assertEquals(matrix, cycleObject(FixedPaymentMatrix.class, matrix));
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.cashflow.FixedPaymentMatrix

    } else if (value instanceof DoubleLabelledMatrix3D) {
      final DoubleLabelledMatrix3D previousMatrix = (DoubleLabelledMatrix3D) currentTotal;
      final DoubleLabelledMatrix3D currentMatrix = (DoubleLabelledMatrix3D) value;
      return previousMatrix.add(currentMatrix, 0.005, 0.005, 0.005);
    } else if (value instanceof FixedPaymentMatrix) {
      final FixedPaymentMatrix previousMatrix = (FixedPaymentMatrix) currentTotal;
      final FixedPaymentMatrix currentMatrix = (FixedPaymentMatrix) value;
      return previousMatrix.add(currentMatrix);
    } else if (value instanceof FloatingPaymentMatrix) {
      final FloatingPaymentMatrix previousMatrix = (FloatingPaymentMatrix) currentTotal;
      final FloatingPaymentMatrix currentMatrix = (FloatingPaymentMatrix) value;
      return previousMatrix.add(currentMatrix);
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.