123456789101112131415161718192021222324252627282930313233 |
- login(`admin, `123456)
- loadPlugin("ODBC")
- clearCachedModules()
- use fundit::fundCalculator
- use fundit::dataPuller
- use fundit::returnCalculator
- use fundit::sqlUtilities
- // TEST CASE 1
- fund_ids = "'HF000004KN','HF00018WXG','HF000103EU'"
- // TEST CASE 2 取有净值更新的所有私募基金
- 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 = "'" + fund_ids$STRING + "'"
- // 取基金净值
- tb_nav = get_nav_by_price_date('HF', fund_ids, 1990.01.01, true)
- save_hedge_fund_nav_to_local(tb_nav)
- // 计算基金月收益
- tb_fund_performance = cal_fund_monthly_returns('HF', fund_ids, false)
- save_table(tb_fund_performance, "mfdb.fund_performance", false)
- // 计算基金周收益
- tb_fund_performance_weekly = cal_hedge_fund_weekly_returns(fund_ids, false)
- save_table(tb_fund_performance_weekly, "mfdb.fund_performance_weekly", false)
- // 计算基金最新收益
- tb_fund_latest_nav_performance = cal_hedge_fund_latest_returns(fund_ids, false)
- save_table(tb_fund_latest_nav_performance, "mfdb.fund_latest_nav_performance", false)
|