|
@@ -4,23 +4,25 @@ clearCachedModules()
|
|
use fundit::fundCalculator
|
|
use fundit::fundCalculator
|
|
use fundit::dataPuller
|
|
use fundit::dataPuller
|
|
use fundit::returnCalculator
|
|
use fundit::returnCalculator
|
|
|
|
+use fundit::sqlUtilities
|
|
|
|
|
|
// TEST CASE 1
|
|
// TEST CASE 1
|
|
fund_ids = "'HF000004KN','HF00018WXG','HF000103EU'"
|
|
fund_ids = "'HF000004KN','HF00018WXG','HF000103EU'"
|
|
|
|
|
|
// TEST CASE 2 取有净值更新的所有私募基金
|
|
// TEST CASE 2 取有净值更新的所有私募基金
|
|
-tb_fund_list = get_fund_list_by_nav_updatetime(2024.07.19T10:00:00)
|
|
+tb_fund_list = get_fund_list_by_nav_updatetime(null, 2024.07.19T10:00:00);
|
|
fund_ids = tb_fund_list.fund_id.concat("','")$STRING
|
|
fund_ids = tb_fund_list.fund_id.concat("','")$STRING
|
|
fund_ids = "'" + fund_ids$STRING + "'"
|
|
fund_ids = "'" + fund_ids$STRING + "'"
|
|
|
|
|
|
// 取基金净值
|
|
// 取基金净值
|
|
-tb_nav = get_hedge_fund_nav_by_price_date(fund_ids, 1990.01.01, true)
|
|
+tb_nav = get_nav_by_price_date('HF', fund_ids, 1990.01.01, true)
|
|
save_hedge_fund_nav_to_local(tb_nav)
|
|
save_hedge_fund_nav_to_local(tb_nav)
|
|
|
|
|
|
// 计算基金月收益
|
|
// 计算基金月收益
|
|
-tb_fund_performance = cal_hedge_fund_returns(fund_ids, false)
|
|
+tb_fund_performance = cal_fund_monthly_returns('HF', fund_ids, false)
|
|
save_table(tb_fund_performance, "mfdb.fund_performance", false)
|
|
save_table(tb_fund_performance, "mfdb.fund_performance", false)
|
|
|
|
|
|
|
|
+
|
|
// 计算基金周收益
|
|
// 计算基金周收益
|
|
tb_fund_performance_weekly = cal_hedge_fund_weekly_returns(fund_ids, false)
|
|
tb_fund_performance_weekly = cal_hedge_fund_weekly_returns(fund_ids, false)
|
|
save_table(tb_fund_performance_weekly, "mfdb.fund_performance_weekly", false)
|
|
save_table(tb_fund_performance_weekly, "mfdb.fund_performance_weekly", false)
|