|
|
@@ -676,7 +676,11 @@ impl Predictor {
|
|
|
let inventory = self.inventory;
|
|
|
|
|
|
let p: Decimal = self.profit_fixed_vec.iter().sum();
|
|
|
- let sigma_square = (p + Decimal::ONE).ln();
|
|
|
+ let sigma_square = if p > Decimal::ZERO {
|
|
|
+ (p + Decimal::ONE).ln()
|
|
|
+ } else {
|
|
|
+ -(p.abs() + Decimal::ONE).ln()
|
|
|
+ };
|
|
|
// let sigma_square = self.error_rate;
|
|
|
|
|
|
let gamma = self.fair_rate_focus_open;
|