final double callAmount = NOTIONAL * fxRate;
final String dateString = settlementDate.toString(DATE_FORMATTER);
final BarrierType barrierType = bundle._up ? BarrierType.UP : BarrierType.DOWN;
final BarrierDirection barrierDirection = BarrierDirection.KNOCK_IN;
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);