}
//-------------------------------------------------------------------------
@Override
public ManageableSecurity[] extractSecurities() {
FxForwardTrade trade = getTrade();
ExternalId region = extractRegion(trade.getPaymentCalendars());
boolean nonDeliverable = checkNonDeliverable(trade);
Currency payCurrency = trade.getPayCurrency();
double payAmount = trade.getPayAmount().doubleValue();
Currency receiveCurrency = trade.getReceiveCurrency();
double receiveAmount = trade.getReceiveAmount().doubleValue();
ZonedDateTime forwardDate = convertLocalDate(trade.getMaturityDate());
ManageableSecurity security = nonDeliverable ?
// todo - expiry should be used in construction of NonDeliverableFXForwardSecurity
new NonDeliverableFXForwardSecurity(payCurrency, payAmount, receiveCurrency, receiveAmount, forwardDate,
region, trade.getSettlementCurrency().equals(trade.getReceiveCurrency())) :
new FXForwardSecurity(payCurrency, payAmount, receiveCurrency, receiveAmount, forwardDate, region);
return securityArray(addIdentifier(security));
}