Examples of FxForwardTrade


Examples of com.opengamma.integration.tool.portfolio.xml.v1_0.jaxb.FxForwardTrade

  }

  //-------------------------------------------------------------------------
  @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));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.