Package com.opengamma.financial.security.option

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


    if (message.hasField("quote") && message.getString("quote") != null) {
      quoteType = message.getString("quote");
    } else {
      quoteType = SurfaceAndCubeQuoteType.CALL_STRIKE;
    }
    final ExerciseType exerciseType;
    final ExerciseType american = new AmericanExerciseType();
    final ExerciseType european = new EuropeanExerciseType();
    if (message.hasField("exerciseType") && message.getString("exerciseType") != null) {
      final String exerciseTypeName = message.getString("exerciseType");
      exerciseType = exerciseTypeName.equalsIgnoreCase(american.getName()) ? american : european;
    } else {
      exerciseType = european;
View Full Code Here


    ZonedDateTime utcDate = DateUtils.getUTCDate(expiryInLocalDate.getYear(), expiryInLocalDate.getMonthValue(), expiryInLocalDate.getDayOfMonth(), closeHr, closeMins);
    return new Expiry(utcDate, ExpiryAccuracy.MIN_HOUR_DAY_MONTH_YEAR);
  }
 
  protected ExerciseType getExerciseType(String bbgExerciseType) {
    final ExerciseType result;
    if (bbgExerciseType.equalsIgnoreCase("American")) {
      result = new AmericanExerciseType();
    } else if (bbgExerciseType.equalsIgnoreCase("European")) {
      result = new EuropeanExerciseType();
    } else {
View Full Code Here

    identifiers.add(ExternalSchemes.bloombergBuidSecurityId(bbgUniqueID));
    if (BloombergDataUtils.isValidField(secDes)) {
      identifiers.add(ExternalSchemes.bloombergTickerSecurityId(secDes));
    }
   
    final ExerciseType exerciseType = getExerciseType(optionExerciseType);

    // currently we will pick up the unified bbg exchange code - we try to map to MIC via the description
    if (exchangeDescription != null) {
      final String exchangeMIC = exchangeData.getExchangeFromDescription(exchangeDescription).getMic();
      if (exchangeMIC != null) {
View Full Code Here

    identifiers.add(ExternalSchemes.bloombergBuidSecurityId(bbgUniqueID));
    if (BloombergDataUtils.isValidField(secDes)) {
      identifiers.add(ExternalSchemes.bloombergTickerSecurityId(secDes));
    }
   
    final ExerciseType exerciseType = getExerciseType(optionExerciseType);

    final EquityIndexDividendFutureOptionSecurity security = new EquityIndexDividendFutureOptionSecurity(
        exchange,
        expiry,
        exerciseType,
View Full Code Here

    return bean;
  }

  @Override
  public EquityBarrierOptionSecurity createSecurity(OperationContext context, EquityBarrierOptionSecurityBean bean) {
    final ExerciseType exerciseType = bean.getOptionExerciseType().accept(new ExerciseTypeVisitorImpl());

    EquityBarrierOptionSecurity sec = new EquityBarrierOptionSecurity(bean.getOptionType(),
        bean.getStrike(),
        currencyBeanToCurrency(bean.getCurrency()),
        externalIdBeanToExternalId(bean.getUnderlying()),
View Full Code Here

    return bean;
  }

  @Override
  public EquityOptionSecurity createSecurity(OperationContext context, EquityOptionSecurityBean bean) {
    final ExerciseType exerciseType = bean.getOptionExerciseType().accept(new ExerciseTypeVisitorImpl());

    EquityOptionSecurity sec = new EquityOptionSecurity(bean.getOptionType(),
        bean.getStrike(),
        currencyBeanToCurrency(bean.getCurrency()),
        externalIdBeanToExternalId(bean.getUnderlying()),
View Full Code Here

        bean.getLongShort(),
        expiryBeanToExpiry(bean.getExpiry()),
        bean.getCashSettled(),
        currencyBeanToCurrency(bean.getCurrency()));
    if (bean.getOptionExerciseType() != null) {
      final ExerciseType exerciseType = bean.getOptionExerciseType().accept(new ExerciseTypeVisitorImpl());
      swaptionSecurity.setExerciseType(exerciseType);
    }
    final ZonedDateTime settlementDate = Converters.zonedDateTimeBeanToDateTimeWithZone(bean.getSettlementDate());
    swaptionSecurity.setSettlementDate(settlementDate);
    swaptionSecurity.setNotional(bean.getNotional());
View Full Code Here

    identifiers.add(ExternalSchemes.bloombergBuidSecurityId(bbgUniqueID));
    if (BloombergDataUtils.isValidField(secDes) && BloombergDataUtils.isValidField(marketSector)) {
      identifiers.add(ExternalSchemes.bloombergTickerSecurityId(secDes + " " + marketSector));
    }
   
    final ExerciseType exerciseType = getExerciseType(optionExerciseType);

    final EquityIndexOptionSecurity security = new EquityIndexOptionSecurity(
        optionType,
        optionStrikePrice,
        ogCurrency,
View Full Code Here

    switch (defn.getListedOptionType()) {
      case EQUITY_DIVIDEND_OPTION:
        throw new PortfolioParsingException("EquityIndexDividendOption is not yet supported");
      case EQUITY_INDEX_OPTION:
        ExternalId underlyingId = defn.getUnderlyingId().toExternalId();
        ExerciseType exerciseType = defn.getExerciseType().convert();

        // We are only give month/year (e.g. MAR13) so arbitrarily use the first day of
        // the month but set the accuracy to reflect that
        Expiry expiry = new Expiry(defn.getOptionExpiry().atDay(1).atStartOfDay(ZoneOffset.UTC),
                                   ExpiryAccuracy.MONTH_YEAR);
View Full Code Here

    Currency currency = defn.getCurrency();
    int pointValue = defn.getPointValue();
    boolean isMargined = defn.isIsMargined();
    double strike = defn.getStrike().doubleValue();
    OptionType optionType = defn.getOptionType();
    ExerciseType exerciseType = defn.getExerciseType().convert();

    switch (defn.getListedFutureOptionType()) {
      case EQUITY_INDEX_FUTURE_OPTION:
        return new EquityIndexFutureOptionSecurity(exchange, expiry, exerciseType, underlyingId, pointValue,
                                                   isMargined, currency, strike, optionType);
View Full Code Here

TOP

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

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.