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

Examples of com.opengamma.analytics.financial.equity.future.derivative.EquityIndexFuture


      timeToFutureDelivery = 0.0015;
    }
    final double futureStrike = _underlying.getStrikePrice();
    final Currency currency = _underlying.getCurrency();
    final double unitValue = _underlying.getUnitAmount();
    final EquityIndexFuture underlying = new EquityIndexFuture(timeToFutureFixing, timeToFutureDelivery, futureStrike, currency, unitValue);
    return new EquityIndexFutureOption(timeToExpiry, underlying, _strike, _exerciseType, _isCall, _pointValue, _referencePrice);
  }
View Full Code Here


  @Override
  public EquityIndexFuture toDerivative(final ZonedDateTime date) {
    ArgumentChecker.notNull(date, "date");
    final double timeToFixing = TimeCalculator.getTimeBetween(date, getExpiryDate());
    final double timeToDelivery = TimeCalculator.getTimeBetween(date, getSettlementDate());
    final EquityIndexFuture newDeriv = new EquityIndexFuture(timeToFixing, timeToDelivery, getReferencePrice(), getCurrency(), getUnitAmount());
    return newDeriv;
  }
View Full Code Here

    if (referencePrice == null) {
      return toDerivative(date, referencePrice);
    }
    final double timeToFixing = TimeCalculator.getTimeBetween(date, getExpiryDate());
    final double timeToDelivery = TimeCalculator.getTimeBetween(date, getSettlementDate());
    final EquityIndexFuture newDeriv = new EquityIndexFuture(timeToFixing, timeToDelivery, referencePrice, getCurrency(), getUnitAmount());
    return newDeriv;
  }
View Full Code Here

    EquityIndexFutureOption other = new EquityIndexFutureOption(EXPIRY, UNDERLYING, STRIKE, EXERCISE, IS_CALL, POINT_VALUE, REFERENCE_PRICE);
    assertEquals(AMERICAN_PUT, other);
    assertEquals(AMERICAN_PUT.hashCode(), other.hashCode());
    other = new EquityIndexFutureOption(EXPIRY + 0.0001, UNDERLYING, STRIKE, EXERCISE, IS_CALL, POINT_VALUE, REFERENCE_PRICE);
    assertFalse(AMERICAN_PUT.equals(other));
    other = new EquityIndexFutureOption(EXPIRY, new EquityIndexFuture(EXPIRY, SETTLEMENT, STRIKE, CCY, POINT_VALUE + 1), STRIKE, EXERCISE, IS_CALL, POINT_VALUE, REFERENCE_PRICE);
    assertFalse(AMERICAN_PUT.equals(other));
    other = new EquityIndexFutureOption(EXPIRY, UNDERLYING, STRIKE + 1, EXERCISE, IS_CALL, POINT_VALUE, REFERENCE_PRICE);
    assertFalse(AMERICAN_PUT.equals(other));
    other = new EquityIndexFutureOption(EXPIRY, UNDERLYING, STRIKE, ExerciseDecisionType.EUROPEAN, !IS_CALL, POINT_VALUE, REFERENCE_PRICE);
    assertFalse(AMERICAN_PUT.equals(other));
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.equity.future.derivative.EquityIndexFuture

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.