public Object visitCommodityFutureOptionSecurity(final CommodityFutureOptionSecurity security) {
if (TimeCalculator.getTimeBetween(ZonedDateTime.now(OpenGammaClock.getInstance()), security.getExpiry().getExpiry()) < 0) {
return null;
}
final String ticker = security.getExternalIdBundle().getValue(ExternalSchemes.BLOOMBERG_TICKER);
final BloombergTickerParserFutureOption tickerParser = new BloombergTickerParserCommodityFutureOption(ticker);
// final String postfix = BloombergDataUtils.splitTickerAtMarketSector(ticker).getSecond();
String underlyingOptChainTicker = getUnderlyingTicker(ticker, security.getUnderlyingId(), tickerParser.getTypeName());
final String name = BBG_SURFACE_PREFIX + tickerParser.getSymbol() + "_" + security.getCurrency().getCode() + "_" + InstrumentTypeProperties.COMMODITY_FUTURE_OPTION;
if (!_knownVolSpecNames.contains(name)) {
s_logger.info("Creating VolatilitySurfaceSpecification \"{}\"", name);
final BloombergCommodityFutureOptionVolatilitySurfaceInstrumentProvider surfaceInstrumentProvider =
new BloombergCommodityFutureOptionVolatilitySurfaceInstrumentProvider(tickerParser.getSymbol(), tickerParser.getTypeName(), FIELD_NAME_VOL, getSpot(underlyingOptChainTicker),
security.getTradingExchange());
createVolatilitySpecification(security.getCurrency().getUniqueId(), name, surfaceInstrumentProvider);
}
createvolatilityDefinition(underlyingOptChainTicker, name, security.getCurrency().getUniqueId());
return null;