|
@@ -171,7 +171,7 @@ def cal_basic_performance(entity_info, ret, trailing_month) {
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
def cal_LPM(ret, risk_free, trailing_month) {
|
|
def cal_LPM(ret, risk_free, trailing_month) {
|
|
-
|
|
|
|
|
|
+
|
|
t = SELECT *, cumcount(entity_id) AS cnt FROM ret WHERE ret > -1 CONTEXT BY entity_id;
|
|
t = SELECT *, cumcount(entity_id) AS cnt FROM ret WHERE ret > -1 CONTEXT BY entity_id;
|
|
|
|
|
|
if(trailing_month == 'incep') {
|
|
if(trailing_month == 'incep') {
|
|
@@ -226,6 +226,11 @@ def cal_omega_sortino_kappa(ret, risk_free, trailing_month) {
|
|
|
|
|
|
lpm = cal_LPM(ret, risk_free, trailing_month);
|
|
lpm = cal_LPM(ret, risk_free, trailing_month);
|
|
|
|
|
|
|
|
+ // 去掉一些 lpm 值太小的无意义数据
|
|
|
|
+ UPDATE lpm SET lpm1 = NULL WHERE lpm1.round(4) == 0;
|
|
|
|
+ UPDATE lpm SET lpm2 = NULL WHERE lpm2.round(4) == 0;
|
|
|
|
+ UPDATE lpm SET lpm3 = NULL WHERE lpm3.round(4) == 0;
|
|
|
|
+
|
|
if(trailing_month == 'incep') {
|
|
if(trailing_month == 'incep') {
|
|
|
|
|
|
tb = SELECT t.entity_id, t.end_date,
|
|
tb = SELECT t.entity_id, t.end_date,
|