final MonitoringType monitoringType = MonitoringType.CONTINUOUS;
final SamplingFrequency samplingFrequency = SamplingFrequency.DAILY_CLOSE;
final boolean invertBarrierLevel = !CurrencyPair.of(putCurrency, callCurrency).equals(getCurrencyPair(putCurrency, callCurrency));
// so if UP and ccy convention order, multiple, if UP and inverted ccy order, divide, if DOWN and ccy convention order multiply, if DOWN and inverted ccy order, divide.
final double barrierLevel = bundle._up ^ invertBarrierLevel ? fxRate * 1.5 : fxRate / 1.5;
final FXBarrierOptionSecurity fxBarrierOptionSecurity = new FXBarrierOptionSecurity(putCurrency, callCurrency, putAmount, callAmount, expiry, settlementDate, barrierType, barrierDirection,
monitoringType, samplingFrequency, barrierLevel, bundle._long);
final String callAmountString = NOTIONAL_FORMATTER.format(callAmount);
final String putAmountString = NOTIONAL_FORMATTER.format(putAmount);
final String barrierLevelString = RATE_FORMATTER.format(barrierLevel);
final String barrierUnitString = callCurrency + "/" + putCurrency;
fxBarrierOptionSecurity.setName((bundle._long ? "Long " : "Short ") + (bundle._up ? "up" : "down") + " knock-in at " + barrierLevelString + " " + barrierUnitString + ", put " + putCurrency +
" " +
putAmountString + ", call " + callCurrency + " " + callAmountString + " on " + dateString);
return fxBarrierOptionSecurity;
}