|
@@ -156,15 +156,17 @@ def get_nav_table_description(entity_type) {
|
|
def get_performance_table_description(entity_type) {
|
|
def get_performance_table_description(entity_type) {
|
|
|
|
|
|
tmp_universe = table(100:0,
|
|
tmp_universe = table(100:0,
|
|
- ['type', 'table_name', 'sec_id_col', 'cumulative_nav_col'],
|
|
+ ['type', 'table_name', 'sec_id_col', 'cumulative_nav_col', 'ret_col', 'prefix'],
|
|
- [STRING, STRING, STRING, STRING]);
|
|
+ [STRING, STRING, STRING, STRING, STRING, STRING]);
|
|
|
|
|
|
// 分别对应:私募,公募,私有基金,股票,市场指数,图译指数,私有指数,图译因子,组合
|
|
// 分别对应:私募,公募,私有基金,股票,市场指数,图译指数,私有指数,图译因子,组合
|
|
INSERT INTO tmp_universe VALUES (
|
|
INSERT INTO tmp_universe VALUES (
|
|
['HF', 'MF', 'CF', 'EQ', 'MI', 'FI', 'CI', 'FA', 'PF', 'PL', 'CO'],
|
|
['HF', 'MF', 'CF', 'EQ', 'MI', 'FI', 'CI', 'FA', 'PF', 'PL', 'CO'],
|
|
['mfdb.fund_performance', 'mfdb.fund_performance', 'pfdb.pf_cus_fund_performance', 'mfdb.stock_performance', 'mfdb.fund_performance', 'mfdb.fund_performance', 'pfdb.cm_udf_index_performance', 'pfdb.cm_factor_performance', 'pfdb.pf_portfolio_performance', 'mfdb.manager_performance', 'mfdb.company_performance'],
|
|
['mfdb.fund_performance', 'mfdb.fund_performance', 'pfdb.pf_cus_fund_performance', 'mfdb.stock_performance', 'mfdb.fund_performance', 'mfdb.fund_performance', 'pfdb.cm_udf_index_performance', 'pfdb.cm_factor_performance', 'pfdb.pf_portfolio_performance', 'mfdb.manager_performance', 'mfdb.company_performance'],
|
|
['fund_id', 'fund_id', 'fund_id', 'sec_id', 'fund_id', 'fund_id', 'index_id', 'factor_id', 'portfolio_id', 'manager_id', 'company_id'],
|
|
['fund_id', 'fund_id', 'fund_id', 'sec_id', 'fund_id', 'fund_id', 'index_id', 'factor_id', 'portfolio_id', 'manager_id', 'company_id'],
|
|
- ['cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'factor_value', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav'] );
|
|
+ ['cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'factor_value', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav'],
|
|
|
|
+ ['ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m', 'ret_1m'],
|
|
|
|
+ ['HF', 'MF', 'CF', 'EQ', 'IN', 'IN', 'CI', 'FA', '', 'PL', 'CO']);
|
|
|
|
|
|
return (SELECT * FROM tmp_universe u WHERE u.type = entity_type);
|
|
return (SELECT * FROM tmp_universe u WHERE u.type = entity_type);
|
|
|
|
|
|
@@ -176,8 +178,8 @@ def get_performance_table_description(entity_type) {
|
|
def get_performance_weekly_table_description(entity_type) {
|
|
def get_performance_weekly_table_description(entity_type) {
|
|
|
|
|
|
tmp_universe = table(100:0,
|
|
tmp_universe = table(100:0,
|
|
- ['type', 'table_name', 'sec_id_col', 'cumulative_nav_col', 'prefix'],
|
|
+ ['type', 'table_name', 'sec_id_col', 'cumulative_nav_col', 'ret_col', 'prefix'],
|
|
- [STRING, STRING, STRING, STRING, STRING]);
|
|
+ [STRING, STRING, STRING, STRING, STRING, STRING]);
|
|
|
|
|
|
// 分别对应:私募,公募,私有基金,股票,市场指数,图译指数,私有指数,图译因子,组合
|
|
// 分别对应:私募,公募,私有基金,股票,市场指数,图译指数,私有指数,图译因子,组合
|
|
INSERT INTO tmp_universe VALUES (
|
|
INSERT INTO tmp_universe VALUES (
|
|
@@ -185,6 +187,7 @@ def get_performance_weekly_table_description(entity_type) {
|
|
['mfdb.fund_performance_weekly', 'mfdb.fund_performance_weekly', 'pfdb.pf_cus_fund_performance_weekly', 'mfdb.stock_performance_weekly', 'mfdb.fund_performance_weekly', 'mfdb.fund_performance_weekly', 'pfdb.cm_udf_index_performance_weekly', 'pfdb.cm_factor_performance_weekly', 'pfdb.pf_portfolio_performance_weekly'],
|
|
['mfdb.fund_performance_weekly', 'mfdb.fund_performance_weekly', 'pfdb.pf_cus_fund_performance_weekly', 'mfdb.stock_performance_weekly', 'mfdb.fund_performance_weekly', 'mfdb.fund_performance_weekly', 'pfdb.cm_udf_index_performance_weekly', 'pfdb.cm_factor_performance_weekly', 'pfdb.pf_portfolio_performance_weekly'],
|
|
['fund_id', 'fund_id', 'fund_id', 'sec_id', 'fund_id', 'fund_id', 'index_id', 'factor_id', 'portfolio_id'],
|
|
['fund_id', 'fund_id', 'fund_id', 'sec_id', 'fund_id', 'fund_id', 'index_id', 'factor_id', 'portfolio_id'],
|
|
['cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'factor_value', 'cumulative_nav'],
|
|
['cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'factor_value', 'cumulative_nav'],
|
|
|
|
+ ['ret_1w', 'ret_1w', 'ret_1w', 'ret_1w', 'ret_1w', 'ret_1w', 'ret_1w', 'ret_1w', 'ret_1w'],
|
|
['HF', 'MF', 'CF', 'EQ', 'IN', 'IN', 'CI', 'FA', '']);
|
|
['HF', 'MF', 'CF', 'EQ', 'IN', 'IN', 'CI', 'FA', '']);
|
|
|
|
|
|
return (SELECT * FROM tmp_universe u WHERE u.type = entity_type);
|
|
return (SELECT * FROM tmp_universe u WHERE u.type = entity_type);
|
|
@@ -198,15 +201,16 @@ def get_performance_weekly_table_description(entity_type) {
|
|
def get_latest_performance_table_description(entity_type) {
|
|
def get_latest_performance_table_description(entity_type) {
|
|
|
|
|
|
tmp_universe = table(100:0,
|
|
tmp_universe = table(100:0,
|
|
- ['type', 'table_name', 'sec_id_col', 'cumulative_nav_col'],
|
|
+ ['type', 'table_name', 'sec_id_col', 'cumulative_nav_col', 'prefix'],
|
|
- [STRING, STRING, STRING, STRING]);
|
|
+ [STRING, STRING, STRING, STRING, STRING]);
|
|
|
|
|
|
// 分别对应:私募,公募,私有基金,股票,市场指数,图译指数,私有指数,图译因子,组合
|
|
// 分别对应:私募,公募,私有基金,股票,市场指数,图译指数,私有指数,图译因子,组合
|
|
INSERT INTO tmp_universe VALUES (
|
|
INSERT INTO tmp_universe VALUES (
|
|
['HF', 'MF', 'CF', 'EQ', 'MI', 'FI', 'CI', 'FA', 'PF'],
|
|
['HF', 'MF', 'CF', 'EQ', 'MI', 'FI', 'CI', 'FA', 'PF'],
|
|
['mfdb.fund_latest_nav_performance', 'mfdb.fund_latest_nav_performance', 'pfdb.pf_cus_fund_latest_nav_performance', 'mfdb.stock_latest_nav_performance', 'mfdb.fund_latest_nav_performance', 'mfdb.fund_latest_nav_performance', 'pfdb.cm_udf_index_latest_nav_performance', 'pfdb.pf_factor_latest_nav_performance', 'pfdb.pf_portfolio_latest_nav_performance'],
|
|
['mfdb.fund_latest_nav_performance', 'mfdb.fund_latest_nav_performance', 'pfdb.pf_cus_fund_latest_nav_performance', 'mfdb.stock_latest_nav_performance', 'mfdb.fund_latest_nav_performance', 'mfdb.fund_latest_nav_performance', 'pfdb.cm_udf_index_latest_nav_performance', 'pfdb.pf_factor_latest_nav_performance', 'pfdb.pf_portfolio_latest_nav_performance'],
|
|
['fund_id', 'fund_id', 'fund_id', 'sec_id', 'fund_id', 'fund_id', 'index_id', 'factor_id', 'portfolio_id'],
|
|
['fund_id', 'fund_id', 'fund_id', 'sec_id', 'fund_id', 'fund_id', 'index_id', 'factor_id', 'portfolio_id'],
|
|
- ['cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'factor_value', 'cumulative_nav'] );
|
|
+ ['cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'cumulative_nav', 'factor_value', 'cumulative_nav'],
|
|
|
|
+ ['HF', 'MF', 'CF', 'EQ', 'IN', 'IN', 'CI', 'FA', '']);
|
|
|
|
|
|
return (SELECT * FROM tmp_universe u WHERE u.type = entity_type);
|
|
return (SELECT * FROM tmp_universe u WHERE u.type = entity_type);
|
|
|
|
|