Package com.opengamma.financial.security.option

Examples of com.opengamma.financial.security.option.EquityOptionSecurity.addExternalId()


    final ExerciseType exerciseType = exerciseType();
    final Expiry expiry = expiry();
    final double pointValue = 0;
    final String exchange = exchange();
    final EquityOptionSecurity security = new EquityOptionSecurity(optionType, strike, currency, underlyingIdentifier, exerciseType, expiry, pointValue, exchange);
    security.addExternalId(ExternalId.of(ExternalSchemes.BLOOMBERG_TICKER, "AAPL US 10/22/11 C365 Equity"));
    store(security);
    return security;
  }

  public ManageablePortfolioNode createEquityOptionNode() {
View Full Code Here


  public void testUnderlyingExpression () {
    final InMemorySecuritySource securities = new InMemorySecuritySource();
    securities.addSecurity(_fooEquity);
    final EquityOptionSecurity fooOption = new EquityOptionSecurity (OptionType.PUT, 10d, Currency.USD, ExternalId.of("Test", "FooEquity"),
        new AmericanExerciseType(), new Expiry(zdt(2020, 11, 25, 12, 0, 0, 0, ZoneOffset.UTC)), 42d, "EXCH");
    fooOption.addExternalId(ExternalId.of("Test", "FooOption"));
    securities.addSecurity(fooOption);
    final MarketDataELCompiler compiler = new MarketDataELCompiler();
    Object result = compiler.compile("security.underlyingId", new DefaultComputationTargetResolver(securities).atVersionCorrection(VersionCorrection.LATEST)).apply(
        new ValueRequirement("Foo", ComputationTargetSpecification.of(fooOption)), null);
    assertEquals(result, ExternalId.of("Test", "FooEquity"));
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.