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

Examples of com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureTransaction


    final double fixingPeriodEndTime = 1.75;
    final double fixingPeriodAccrualFactor = 0.267;
    final double paymentAccrualFactor = 0.25;
    final int quantity = 123;
    //    final double referencePrice = 0.0; // TODO CASE - Future refactor - referencePrice = 0.0
    final InterestRateFutureTransaction ir1 = new InterestRateFutureTransaction(lastTradingTime, iborIndex, fixingPeriodStartTime, fixingPeriodEndTime, fixingPeriodAccrualFactor, 1 - R1, 1, paymentAccrualFactor, quantity,
        "K", N1, N2);
    final InterestRateFutureTransaction ir2 = new InterestRateFutureTransaction(lastTradingTime, iborIndex, fixingPeriodStartTime, fixingPeriodEndTime, fixingPeriodAccrualFactor, 1 - R2, 1, paymentAccrualFactor, quantity,
        "K", N1, N2);
    assertEquals(ir1.accept(VISITOR, R2), ir2);
  }
View Full Code Here


  /**
   * Test the par spread for market quote.
   */
  public void parSpreadMarketQuote() {
    final double parSpread = ERU2_TRA.accept(PSMQC, CURVES);
    final InterestRateFutureTransaction futures0 = new InterestRateFutureTransaction(LAST_TRADING_TIME, EURIBOR3M, FIXING_START_TIME, FIXING_END_TIME, FIXING_ACCRUAL,
        REFERENCE_PRICE + parSpread, NOTIONAL, FUTURE_FACTOR, QUANTITY, NAME, DISCOUNTING_CURVE_NAME, FORWARD_CURVE_NAME);
    final CurrencyAmount pv0 = METHOD_FUT_TRA.presentValue(futures0, CURVES);
    assertEquals("Future par spread market quote", pv0.getAmount(), 0, TOLERANCE_PV);
  }
View Full Code Here

  /**
   * Test the par spread for rate.
   */
  public void parSpreadRate() {
    final double parSpread = ERU2_TRA.accept(PSRC, CURVES);
    final InterestRateFutureTransaction futures0 = new InterestRateFutureTransaction(LAST_TRADING_TIME, EURIBOR3M, FIXING_START_TIME, FIXING_END_TIME, FIXING_ACCRUAL,
        REFERENCE_PRICE - parSpread, NOTIONAL, FUTURE_FACTOR, QUANTITY, NAME, DISCOUNTING_CURVE_NAME, FORWARD_CURVE_NAME);
    final CurrencyAmount pv0 = METHOD_FUT_TRA.presentValue(futures0, CURVES);
    assertEquals("Future par spread rate", pv0.getAmount(), 0, TOLERANCE_PV);
    final double parSpreadMQ = ERU2_TRA.accept(PSMQC, CURVES);
    assertEquals("InterestRateFutureXXXDiscountingMethod: par spread", parSpread, -parSpreadMQ, TOLERANCE_PRICE);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureTransaction

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.