|
|
@@ -261,11 +261,12 @@ impl Predictor {
|
|
|
let b1 = &depth.bids[0];
|
|
|
|
|
|
// https://quant.stackexchange.com/questions/50651/how-to-understand-micro-price-aka-weighted-mid-price
|
|
|
- let total = a1.value + b1.value;
|
|
|
+ // let total = a1.value + b1.value;
|
|
|
// let fair_price = (a1.price + b1.price) / Decimal::TWO;
|
|
|
|
|
|
// 生成fp
|
|
|
- self.fair_price_vec[index] = a1.price * b1.value / total + b1.price * a1.value / total;
|
|
|
+ // self.fair_price_vec[index] = a1.price * b1.value / total + b1.price * a1.value / total;
|
|
|
+ self.fair_price_vec[index] = (a1.price + b1.price) / Decimal::TWO;
|
|
|
self.fair_price_vec[index].rescale(self.mid_price.scale());
|
|
|
|
|
|
// 求价格倍率
|