Sample_cal_indicators.dos 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. end_day = 2024.06.28
  9. //end_day = today()
  10. /* TEST CASE 1 */
  11. fund_ids = "'HF000004KN','HF000103EU','HF00018WXG'";
  12. /* TEST CASE 2
  13. tb_updated_funds = get_fund_list_by_nav_updatetime(null, 2024.07.19T10:00:00);
  14. // take 1000 funds for testing
  15. fund_ids = tb_updated_funds.fund_id[0:1000].concat("','")$STRING;
  16. fund_ids = "'" + fund_ids + "'";
  17. */
  18. d_indicators = fundit::indicatorCalculator::cal_fund_indicators('HF', fund_ids, end_day, true);
  19. d_bfi_indicators = fundit::indicatorCalculator::cal_fund_bfi_indicators('HF', fund_ids, end_day, true);
  20. d_indicators['PBI-INCEP']
  21. d_indicators['PBI-YTD']
  22. d_indicators['PBI-3Y']
  23. d_indicators['PBI-5Y']
  24. d_indicators['MS-3Y']
  25. d_bfi_indicators['BFI-INCEP']
  26. /* TEST CASE 3
  27. d_bfi_indicators = cal_fund_bfi_indicators('MF', "'MF00003PW2', 'MF00003PW1', 'MF00003PXO'", 2024.08.31, true);
  28. d_bfi_indicators['BFI-2Y']
  29. */