Ver Fonte

小修小补

Joey há 4 semanas atrás
pai
commit
09e8c13075
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      modules/returnCalculator.dos

+ 1 - 0
modules/returnCalculator.dos

@@ -127,6 +127,7 @@ def cal_weekly_returns(entity_type, entity_info){
     // TODO: 可以考虑将月收益也改为这种方式
     tb_rets_1w = SELECT entity_id, year_week, price_date, cumulative_nav, cumulative_nav.ratios()-1 AS ret_1w 
                  FROM tb_nav
+                 CONTEXT BY entity_id
                  ORDER BY entity_id, year_week;
     
     return SELECT * FROM tb_rets_1w WHERE ret_1w > -1;