Examples of SwapTrade


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

  }

  //-------------------------------------------------------------------------
  @Override
  public ManageableSecurity[] extractSecurities() {
    SwapTrade trade = getTrade();

    List<SwapLeg> payLegs = Lists.newArrayList(trade.getPayLegs());
    List<SwapLeg> recLegs = Lists.newArrayList(trade.getReceiveLegs());

    Preconditions.checkState(payLegs.size() == 1, format("Swaps must have one (and only one) pay leg. Found %d", payLegs.size()));
    Preconditions.checkState(recLegs.size() == 1, format("Swaps must have one (and only one) receive leg. Found %d", recLegs.size()));

    ManageableSecurity security = new SwapSecurity(
        convertLocalDate(trade.getTradeDate()),
        convertLocalDate(trade.getEffectiveDate()),
        convertLocalDate(trade.getMaturityDate()),
        trade.getCounterparty().getExternalId().getId(),
        convertLeg(payLegs.get(0)),
        convertLeg(recLegs.get(0)));

    return securityArray(addIdentifier(security));
  }
View Full Code Here

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

  //-------------------------------------------------------------------------
  @Override
  public ManageableSecurity[] extractSecurities() {
    SwaptionTrade trade = getTrade();
    SwapTrade swapTrade = trade.getUnderlyingSwapTrade();
    ManageableSecurity underlying = swapTrade.getSecurityExtractor().extractSecurities()[0];

    ExternalId underlyingId = underlying.getExternalIdBundle().getExternalId(ExternalScheme.of("XML_LOADER"));

    List<FixedLeg> fixedLegs = Lists.newArrayList(swapTrade.getFixedLegs());

    //note - these fields are resolved on a best effort basis
    //since they aren't actually used by the analytics.
    //see PLAT-1924
    Currency currency = null;
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.