|
@@ -8,8 +8,8 @@ use fundit::returnCalculator
|
|
|
use fundit::indicatorCalculator
|
|
|
|
|
|
/* init values for test cases */
|
|
|
-end_day = 2024.08.31; //2024.06.28;
|
|
|
-fund_ids = "'MF00003PW1','MF00003RS0'"; //"'HF000004KN','HF000103EU','HF00018WXG'";
|
|
|
+end_day = 2024.11.30; //2024.06.28;
|
|
|
+fund_ids = "'MF0002061J','MF0002058K'" //"'MF00003PW1','MF00003RS0'"; //"'HF000004KN','HF000103EU','HF00018WXG'";
|
|
|
entity_type = "MF"; //'HF';
|
|
|
|
|
|
|
|
@@ -364,6 +364,19 @@ assert (select (m2*12).round(4) as m2_a
|
|
|
from m2 where entity_id in entity_ids and end_date in (2024.07M, 2024.08M)).m2_a == [0.064601,0.063365,0.026901,0.025155].round(4);
|
|
|
|
|
|
|
|
|
+// MS risk free IN000002EI IN000002I9
|
|
|
+risk_free_rate = SELECT entity_id AS fund_id, temporalParse(end_date, 'yyyy-MM') AS end_date, ret FROM get_monthly_ret('MI', "'IN000002EI'", very_old_date, end_day, true);
|
|
|
+
|
|
|
+// ms returns
|
|
|
+ms_rets = cal_ms_return(tb_ret, risk_free_rate, '36');
|
|
|
+@testing: case = 'trailing3y ms return'
|
|
|
+assert (exec ms_ret_a.round(3)
|
|
|
+ from ms_rets where entity_id in entity_ids and end_date = 2024.11M) == [-0.125943, 0.0136005].round(3);
|
|
|
+@testing: case = 'trailing3y MRAR'
|
|
|
+assert (exec ms_rar_a.round(3)
|
|
|
+ from ms_rets where entity_id in entity_ids and end_date = 2024.11M) == [-0.156894, 0.0121763].round(3);
|
|
|
+
|
|
|
+
|
|
|
/* Tests for BFI indicators. CURRENTLY IT IS UN-TESTABLE BECAUSE LOGIC OF BENCHMARK COMPARING IS CHANGED */
|
|
|
|
|
|
|