Package com.opengamma.analytics.financial.greeks

Examples of com.opengamma.analytics.financial.greeks.GreekResultCollection.keySet()


  @Test
  public void testPriceOnly() {
    final GreekResultCollection result = MODEL.getGreeks(new EuropeanVanillaOptionDefinition(100, new Expiry(DateUtils.getUTCDate(2010, 1, 1)), true), new StandardOptionDataBundle(null, 0, null, 100,
        DateUtils.getUTCDate(2010, 1, 1)), Sets.newHashSet(Greek.FAIR_PRICE, Greek.DELTA, Greek.GAMMA));
    assertEquals(result.size(), 1);
    assertEquals(result.keySet().iterator().next(), Greek.FAIR_PRICE);
    assertEquals(result.values().iterator().next(), 2., 0);
  }

  private static class DummyModel extends MonteCarloOptionModel<OptionDefinition, StandardOptionDataBundle> {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.