Ejemplo n.º 1
0
 private boolean isConsstituent(
     String symbol, List<ConstituentStockQueryResult> constituentStockQueryResult) {
   for (ConstituentStockQueryResult constituentStockQueryResult2 : constituentStockQueryResult) {
     if (symbol.equals(constituentStockQueryResult2.getLocalCode())) {
       return true;
     }
   }
   return false;
 }
Ejemplo n.º 2
0
 private ConstituentStockQueryResult getConstituentStock(
     ExecutionReport executionReport,
     List<ConstituentStockQueryResult> constituentStockQueryResult) {
   ConstituentStockQueryResult constituentStock = null;
   for (ConstituentStockQueryResult constituentStockQueryResult2 : constituentStockQueryResult) {
     if (constituentStockQueryResult2.getLocalCode().equals(executionReport.getSymbol())) {
       constituentStock = constituentStockQueryResult2;
     }
   }
   return constituentStock;
 }
Ejemplo n.º 3
0
 private void addSecurityAdjustTradeEventLegs(
     TradeAccountEvent tradeAccount,
     List<ExecutionReport> etfSecurityExecutionReport,
     List<AdjustTradeEventLeg> adjustTradeEventLegs,
     BasketQueryResult basket) {
   for (ExecutionReport executionReport : etfSecurityExecutionReport) {
     AdjustTradeEventLeg adjustTradeEventLeg = new AdjustTradeEventLeg();
     List<ConstituentStockQueryResult> constituentStockQueryResult =
         basket.getConstituentStockQueryResult();
     ConstituentStockQueryResult constituentStock =
         getConstituentStock(executionReport, constituentStockQueryResult);
     adjustTradeEventLeg.setAccountId(tradeAccount.getTradeAccountId());
     adjustTradeEventLeg.setBalance(executionReport.getFillQty());
     adjustTradeEventLeg.setLongShort(LongShortConsts.LONG);
     adjustTradeEventLeg.setSecurityId(constituentStock.getSecurityId());
     adjustTradeEventLeg.setSecurityTypeCode(constituentStock.getSecurityTypeCode());
     adjustTradeEventLegs.add(adjustTradeEventLeg);
   }
 }