Examples of FxOptionTrade


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

  }

  //-------------------------------------------------------------------------
  @Override
  public ManageableSecurity[] extractSecurities() {
    FxOptionTrade trade = getTrade();
    FxOptionCalculator calculator = new FxOptionCalculator(trade, trade.getNotional(), trade.getNotionalCurrency());
    ExerciseType exerciseType = trade.getExerciseType().convert();
    ManageableSecurity security = trade.getSettlementType() == SettlementType.PHYSICAL ?
        new FXOptionSecurity(
            calculator.getPutCurrency(),
            calculator.getCallCurrency(),
            calculator.getPutAmount(),
            calculator.getCallAmount(),
            calculator.getExpiry(),
            calculator.getSettlementDate(),
            calculator.isLong(),
            exerciseType) :
        new NonDeliverableFXOptionSecurity(
            calculator.getPutCurrency(),
            calculator.getCallCurrency(),
            calculator.getPutAmount(),
            calculator.getCallAmount(),
            calculator.getExpiry(),
            calculator.getSettlementDate(),
            calculator.isLong(),
            exerciseType,
            trade.getSettlementCurrency().equals(calculator.getCallCurrency().getCode()));
    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.