Package com.opengamma.bbg.util

Examples of com.opengamma.bbg.util.BloombergTickerParserEQIndexOption


    public Object visitEquityIndexOptionSecurity(final EquityIndexOptionSecurity security) {
      if (TimeCalculator.getTimeBetween(ZonedDateTime.now(OpenGammaClock.getInstance()), security.getExpiry().getExpiry()) < 0) {
        return null;
      }
      final String ticker = security.getExternalIdBundle().getValue(ExternalSchemes.BLOOMBERG_TICKER);
      final BloombergTickerParserEQIndexOption tickerParser = new BloombergTickerParserEQIndexOption(ticker);
      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

TOP

Related Classes of com.opengamma.bbg.util.BloombergTickerParserEQIndexOption

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.