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

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


  @Override
  public EquityIndexDividendFuture toDerivative(final ZonedDateTime date, final String... yieldCurveNames) {
    final double timeToFixing = TimeCalculator.getTimeBetween(date, getExpiryDate());
    final double timeToDelivery = TimeCalculator.getTimeBetween(date, getSettlementDate());

    final EquityIndexDividendFuture newDeriv = new EquityIndexDividendFuture(timeToFixing, timeToDelivery, getStrikePrice(), getCurrency(), getUnitAmount());
    return newDeriv;
  }
View Full Code Here


  @Test
  public void testEquityIndexDividendFuture() {
    final double settlement = 1.45;
    final double fixing = 1.44;
    final EquityIndexDividendFuture eidf = new EquityIndexDividendFuture(fixing, settlement, 95., Currency.JPY, 10);

    final double currentPrice = 100.0;
    final SimpleFutureDataBundle dataBundle = new SimpleFutureDataBundle(null, currentPrice, null, null, null);
    // FIXME Case - presentValue needs discounting..
    final double pv = eidf.accept(PVC, dataBundle);
    assertEquals(50.0, pv, 1e-12);

  }
View Full Code Here

  private static final DoubleTimeSeries<ZonedDateTime> FIXING_TS = ImmutableZonedDateTimeDoubleTimeSeries.of(FIXING_DATES, FIXINGS, ZoneOffset.UTC);

  @Test
  public void test() {

    final EquityIndexDividendFuture theFuture = new EquityIndexDividendFuture(timeToFixing, timeToSettlement, PRICE, Currency.CAD, 10.);

    assertEquals(theFuture.getTimeToSettlement(), timeToSettlement, 0);
    assertFalse(Double.compare(theFuture.getTimeToExpiry(), timeToSettlement) == 0);
  }
View Full Code Here

TOP

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

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.