|
@@ -64,8 +64,13 @@ pub fn generate_rank_by_indicator_map(indicator_map: &MutexGuard<HashMap<String,
|
|
|
|
|
|
|
|
// ============== epr相关数据的计算 =================
|
|
// ============== epr相关数据的计算 =================
|
|
|
let mut epr_total = Decimal::ZERO;
|
|
let mut epr_total = Decimal::ZERO;
|
|
|
|
|
+ let mut epr_max = Decimal::ZERO;
|
|
|
for value in indicators.eprs.iter() {
|
|
for value in indicators.eprs.iter() {
|
|
|
epr_total += value[1];
|
|
epr_total += value[1];
|
|
|
|
|
+
|
|
|
|
|
+ if value[1] > epr_max {
|
|
|
|
|
+ epr_max = value[1]
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ============== liq相关数据的计算 =================
|
|
// ============== liq相关数据的计算 =================
|
|
@@ -83,7 +88,7 @@ pub fn generate_rank_by_indicator_map(indicator_map: &MutexGuard<HashMap<String,
|
|
|
// ======================== 最终计算 =========================
|
|
// ======================== 最终计算 =========================
|
|
|
// msv_score计算规则
|
|
// msv_score计算规则
|
|
|
let mut msv_score = if msv_abs_total > Decimal::ZERO && epr_total > Decimal::ZERO {
|
|
let mut msv_score = if msv_abs_total > Decimal::ZERO && epr_total > Decimal::ZERO {
|
|
|
- ((msv_abs_max * epr_total / msv_abs_total) * SIXTY).powd(Decimal::TWO)
|
|
|
|
|
|
|
+ ((epr_max * epr_total / msv_abs_total) * SIXTY).powd(Decimal::TWO)
|
|
|
} else {
|
|
} else {
|
|
|
Decimal::ZERO
|
|
Decimal::ZERO
|
|
|
};
|
|
};
|