Package com.opengamma.analytics.financial.interestrate.bond.definition

Examples of com.opengamma.analytics.financial.interestrate.bond.definition.BillSecurity


   * Tests the toDerivative methods.
   */
  public void toDerivativeBetweenSettleAndMaturityDeprecated() {
    final ZonedDateTime referenceDate = ScheduleCalculator.getAdjustedDate(SETTLE_DATE, SETTLEMENT_DAYS, CALENDAR);
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate, DSC_NAME, CREDIT_NAME);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE, DSC_NAME, CREDIT_NAME);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate, DSC_NAME, CREDIT_NAME);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, 0.0, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here


   * Tests the toDerivative methods.
   */
  public void toDerivativeBetweenJustBeforeMaturityDeprecated() {
    final ZonedDateTime referenceDate = ScheduleCalculator.getAdjustedDate(END_DATE, -1, CALENDAR);
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate, DSC_NAME, CREDIT_NAME);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE, DSC_NAME, CREDIT_NAME);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate, DSC_NAME, CREDIT_NAME);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, 0.0, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeBetweenAtMaturityDeprecated() {
    final ZonedDateTime referenceDate = END_DATE;
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate, DSC_NAME, CREDIT_NAME);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE, DSC_NAME, CREDIT_NAME);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate, DSC_NAME, CREDIT_NAME);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, 0.0, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeStandard() {
    final ZonedDateTime referenceDateStandard = ScheduleCalculator.getAdjustedDate(SETTLE_DATE, -SETTLEMENT_DAYS, CALENDAR);
    final BillTransaction transactionConverted1 = BILL_TRA_DEFINITION.toDerivative(referenceDateStandard);
    final BillSecurity purchased1 = BILL_SEC_DEFINITION.toDerivative(referenceDateStandard, SETTLE_DATE);
    final BillSecurity standard1 = BILL_SEC_DEFINITION.toDerivative(referenceDateStandard);
    final BillTransaction transactionExpected1 = new BillTransaction(purchased1, QUANTITY, SETTLE_AMOUT, standard1);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected1, transactionConverted1);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeEarly() {
    final ZonedDateTime referenceDateEarly = ScheduleCalculator.getAdjustedDate(SETTLE_DATE, -(SETTLEMENT_DAYS + 1), CALENDAR);
    final BillTransaction transactionConverted2 = BILL_TRA_DEFINITION.toDerivative(referenceDateEarly);
    final BillSecurity purchased2 = BILL_SEC_DEFINITION.toDerivative(referenceDateEarly, SETTLE_DATE);
    final BillSecurity standard2 = BILL_SEC_DEFINITION.toDerivative(referenceDateEarly);
    final BillTransaction transactionExpected2 = new BillTransaction(purchased2, QUANTITY, SETTLE_AMOUT, standard2);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected2, transactionConverted2);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeAtSettle() {
    final ZonedDateTime referenceDate = SETTLE_DATE;
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, SETTLE_AMOUT, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeBetweenSettleAndMaturity() {
    final ZonedDateTime referenceDate = ScheduleCalculator.getAdjustedDate(SETTLE_DATE, SETTLEMENT_DAYS, CALENDAR);
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, 0.0, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeBetweenJustBeforeMaturity() {
    final ZonedDateTime referenceDate = ScheduleCalculator.getAdjustedDate(END_DATE, -1, CALENDAR);
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, 0.0, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here

   * Tests the toDerivative methods.
   */
  public void toDerivativeBetweenAtMaturity() {
    final ZonedDateTime referenceDate = END_DATE;
    final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate);
    final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE);
    final BillSecurity standard = BILL_SEC_DEFINITION.toDerivative(referenceDate);
    final BillTransaction transactionExpected = new BillTransaction(purchased, QUANTITY, 0.0, standard);
    assertEquals("Bill Transaction: toDerivatives", transactionExpected, transactionConverted);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.interestrate.bond.definition.BillSecurity

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.