Browse Source

优化计算方法

wangzaijun 1 year ago
parent
commit
3140131fe5
1 changed files with 0 additions and 19 deletions
  1. 0 19
      src/main/java/com/smppw/core/IndicatorService.java

+ 0 - 19
src/main/java/com/smppw/core/IndicatorService.java

@@ -1,8 +1,6 @@
 package com.smppw.core;
 
 import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.collection.ListUtil;
-import cn.hutool.core.map.MapUtil;
 import com.smppw.common.pojo.IStrategy;
 import com.smppw.common.pojo.IndexesTradeDateDo;
 import com.smppw.common.pojo.dto.CompoundRet;
@@ -24,7 +22,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 
 /**
  * @author wangzaijun
@@ -588,22 +585,6 @@ public class IndicatorService {
         }
     }
 
-    public List<Map<String, Object>> getMultiSecRetList(List<String> mainSecIdList, List<String> indexIds, Map<String, List<DateValue>> allNavMap) {
-        List<Map<String, Object>> initRetList = ListUtil.list(true);
-        for (String secId : mainSecIdList) {
-            List<CompoundRet> ret = IndicatorCalcUtil.getRet(allNavMap.get(secId), null, null, null);
-            List<Map<String, Object>> dataList = ret.stream().filter(e -> e.getRetOfFund() != null).map(e -> MapUtil.<String, Object>builder("end_date", e.getEndDate())
-                    .put("fund_id", secId).put("ret_range", e.getRetOfFund()).build()).collect(Collectors.toList());
-            initRetList.addAll(dataList);
-        }
-        for (String indexId : indexIds) {
-            List<CompoundRet> indexRet = IndicatorCalcUtil.getRet(allNavMap.get(indexId), null, null, null);
-            initRetList.addAll(indexRet.stream().filter(e -> e.getRetOfFund() != null).map(e -> MapUtil.<String, Object>builder("end_date", e.getEndDate())
-                    .put("fund_id", indexId).put("ret_range", e.getRetOfFund()).build()).collect(Collectors.toList()));
-        }
-        return initRetList;
-    }
-
     public Map<String, List<IndicatorCalcPropertyDto>> getMultiSecRetListNew(List<String> mainSecIdList, List<String> indexIdList, Frequency frequency,
                                                                              Frequency rollingFrequency, String startDate, String endDate,
                                                                              boolean ifExcessReturn, String benchmarkId, RaiseType raiseType, IStrategy strategy,