identifiers.add(ExternalSchemes.bloombergBuidSecurityId(bbgUniqueID));
if (BloombergDataUtils.isValidField(secDes)) {
identifiers.add(ExternalSchemes.bloombergTickerSecurityId(secDes));
}
final FxFutureOptionSecurity security = new FxFutureOptionSecurity(
exchangeCode,
exchangeCode,
expiry,
getExerciseType(optionExerciseType),
buildUnderlyingTicker(underlingTicker),
pointValue,
ogCurrency,
optionStrikePrice / 100, // Strike in percent //TODO: use normalization (like in BloombergRateClassifier)?
optionType);
security.setExternalIdBundle(ExternalIdBundle.of(identifiers));
security.setUniqueId(BloombergSecurityProvider.createUniqueId(bbgUniqueID));
//build option display name
StringBuilder buf = new StringBuilder(rootTicker);
buf.append(" ");
buf.append(expiryDate);
if (optionType == OptionType.CALL) {
buf.append(" C ");
} else {
buf.append(" P ");
}
buf.append(optionStrikePrice);
security.setName(buf.toString());
return security;
}