if (rate == null) {
return null;
}
final double callAmount = rate * NOTIONAL;
final ZonedDateTime settlementDate = nextWorkingDay(expiry.plusDays(2), putCurrency, callCurrency);
final FXDigitalOptionSecurity security = new FXDigitalOptionSecurity(putCurrency, callCurrency, putAmount, callAmount, paymentCurrency, new Expiry(expiry), settlementDate, bundle._long);
final StringBuilder sb = new StringBuilder("Digital ");
sb.append(bundle._long ? "Long" : "Short");
sb.append(" put ").append(putCurrency).append(' ').append(NOTIONAL_FORMATTER.format(putAmount));
sb.append(", call ").append(callCurrency).append(' ').append(NOTIONAL_FORMATTER.format(callAmount));
sb.append(" on ").append(expiry.toString(DATE_FORMATTER));
security.setName(sb.toString());
return security;
}