final Barrier barrier = new Barrier(getKnockType(barrierOptionSecurity.getBarrierDirection()), getBarrierType(barrierOptionSecurity.getBarrierType()),
getObservationType(barrierOptionSecurity.getMonitoringType()), level);
final ZonedDateTime settlementDate = barrierOptionSecurity.getSettlementDate();
final ForexDefinition underlying = new ForexDefinition(putCurrency, callCurrency, settlementDate, putAmount, fxRate); //TODO this needs its own converter
final boolean isLong = barrierOptionSecurity.isLong();
return new ForexOptionSingleBarrierDefinition(new ForexOptionVanillaDefinition(underlying, expiry, true, isLong), barrier);
}