Package com.opengamma.analytics.financial.interestrate.cash.derivative

Examples of com.opengamma.analytics.financial.interestrate.cash.derivative.DepositCounterpart


  /**
   * Tests toDerivative.
   */
  public void toDerivativeMaturity() {
    final ZonedDateTime referenceDate = END_DATE;
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate);
    final double startTime = 0;
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, 0, RATE, DEPOSIT_AF, COUNTERPART);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here


  /**
   * Tests toDerivative.
   */
  public void toDerivativeTradeDeprecated() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 12);
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate, CURVE_NAME);
    final double startTime = TimeCalculator.getTimeBetween(referenceDate, SPOT_DATE);
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, NOTIONAL, RATE, DEPOSIT_AF, COUNTERPART, CURVE_NAME);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeBetweenTradeAndSettleDeprecated() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 13);
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate, CURVE_NAME);
    final double startTime = TimeCalculator.getTimeBetween(referenceDate, SPOT_DATE);
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, NOTIONAL, RATE, DEPOSIT_AF, COUNTERPART, CURVE_NAME);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeSettleDeprecated() {
    final ZonedDateTime referenceDate = SPOT_DATE;
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate, CURVE_NAME);
    final double startTime = TimeCalculator.getTimeBetween(referenceDate, SPOT_DATE);
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, NOTIONAL, RATE, DEPOSIT_AF, COUNTERPART, CURVE_NAME);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeBetweenSettleMaturityDeprecated() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 20);
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate, CURVE_NAME);
    final double startTime = 0;
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, 0, RATE, DEPOSIT_AF, COUNTERPART, CURVE_NAME);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeMaturityDeprecated() {
    final ZonedDateTime referenceDate = END_DATE;
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate, CURVE_NAME);
    final double startTime = 0;
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, 0, RATE, DEPOSIT_AF, COUNTERPART, CURVE_NAME);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeTrade() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 12);
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate);
    final double startTime = TimeCalculator.getTimeBetween(referenceDate, SPOT_DATE);
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, NOTIONAL, RATE, DEPOSIT_AF, COUNTERPART);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeBetweenTradeAndSettle() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 13);
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate);
    final double startTime = TimeCalculator.getTimeBetween(referenceDate, SPOT_DATE);
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, NOTIONAL, RATE, DEPOSIT_AF, COUNTERPART);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeSettle() {
    final ZonedDateTime referenceDate = SPOT_DATE;
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate);
    final double startTime = TimeCalculator.getTimeBetween(referenceDate, SPOT_DATE);
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, NOTIONAL, RATE, DEPOSIT_AF, COUNTERPART);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

  /**
   * Tests toDerivative.
   */
  public void toDerivativeBetweenSettleMaturity() {
    final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 20);
    final DepositCounterpart converted = DEPOSIT_CTP_DEFINITION.toDerivative(referenceDate);
    final double startTime = 0;
    final double endTime = TimeCalculator.getTimeBetween(referenceDate, END_DATE);
    final DepositCounterpart expected = new DepositCounterpart(EUR, startTime, endTime, NOTIONAL, 0, RATE, DEPOSIT_AF, COUNTERPART);
    assertEquals("DepositDefinition: toDerivative", expected, converted);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.interestrate.cash.derivative.DepositCounterpart

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.