Examples of BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider


Examples of com.opengamma.financial.analytics.volatility.surface.BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider

    final Double useCallAboveValue = message.getDouble(CALL_FIELD_NAME);
    if (message.hasField(EXCHANGE_ID_FIELD_NAME)) {
      final String exchangeId = message.getString(EXCHANGE_ID_FIELD_NAME);
      if (message.hasField(TICKER_SCHEME_NAME)) {
        final String tickerScheme = message.getString(TICKER_SCHEME_NAME);
        return new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(futureOptionPrefix, postfix, dataFieldName, useCallAboveValue, exchangeId, tickerScheme);
      }
      return new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(futureOptionPrefix, postfix, dataFieldName, useCallAboveValue, exchangeId);
    }
    if (message.hasField(TICKER_SCHEME_NAME)) { //this will never be hit, but better to be safe
      final String tickerScheme = message.getString(TICKER_SCHEME_NAME);
      return new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(futureOptionPrefix, postfix, dataFieldName, useCallAboveValue, DEFAULT_EXCHANGE_ID, tickerScheme);
    }
    return new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(futureOptionPrefix, postfix, dataFieldName, useCallAboveValue, DEFAULT_EXCHANGE_ID);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.volatility.surface.BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider

  private static final String EXCHANGE = "OSE";
  private static final String SCHEME = ExternalSchemes.BLOOMBERG_BUID_WEAK.getName();

  @Test
  public void testCycle() {
    BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider provider = new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(FUTURE_OPTION_PREFIX, POSTFIX,
        DATA_FIELD_NAME, CALL_ABOVE_STRIKE, EXCHANGE);
    assertEquals(provider, cycleObject(BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider.class, provider));
    provider = new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(FUTURE_OPTION_PREFIX, POSTFIX,
        DATA_FIELD_NAME, CALL_ABOVE_STRIKE, EXCHANGE, SCHEME);
    assertEquals(provider, cycleObject(BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider.class, provider));
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.volatility.surface.BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider

      final String postfix = BloombergDataUtils.splitTickerAtMarketSector(ticker).getSecond();
      String underlyingTicker = getUnderlyingTicker(ticker, security.getUnderlyingId(), postfix);
      final String name = BBG_SURFACE_PREFIX + underlyingTicker + "_" + InstrumentTypeProperties.EQUITY_OPTION;
      if (!_knownVolSpecNames.contains(name)) {
        s_logger.info("Creating VolatilitySurfaceSpecification \"{}\"", name);
        final BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider surfaceInstrumentProvider =
            new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(tickerParser.getSymbol(), postfix, FIELD_NAME_VOL, getSpot(underlyingTicker), security.getExchange());
        createVolatilitySpecification(UniqueId.of(ExternalSchemes.BLOOMBERG_TICKER_WEAK.getName(), underlyingTicker), name, surfaceInstrumentProvider);
      }
      createvolatilityDefinition(underlyingTicker, name, UniqueId.of(ExternalSchemes.BLOOMBERG_TICKER_WEAK.getName(), underlyingTicker));
      return null;
    }
View Full Code Here

Examples of com.opengamma.financial.analytics.volatility.surface.BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider

      final String prefix = new BloombergTickerParserEQVanillaOption(ticker).getSymbol() + " " + security.getExchange();
      String underlyingTicker = getUnderlyingTicker(ticker, security.getUnderlyingId(), postfix);
      final String name = BBG_SURFACE_PREFIX + prefix + "_" + InstrumentTypeProperties.EQUITY_OPTION;
      if (!_knownVolSpecNames.contains(name)) {
        s_logger.info("Creating VolatilitySurfaceSpecification \"{}\"", name);
        final BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider surfaceInstrumentProvider =
            new BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(prefix, postfix, FIELD_NAME_VOL, getSpot(underlyingTicker), security.getExchange());
        createVolatilitySpecification(UniqueId.of(ExternalSchemes.BLOOMBERG_TICKER_WEAK.getName(), underlyingTicker), name, surfaceInstrumentProvider);
      }
      createvolatilityDefinition(underlyingTicker, name, UniqueId.of(ExternalSchemes.BLOOMBERG_TICKER_WEAK.getName(), underlyingTicker));
      return null;
    }
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.