|
|
@@ -424,14 +424,14 @@ impl Predictor {
|
|
|
let is_close_short = self.inventory < Decimal::ZERO;
|
|
|
|
|
|
if is_close_long {
|
|
|
- self.optimal_ask_price = max(self.mid_price, self.fair_price) + self.mid_price * self.params.close;
|
|
|
+ self.optimal_ask_price = self.mid_price + self.mid_price * self.params.close;
|
|
|
self.bid_delta = dec!(-2);
|
|
|
} else if is_close_short {
|
|
|
- self.optimal_bid_price = min(self.mid_price, self.fair_price) - self.mid_price * self.params.close;
|
|
|
+ self.optimal_bid_price = self.mid_price - self.mid_price * self.params.close;
|
|
|
self.ask_delta = dec!(-2);
|
|
|
} else {
|
|
|
- self.optimal_bid_price = min(self.mid_price, self.fair_price) - self.mid_price * self.params.open;
|
|
|
- self.optimal_ask_price = max(self.mid_price, self.fair_price) + self.mid_price * self.params.open;
|
|
|
+ self.optimal_bid_price = self.mid_price - self.mid_price * self.params.open;
|
|
|
+ self.optimal_ask_price = self.mid_price + self.mid_price * self.params.open;
|
|
|
}
|
|
|
|
|
|
self.optimal_ask_price.rescale(self.mid_price.scale());
|