|
@@ -339,9 +339,9 @@ def cal_and_save_mc_weekly_nav(entity_type, entity_date, is_save_local) {
|
|
|
|
|
|
s_json = tb_entity.toStdJson();
|
|
s_json = tb_entity.toStdJson();
|
|
t_ret = get_mc_average_return(entity_type, 'w', s_json, 0, 1, true);
|
|
t_ret = get_mc_average_return(entity_type, 'w', s_json, 0, 1, true);
|
|
-
|
|
|
|
|
|
+
|
|
for(cur in d_curve_type.keys()) {
|
|
for(cur in d_curve_type.keys()) {
|
|
-
|
|
|
|
|
|
+//cur=7
|
|
tmp = SELECT entity_id, cur AS curve_type, 0 AS strategy, effective_date, price_date, ret, incl_cal_cnt
|
|
tmp = SELECT entity_id, cur AS curve_type, 0 AS strategy, effective_date, price_date, ret, incl_cal_cnt
|
|
FROM t_ret WHERE raise_type = d_curve_type[cur] AND strategy = -99; // 目前只需要全策略
|
|
FROM t_ret WHERE raise_type = d_curve_type[cur] AND strategy = -99; // 目前只需要全策略
|
|
|
|
|
|
@@ -349,7 +349,7 @@ def cal_and_save_mc_weekly_nav(entity_type, entity_date, is_save_local) {
|
|
tb_nav = cal_mc_nav_by_return(entity_type, tmp, 'w');
|
|
tb_nav = cal_mc_nav_by_return(entity_type, tmp, 'w');
|
|
|
|
|
|
INSERT INTO tb_entity_nav
|
|
INSERT INTO tb_entity_nav
|
|
- SELECT entity_id, curve_type, strategy, effective_date AS year_week, price_date, nav, incl_cal_cnt
|
|
|
|
|
|
+ SELECT entity_id, curve_type, strategy, effective_date AS year_week, price_date, nav, ret, incl_cal_cnt
|
|
FROM ej(tb_nav, tmp, ['entity_id', 'curve_type', 'strategy', 'effective_date']);
|
|
FROM ej(tb_nav, tmp, ['entity_id', 'curve_type', 'strategy', 'effective_date']);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -391,7 +391,7 @@ def cal_and_save_mc_weekly_nav(entity_type, entity_date, is_save_local) {
|
|
*/
|
|
*/
|
|
def CalMCWeeklyNavTask(entity_type, updatetime) {
|
|
def CalMCWeeklyNavTask(entity_type, updatetime) {
|
|
//updatetime = 2024.12.05;
|
|
//updatetime = 2024.12.05;
|
|
-//entity_type = 'CO';
|
|
|
|
|
|
+//entity_type = 'PL';
|
|
if(!(entity_type IN ['PL', 'CO'])) return;
|
|
if(!(entity_type IN ['PL', 'CO'])) return;
|
|
|
|
|
|
is_save_local = iif(updatetime <= get_ini_data_const()['updatetime'], true, false);
|
|
is_save_local = iif(updatetime <= get_ini_data_const()['updatetime'], true, false);
|