Examples of FixedStrikeLookbackOptionDefinition


Examples of com.opengamma.analytics.financial.model.option.definition.FixedStrikeLookbackOptionDefinition

    MODEL.getPricingFunction(null);
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullData() {
    MODEL.getPricingFunction(new FixedStrikeLookbackOptionDefinition(100, EXPIRY, true)).evaluate((StandardOptionWithSpotTimeSeriesDataBundle) null);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.FixedStrikeLookbackOptionDefinition

    MODEL.getPricingFunction(new FixedStrikeLookbackOptionDefinition(100, EXPIRY, true)).evaluate((StandardOptionWithSpotTimeSeriesDataBundle) null);
  }

  @Test
  public void test() {
    FixedStrikeLookbackOptionDefinition option = new FixedStrikeLookbackOptionDefinition(95, EXPIRY, false);
    assertEquals(MODEL.getPricingFunction(option).evaluate(DATA), 4.4448, EPS);
    option = new FixedStrikeLookbackOptionDefinition(100, EXPIRY, false);
    assertEquals(MODEL.getPricingFunction(option).evaluate(DATA), 8.3177, EPS);
    option = new FixedStrikeLookbackOptionDefinition(105, EXPIRY, false);
    assertEquals(MODEL.getPricingFunction(option).evaluate(DATA), 13.0739, EPS);
    option = new FixedStrikeLookbackOptionDefinition(95, EXPIRY, true);
    assertEquals(MODEL.getPricingFunction(option).evaluate(DATA), 18.9263, EPS);
    option = new FixedStrikeLookbackOptionDefinition(100, EXPIRY, true);
    assertEquals(MODEL.getPricingFunction(option).evaluate(DATA), 14.1702, EPS);
    option = new FixedStrikeLookbackOptionDefinition(105, EXPIRY, true);
    assertEquals(MODEL.getPricingFunction(option).evaluate(DATA), 9.8905, EPS);
  }
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.