Package com.opengamma.financial.security.option

Examples of com.opengamma.financial.security.option.AmericanExerciseType


    double pointValue = 1250;
    Expiry expiry = new Expiry(DateUtils.getUTCDate(2013, 3, 8));
    ExternalId underlyingID = ExternalSchemes.bloombergTickerSecurityId("JYH3 Curncy");
    final String exchange = "CME";
    final FxFutureOptionSecurity security = new FxFutureOptionSecurity(
        exchange, exchange, expiry, new AmericanExerciseType(), underlyingID, pointValue, USD, strike, optionType);

    Set<ExternalId> identifiers = ImmutableSet.of(
        ExternalSchemes.bloombergBuidSecurityId("IX14844402-0-0D20"),
        ExternalSchemes.bloombergTickerSecurityId("JYH3P 105.0 Curncy"));
    security.setExternalIdBundle(ExternalIdBundle.of(identifiers));
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);
View Full Code Here

    EquitySecurity equity = new EquitySecurity("exch", "excd", "ACME", Currency.USD);
    ExternalId region = ExternalId.of("regionScheme", "regionValue");
    ZonedDateTime now = ZonedDateTime.now();
    FXForwardSecurity fxForward = new FXForwardSecurity(Currency.AUD, 123, Currency.CAD, 321, now, region);
    FXOptionSecurity fxOption = new FXOptionSecurity(Currency.AUD, Currency.CAD, 123, 321, new Expiry(now),
                                                     now, true, new AmericanExerciseType());
    SelectorResolver resolver = mock(SelectorResolver.class);
    when(resolver.resolveSecurity(equityId)).thenReturn(equity);
    when(resolver.resolveSecurity(forwardId)).thenReturn(fxForward);
    when(resolver.resolveSecurity(optionId)).thenReturn(fxOption);
View Full Code Here

TOP

Related Classes of com.opengamma.financial.security.option.AmericanExerciseType

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.