Sample_cal_indicators.dos 958 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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-1Y']
  21. d_indicators['MS-3Y']
  22. d_bfi_indicators['BFI-2Y']
  23. /* TEST CASE 3
  24. d_bfi_indicators = cal_fund_bfi_indicators('MF', "'MF00003PW2', 'MF00003PW1', 'MF00003PXO'", 2024.08.31, true);
  25. d_bfi_indicators['BFI-2Y']
  26. */