Sample_cal_indicators.dos 1004 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. login(`admin, `123456)
  2. loadPlugin("ODBC")
  3. clearCachedModules()
  4. use fundit::fundCalculator
  5. use fundit::dataPuller
  6. use fundit::returnCalculator
  7. use fundit::indicatorCalculator
  8. use fundit::task_fundPerformance
  9. end_day = 2024.06.28
  10. //end_day = today()
  11. /* TEST CASE 1.1 */
  12. fund_ids = "'HF000004KN','HF000103EU','HF00018WXG'";
  13. /* TEST CASE 1.2
  14. tb_updated_funds = get_fund_list_by_nav_updatetime(null, 2024.07.19T10:00:00);
  15. // take 1000 funds for testing
  16. fund_ids = tb_updated_funds.fund_id[0:1000].concat("','")$STRING;
  17. fund_ids = "'" + fund_ids + "'";
  18. */
  19. d_indicators = fundit::indicatorCalculator::cal_fund_indicators('HF', fund_ids, end_day, true);
  20. d_bfi_indicators = fundit::indicatorCalculator::cal_fund_bfi_indicators('HF', fund_ids, end_day, true);
  21. d_indicators['PBI-INCEP']
  22. d_indicators['PBI-YTD']
  23. d_indicators['PBI-3Y']
  24. d_indicators['PBI-5Y']
  25. d_indicators['MS-3Y']
  26. d_bfi_indicators['BFI-INCEP']
  27. /* TEST CASE 2 */
  28. d_indicators = calFundPerformance('MF', 2024.09.25);