ArgumentChecker.notNull(strike, "strike");
ArgumentChecker.notNull(surfaceDate, "surface date");
final String prefix = getFutureOptionPrefix();
final StringBuffer ticker = new StringBuffer();
ticker.append(prefix);
FutureOptionExpiries expiryRule = EXPIRY_RULES.get(prefix); // TODO: Review whether we can hoist from loop in RawVolatilitySurfaceDataFunction.buildDataRequirements
if (expiryRule == null) {
s_logger.info("No expiry rule has been setup for " + prefix + ". Using Default of 3rd Friday.");
expiryRule = EXPIRY_RULES.get("DEFAULT");
}
final int nthExpiry = nthOfPeriod.getFirst();
final Tenor period = nthOfPeriod.getSecond();
final LocalDate expiry = expiryRule.getExpiry(nthExpiry, surfaceDate, period);
final String expiryCode = BloombergFutureUtils.getShortExpiryCode(expiry);
ticker.append(expiryCode);
ticker.append(strike > useCallAboveStrike() ? "C" : "P");
ticker.append(" ");
ticker.append(FORMATTER.format(strike));